EndpointsStream command output

Sandboxes

Stream command output

Newline-delimited JSON SandboxCommandLogRecord values ({ stream, data, offset }) in output order. Reconnect with ?offset= to continue where a stream broke off. Requires run_commands. Commands and file operations need an ACTIVE sandbox; on any other state they answer 409.

GET/sandboxes/{id}/commands/{command_id}/logs:stream
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

Optional workspace/scope context for the request. Carries a single workspace wire id (ws_…) today. Only needed for broad tokens - a workspace-owned token implies its workspace.

Required string length: 1 - 53

Example: "ws_j572abc123def4"

idstringrequired

Sandbox id (sbx_...).

Pattern: ^sbx_[A-Za-z0-9]{1,64}$

Example: "sbx_j572abc123def456"

command_idstringrequired

Sandbox command id (cmd_...).

Pattern: ^cmd_[A-Za-z0-9]{1,64}$

Example: "cmd_j572abc123def456"

offsetintegerdefault:0

Resume from this output byte offset. Default 0.

Required range: x >= 0

followbooleandefault:true

Keep the stream open until the command finished. Default true.

Response

application/x-ndjson

Success

Type: string<binary>