Hanzo AI
OpenapiSandbox

Create ticket

Mints a short-lived grant to open a terminal on a sandbox.

POST /v1/sandbox/{id}/terminal/ticket

Addresshttps://api.hanzo.ai/v1/sandbox/{id}/terminal/ticket
MethodPOST
Operationpost_sandbox_by_id_terminal_ticket
AuthAuthorization: Bearer $HANZO_API_KEY

Mints a short-lived grant to open a terminal on a sandbox.

The ticket travels in the query string of the URL it answers with, because a browser cannot set an Authorization header on a WebSocket handshake. It is single-purpose and short-lived for exactly that reason. A sandbox that is not running is 409 rather than a ticket that cannot be used.

Request

1 field.

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

Response

StatusBodyMeaning
201ticketGrantcreated

201 body — 3 fields.

FieldInTypeAlwaysDescription
expiresInbodyintegerExpiresIn is how long the ticket is good for, in seconds.
ticketbodystringTicket is the grant itself. It is single-purpose and short-lived, and it travels in a query string because a WebSocket handshake carries no Authorization…
urlbodystringURL is the PATH to open, ticket included — not an absolute URL.

Failure carries the platform error shape — see Errors.

Examples

hanzo sandbox terminal ticket <id>

Sandbox API · All Hanzo APIs · Interactive reference

How is this guide?

On this page