Execute a command
Run a one-shot command inside the sandbox, optionally applying environment variables to that spawned process only, and wait for the result.
Run a one-shot command inside the sandbox, optionally applying environment variables to that spawned process only, and wait for the result.
Authorization
BearerAuth AuthorizationBearer <token>
API key passed as a Bearer token in the Authorization header.
Alternatively, use the leap0-authorization header.
In: header
Path Parameters
sandboxID*string
Unique sandbox identifier.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
command*string
Shell command to execute.
cwd?string
Working directory for the command.
envs?
Environment variables applied only to the spawned process for this request.
timeout?integer
Timeout in seconds (default 30).
Response Body
application/json
application/json
application/json
curl -X POST "https://api.leap0.dev/v1/sandbox/string/process/execute" \ -H "Content-Type: application/json" \ -d '{ "command": "python3 --version" }'{ "exit_code": 0, "stdout": "Python 3.12.12\n", "stderr": ""}{ "message": "string", "errors": [ { "field": "string", "error": "string" } ]}{ "message": "string"}
