Authorizations
Enter your API Key in the format: Bearer <token>. Get it from https://gbox.ai
Path Parameters
Box ID
"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"
Body
Command execution request parameters
The command to run
"ls -la"
The environment variables to run the command
{
"PATH": "/usr/bin:/bin",
"NODE_ENV": "production"
}
The working directory of the command. It not provided, the command will be run in the box.config.workingDir
directory.
"/home/user/projects"
The timeout of the command. If the command times out, the exit code will be 124. For example: 'timeout 5s sleep 10s' will result in exit code 124.
Supported time units: ms (milliseconds), s (seconds), m (minutes), h (hours) Example formats: "500ms", "30s", "5m", "1h" Default: 30s
"30s"
Response
Result of command execution
The exit code of the command
0
The standard output of the command
"total 16\ndrwxr-xr-x 4 user user 4096 Jan 15 10:30 .\ndrwxr-xr-x 3 user user 4096 Jan 15 10:25 .."
The standard error output of the command
""