Execute command in an existing sandbox session

View as Markdown

Run a non-interactive command in an existing sandbox session over HTTP. Returns stdout/stderr output and exit code.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idstringRequired
Session ID

Request

This endpoint expects an object.
commandstringRequired
Command to execute in the existing session.
backgroundbooleanOptional
Whether to run command in background and return a command handle.
cwdstring or nullOptional
Optional working directory.
envobjectOptional
Optional environment variables for command execution.
stdinstring or nullOptional

Optional stdin payload (UTF-8).

timeout_mslong or nullOptional>=0
Optional timeout in milliseconds.
userstring or nullOptional

Optional user to run the command as (e.g. root, ubuntu).

Response

Command executed
backgroundboolean
commandstring
ephemeralboolean
kindstring
session_idstring
statusstring
command_idstring or null
exit_codeinteger or null>=0
outputstring or null
output_truncatedboolean or null
pidlong or null
workspacestring or null
workspace_idstring or null

Errors