Docs
Commands and files ›

Get command

GET/v1/sandboxes/{id}/commands/{commandId}

Status and output of that command.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
  4. const command = await sandbox.commands.get("cmd_5d1f0e8a2b7c4436");
Answer200 OK · Command
  1. {
  2. "id": string,
  3. "sandboxId": string,
  4. "pid": integer | null,
  5. "status": string,
  6. "exitCode": integer | null,
  7. "stdout": string,
  8. "stderr": string,
  9. "startedAt": string,
  10. "finishedAt": string | null,
  11. }

Command status and the most recent logs.

Path

idrequired
string
commandIdrequired
string

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 Command status and the most recent logs.

Command9 fields
id
string
sandboxId
string
pid
integernull
status
string
exitCode
integernull
stdout
string
stderr
string
startedAt
string
finishedAt
stringnull

Errors and other answers

404 Not found.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.