Skip to main content
POST
/
computers
/
{id}
/
bash
Execute bash
curl --request POST \
  --url https://www.orgo.ai/api/computers/{id}/bash \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "command": "ls -la /home/user"
}
'
{
  "output": "total 32\ndrwxr-xr-x 4 user user 4096 Jan 15 10:30 .\ndrwxr-xr-x 3 root root 4096 Jan 15 10:00 ..\n-rw-r--r-- 1 user user  220 Jan 15 10:00 .bashrc\ndrwxr-xr-x 2 user user 4096 Jan 15 10:30 Desktop\n",
  "success": true
}
Executes a bash command on the computer.

Path parameters

id
string
required
Computer ID.

Request

command
string
required
Bash command to execute.

Response

output
string
Command output (stdout and stderr combined).
success
boolean
true if command completed successfully.

Example

curl -X POST https://www.orgo.ai/api/computers/a3bb189e-8bf9-3888-9912-ace4e6543002/bash \
  -H "Authorization: Bearer $ORGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command": "ls -la /home/user"}'

Response

{
  "output": "total 32\ndrwxr-xr-x 4 user user 4096 Jan 15 10:30 .\ndrwxr-xr-x 3 root root 4096 Jan 15 10:00 ..\n-rw-r--r-- 1 user user  220 Jan 15 10:00 .bashrc\ndrwxr-xr-x 2 user user 4096 Jan 15 10:30 Desktop\n",
  "success": true
}
For Python code execution, use Execute Python instead.

Authorizations

Authorization
string
header
required

API key authentication. Get your key at orgo.ai/workspaces

Path Parameters

id
string
required

Computer ID

Body

application/json
command
string
required

Bash command to execute

Response

Command executed

output
string

Command output

success
boolean

Whether command succeeded