Skip to main content
POST
Run a sandbox command

Authorizations

api_key
string
header
required

Personal API key.

Path Parameters

app_id
string
required

ID of the app whose sandbox to operate on.

Body

application/json
command
string
required

Shell command to execute via bash inside the sandbox.

Required string length: 1 - 100000
cwd
string | null

Working dir relative to the app root. cd does not persist across calls — use this or chain commands.

timeout_ms
integer
default:120000

Timeout in milliseconds (default 120000, max 600000).

Required range: 1 <= x <= 600000

Response

The command ran. Read exit_code for its result.

What a command left behind.

stdout
string
required

Everything the command wrote to standard output.

Example:

"added 12 packages in 3s\n"

stderr
string
required

Everything the command wrote to standard error. Populated on success too, since many tools log there.

Example:

""

exit_code
integer
required

The command's exit status. 0 means success. A non-zero status is still a 200 from this endpoint: the command ran and failed, which is not a request error.

Example:

0

truncated
boolean
required

true when the output hit the 1 MB cap and was cut short. stdout and stderr are each capped, and either one hitting it sets this.

Example:

false

duration_ms
integer
required

How long the command took, in milliseconds.

Example:

3120