Skip to main content
GET
Get a sandbox execution

Authorizations

X-Access-Token
string
header
required

Sandbox data-plane token — the sandbox_access_token returned by the create/connect endpoints. Used for /files, Sandbox-Exec, and other data-plane endpoints; the control plane (/api/v2) does not accept it, and conversely the control plane's Authorization: Bearer is invalid on the data plane.

The token is bound to its sandbox: using sandbox A's token against sandbox B's host fails. It stays valid until the sandbox's lifetime ends; there is no separate rotation endpoint (rotate_traffic_token rotates the port traffic token traffic_access_token and does not affect this one).

Headers

X-Request-ID
string

Ignored. The server generates its own request ID (req-<uuid>) for every request and returns it in the X-Request-ID response header and the body's request_id.

Required string length: 1 - 128

Path Parameters

execution_id
string<uuid>
required

Public execution identifier returned by the create operation. A value that is not a valid UUID is treated as an unknown execution and returns 404 Execution.NotFound.

Response

Current execution status and any available output.

request_id
string
required

Server-generated request ID (req-<uuid>), identical to the X-Request-ID response header.

execution_id
string<uuid>
required
sandbox_id
string
required

Echo of the data-plane addressing key (i.e. sandbox_key; the data plane identifies the instance by the key in the host).

status
enum<string>
required

Public lifecycle status of a sandbox execution. timed_out means the per-command time limit (execution_timeout_seconds) was reached and the command was terminated (SIGTERM, then SIGKILL after a grace period); exit_code is then null.

Available options:
pending,
running,
cancelling,
succeeded,
failed,
cancelled,
timed_out
exit_code
integer<int32> | null
required

Exit status of the command. A command killed by a signal (for example an out-of-memory kill) reports 128 + signal (137 for SIGKILL) with status failed and no termination_reason. Null while non-terminal, and when the execution was cancelled, timed out, or its runtime was terminated.

stdout
string | null
required

Captured standard output, or null while not yet available. At most 1 MiB is kept; further output is dropped and stdout_truncated is true.

stderr
string | null
required

Captured standard error, or null while not yet available. At most 1 MiB is kept; further output is dropped and stderr_truncated is true.

stdout_truncated
boolean | null
required
stderr_truncated
boolean | null
required
started_at
string<date-time> | null
required
completed_at
string<date-time> | null
required
termination_reason
enum<string>

Why an execution that did not finish on its own ended. Omitted when the command exited by itself, including when it was killed by a signal from inside the sandbox (see exit_code). explicit_cancel: the execution was cancelled (status cancelled). execution_timeout: the execution reached its timeout (status timed_out). runtime_terminated: the command's process is gone without having reported an outcome, for example the sandbox was resumed from a pause without memory, or its output stream was lost for good, so the outcome of the command is unknown (status failed). Pausing a sandbox does not by itself end an execution: after a pause with memory the command continues and the execution reports its real result.

Available options:
explicit_cancel,
execution_timeout,
runtime_terminated
Example:

"runtime_terminated"

failure_reason
enum<string>

Classified process startup failure. Omitted when no recognized startup cause is available. cwd_not_found means the working directory does not exist; cwd_not_directory means the working directory is not a directory; permission_denied means startup was denied without a reliably identified operation. Contains no path or raw upstream error. Runtime interruptions use termination_reason.

Available options:
cwd_not_found,
cwd_not_directory,
permission_denied