Command
Exec command
Execute a command on a running box. This endpoint allows you to send commands to the box and receive the output
post/boxes/{boxId}/commands
Path parameters
boxIdstring required
Example:c9bdc193-b54b-4ddb-a035-5ac0c598d32d
Box ID
Request body
Example request
{
"command": "ls -la",
"envs": {
"PATH": "/usr/bin:/bin",
"NODE_ENV": "production"
},
"workingDir": "/home/user/projects",
"timeout": "30s"
}Response
Example response
{
"stdout": "total 16\ndrwxr-xr-x 4 user user 4096 Jan 15 10:30 .\ndrwxr-xr-x 3 user user 4096 Jan 15 10:25 .."
}