POST
/
api
/
bash
/
command
curl --request POST \
  --url http://localhost:4242/{computer_name}/api/bash/command \
  --header 'Content-Type: application/json' \
  --data '{
  "command": "ls -la"
}'
{
  "output": "total 20\ndrwxr-xr-x  3 user  group   96 Mar 10 12:34 .",
  "status": "completed"
}

Body

application/json
command
string
required

Shell command to execute

Example:

"ls -la"

Response

200
application/json
Successfully executed command
output
string | null

Command output if available

Example:

"total 20\ndrwxr-xr-x 3 user group 96 Mar 10 12:34 ."

process_id
integer | null

Process ID if running in background

Example:

1234

status
string
default:completed

Command status: 'completed' or 'background'

Example:

"completed"