Execute command (synchronous)
POST/computers/{id}/exec/sync
Execute a shell command and wait for completion, returning buffered stdout/stderr.
Path Parameters
id: string
Body ParametersJSON
command: optional string
cwd: optional string
env: optional map[string]
timeout_seconds: optional number
Returns
exit_code: optional number
stderr: optional string
stdout: optional string
Execute command (synchronous)
curl https://api.tzafon.ai/computers/$ID/exec/sync \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TZAFON_API_KEY" \
-d '{}'{
"exit_code": 0,
"stderr": "stderr",
"stdout": "stdout"
}Returns Examples
{
"exit_code": 0,
"stderr": "stderr",
"stdout": "stdout"
}