cURL
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" }
Executes a shell command and returns its output or background process information.
Shell command to execute
"ls -la"
Successfully executed command
Command output if available
"total 20\ndrwxr-xr-x 3 user group 96 Mar 10 12:34 ."
Process ID if running in background
1234
Command status: 'completed' or 'background'
"completed"