Hanzo
OpenapiSandbox

Run a command in a sandbox

Runs a command inside the sandbox and returns its exit code, stdout and stderr.

POST /v1/sandbox/{id}/exec

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

Runs a command inside the sandbox and returns its exit code, stdout and stderr. A non-zero exit is a SUCCESSFUL call carrying a failed program — the HTTP status stays 200, because "the tests failed" and "the sandbox is broken" are different facts.

NOTHING RUNS IN cloud. The command is streamed to the Kubernetes exec subresource of the sandbox's pod, which runs under the gVisor runtime class. The sandbox is addressed by pod NAME through the apiserver, never by address.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyes

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo sandboxes exec <id>

Sandbox API · All Hanzo APIs · Interactive reference

How is this guide?

On this page