POST
/api/v1/environments/{id}/execs
Run a command in the environment
Short-command synchronous window: timeoutMs is bounded to (0, 10000] ms (default
10000). Commands that finish inside the window answer 200 with the exited result;
longer executions answer 202 with a running handle (execId) that the client polls
at GET /environments/{id}/execs/{execId} — the A1 async handle, not a tunneled RPC
timeout. stream only accepts false. Exec handles are epoch-scoped: a
wake/restore clears them, and stale execIds answer 404. Principal sessions may exec
their bound environment; each exec charges the principal budget BEFORE the command
runs (402 budget_exhausted when the hard cap is hit).
No code sample available for this language
Parameters
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| string | N | — | ||
| string | N | — |
Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| command | string[] | Y | — | |
| timeoutMs | integer | N | 10000 | Synchronous wait window; longer work must be polled via the 202 handle. |
| stream | boolean (false) | N | — | Gate A supports non-streaming exec only. |