Commands and files ›
Get command
GET
/v1/sandboxes/{id}/commands/{commandId}Status and output of that command.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
- const command = await sandbox.commands.get("cmd_5d1f0e8a2b7c4436");
Answer200 OK · Command
- {
- "id": string,
- "sandboxId": string,
- "pid": integer | null,
- "status": string,
- "exitCode": integer | null,
- "stdout": string,
- "stderr": string,
- "startedAt": string,
- "finishedAt": string | null,
- }
Command status and the most recent logs.
Path
idrequiredstring | |
commandIdrequiredstring |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
200 Command status and the most recent logs.
Command9 fields
idstring
sandboxIdstring
pidintegernull
statusstring
exitCodeintegernull
stdoutstring
stderrstring
startedAtstring
finishedAtstringnull
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.