Get a command's status

Get a command's status

GET/v1/sandboxes/{sandbox_id}/exec/{operation_id}

A key with the sandboxes:exec scope.

Request

curl "https://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/exec/op_3ahrz6dmv29gqy5ckt18fpx4b" \
  -H "Authorization: Bearer $POD_API_KEY"

Parameters

NameInTypeRequiredWhat it is
sandbox_idpathstringYes
operation_idpathstringYes
Pod-End-UserheaderstringNoNarrows a project key to one of its end users: the call sees only that end user's sandboxes and usage, any other answering not_found, and a create is labelled with it. An end user of another project, or one that is not there, is not_found; a suspended one refuses creates and wakes (account_restricted).

Answer

200. The exec operation.

200
{
  "id": "op_3ahrz6dmv29gqy5ckt18fpx4b",
  "sandbox": "sbx_3ahrz6dmv29gqy5ckt18fpx4b",
  "state": "running",
  "detached": false,
  "tty": false,
  "exit_code": null,
  "signal": null,
  "started_at": "2026-11-23T12:00:00.000Z",
  "ended_at": null,
  "stream_url": "wss://api.pod.mapier.ai/v1/sandboxes/sbx_3ahrz6dmv29gqy5ckt18fpx4b/exec/op_3ahrz6dmv29gqy5ckt18fpx4b/stream",
  "oom_killed": false
}
FieldTypeAlwaysWhat it is
idstringYes
sandboxstringYes
state"running" | "exited" | "killed" | "timed_out" | "failed"Yes
detachedbooleanYes
ttybooleanYes
exit_codeinteger | nullYes
signal"TERM" | "KILL" | "INT" | "HUP" | nullYes
started_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
ended_atstring | nullYes
stream_urlstringYesThe address of the stream, always on the host that answered the call. Clients send their key or a stream ticket to it, so they refuse any other address.
oom_killedbooleanNoThe sandbox's out-of-memory killer ended the command: its state is killed with signal KILL (timed_out when the out-of-memory killer ended it after its timeout asked it to stop), or, when a shell ran it, exited with code 137. Sent only once the command has ended and only when true; a missing field means the out-of-memory killer did not end it. A KILL sent through DELETE or a timeout is never reported as the out-of-memory killer's.

Errors

The refusals this call is known for: not_found, in_other_cell. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptproc.refresh()
Pythonproc.refresh()
mpodmpod sandboxes commands get <sandbox> <operation>