Skip to main content
POST
Run a command in the sandbox

Authorizations

Authorization
string
header
required

Use JWT token for authentication

Path Parameters

environmentId
string
required

Environment id

Body

application/json
sandboxId
string
required

Sandbox returned by POST /sandbox/start

command
string
required

A line of shell, not an argv[0]. It runs through bash -c, so pipes, redirection, && and cd all work and belong here: cd /workspace && ./report.sh | tail -5.

Example:

"cd /workspace && ./daily-report.sh"

args
string[]

Appended to command space-separated, as text. This is NOT argv: nothing is quoted or escaped for you, so an argument containing spaces or shell metacharacters must arrive already quoted — or, more simply, be written into command instead.

Example:
cwd
string

Working directory

Example:

"/workspace"

sudo
boolean

Run as root

Response

Success