Documentation Index
Fetch the complete documentation index at: https://docs.katakate.org/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint: POST /api/v1/sandboxes/{name}/exec
curl -X POST "$BASE/api/v1/sandboxes/my-sandbox/exec?namespace=default" \
-H "X-API-Key: $K7_API_KEY" \
-H "Content-Type: application/json" \
-d '{"command": "echo Hello"}'
{
"data": {
"exit_code": 0,
"stdout": "Hello\n",
"stderr": "",
"duration_ms": 12
}
}
Semantics
exit_code: 0 on success, non-zero when the command fails.
stdout/stderr: Raw streams captured from the process; may include newlines.
duration_ms: Client-observed duration including stream lifecycle.
Examples
curl -X POST "$BASE/api/v1/sandboxes/my-sandbox/exec?namespace=default" \
-H "Authorization: Bearer $K7_API_KEY" \
-H "Content-Type: application/json" \
-d '{"command": "apk add --no-cache curl && curl -I https://example.com"}'
Error example (non-zero exit):
{
"data": {
"exit_code": 2,
"stdout": "",
"stderr": "some error...",
"duration_ms": 37
}
}