Hanzo AI
OpenapiSandbox

Resume sandbox

Gives a parked sandbox a pod again: POST /v1/sandbox/:id/resume. The pod is NEW.

POST /v1/sandbox/{id}/resume

Addresshttps://api.hanzo.ai/v1/sandbox/{id}/resume
MethodPOST
Operationpost_sandbox_by_id_resume
AuthAuthorization: Bearer $HANZO_API_KEY

Gives a parked sandbox a pod again: POST /v1/sandbox/:id/resume.

The pod is NEW. Its name is minted fresh because a pod name is never reused (store.go), the volume it mounts is the one the row already names, and the credential is the RESUMING caller's rather than the one that took the lease — a session is short-lived and the one that parked it is gone.

Request

1 field.

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

Response

StatusBodyMeaning
200sandbox.Sandboxok
defaultproblem-detailsrefused

200 body — 15 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…
clusterbodystringCluster is the attached cluster this sandbox runs on — the fleet-local name the lease named — or empty for the home cluster.
connectedAtbodyinteger (int64)ConnectedAt is when somebody was last known to have this sandbox's project OPEN, Unix seconds.
createdAtbodyinteger (int64)CreatedAt is when the lease was first taken, Unix seconds.
errorbodystringError is why the sandbox could not come up, in plain words.
expiresAtbodyinteger (int64)ExpiresAt 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.
lastUsedAtbodyinteger (int64)LastUsedAt 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 resume <id>

Sandbox API · All Hanzo APIs · Interactive reference

How is this guide?

On this page