EndpointsList commands

Sandboxes

List commands

Commands run in the sandbox, newest first. Works in every sandbox state. Requires run_commands.

GET/sandboxes/{id}/commands
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"

cursorstring

Pagination cursor from a previous response's next_cursor.

Maximum string length: 512

limitintegerdefault:50

Items per page (1-100, default 50)

Required range: 1 <= x <= 100

Example: 50

stateenum<string>

SUCCEEDED: exited with code 0. FAILED: exited with another code, was killed, or hit its timeout (exit code 124).

Available options: RUNNING, SUCCEEDED, FAILED, CANCELLED

Response

application/json

SandboxCommandList

dataobject[]required
child attributes
data.idstringrequired

Sandbox command id (cmd_...).

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

Example: "cmd_j572abc123def456"

data.sandbox_idstringrequired

Sandbox id (sbx_...).

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

Example: "sbx_j572abc123def456"

data.argvstring[] | nullrequired
data.shellstring | nullrequired
data.cwdstringrequired
data.timeout_secondsintegerrequired
data.stateenum<string>required

SUCCEEDED: exited with code 0. FAILED: exited with another code, was killed, or hit its timeout (exit code 124).

Available options: RUNNING, SUCCEEDED, FAILED, CANCELLED

data.exit_codeinteger | nullrequired

Set once the command finished.

data.created_byobjectrequired
child attributes
data.created_by.typeenum<string>required

user: a workspace member. opencode: an OpenCode Server (oc_...).

Available options: user, opencode

data.created_by.idstringrequired

Required string length: 1 - 100

data.created_atintegerrequired

Start time (Unix seconds).

Required range: x >= 0

data.finished_atinteger | nullrequired

Finish time (Unix seconds).

Required range: x >= 0

data.outputobject | nullrequired

Captured output, only on the response to a wait: true request that finished in time; null elsewhere.

child attributes
data.output.stdoutstringrequired
data.output.stderrstringrequired
data.output.truncatedbooleanrequired

True when the output is longer than the 64 KiB returned here; read it all with logs:stream.

has_morebooleanrequired

True if more items exist after this page.

next_cursorstring | nullrequired

Opaque cursor for the next page, or null if no more pages.