Gatana logoGatana Docs
RoutesSandboxesSandboxidExec

/sandboxes/{sandboxId}/exec

Run a command in the sandbox and stream the output back as NDJSON. The command and its result are written to the sandbox audit log

POST
/sandboxes/{sandboxId}/exec
AuthorizationBearer <token>

In: header

Path Parameters

sandboxId*string

Request Body

application/json

command*string
workdir?|
timeout?|

Response Body

application/octet-stream

curl -X POST "https://YOUR_ORG_ID.gatana.ai/api/v1/sandboxes/string/exec" \  -H "Content-Type: application/json" \  -d '{    "command": "string"  }'
"{\"stream\":\"stdout\",\"data\":\"command output line\\n\"}\n{\"done\":true,\"exitCode\":0}\n{\"error\":true,\"message\":\"timeout\"}\n{\"keepAlive\":true}\n"