Execute command (streaming)
POST/computers/{id}/exec
Execute a shell command with real-time streaming output as NDJSON. Each line is a JSON object with type (stdout/stderr/exit/error).
Path Parameters
id: string
Body ParametersJSON
command: optional string
cwd: optional string
env: optional map[string]
timeout_seconds: optional number
Returns
code: optional number
for exit
data: optional string
for stdout/stderr
message: optional string
for error
type: optional string
"stdout", "stderr", "exit", "error"
Execute command (streaming)
curl https://api.tzafon.ai/computers/$ID/exec \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TZAFON_API_KEY" \
-d '{}'