Hanzo AI
OpenapiSandbox

Get sandbox

Returns one sandbox: its class, project, image, the runtime it was given, its status and when its lease ends.

GET /v1/sandbox/{id}

Addresshttps://api.hanzo.ai/v1/sandbox/{id}
MethodGET
Operationget_sandbox_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Returns one sandbox: its class, project, image, the runtime it was given, its status and when its lease ends.

An id the caller's org does not hold is the same 404 an unknown id gives — the store is keyed on the org, so a cross-tenant id simply is not there.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID is the sandbox to address, from the path.

Response

StatusBodyMeaning
200Sandboxok

200 body — 14 fields.

FieldInTypeAlwaysDescription
classbodystringClass is what the sandbox is FOR, and it decides the image, the working directory and the isolation: "exec" for a code-interpreter call (workdir /mnt/data, no…
connectedAtbodyintegerConnectedAt is when somebody was last known to have this sandbox's project OPEN, Unix seconds.
createdAtbodyintegerCreatedAt is when the lease was first taken, Unix seconds.
errorbodystringError is why the sandbox could not come up, in plain words.
expiresAtbodyintegerExpiresAt is when the lease ends, Unix seconds.
idbodystringID is the sandbox's server-minted handle and what every operation addresses it by.
imagebodystringImage is the container image this sandbox is actually running — the one the class chose, or an override the policy admitted.
kindbodystringKind is the resource family this row belongs to.
lastUsedAtbodyintegerLastUsedAt is when the sandbox last did work, Unix seconds.
orgbodystringOrg is the org that holds the lease — the validated caller's, never a value a request supplied.
projectbodystringProject is the project this sandbox is bound to.
runtimebodystringRuntime is the isolation boundary this sandbox GOT, which is not always the one it asked for: a caller states a preference and runtimeFor answers with what the…
statusbodystringStatus is where the sandbox is in its life: "pending" while the pod is coming up, "running" once it can take work, "error" when it cannot.
volumebodystringVolume is the persistent volume attached to the sandbox, when it has one.

Failure carries the platform error shape — see Errors.

Examples

hanzo sandbox get <id>

Sandbox API · All Hanzo APIs · Interactive reference

How is this guide?

On this page