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).

当前语言暂无代码示例

参数

FieldTypeReqDefaultDescription
stringN—
stringN—

请求体

FieldTypeReqDefaultDescription
commandstring[]Y—
timeoutMsintegerN10000Synchronous wait window; longer work must be polled via the 202 handle.
streamboolean (false)N—Gate A supports non-streaming exec only.

Try it out

Sign in to use your API key
Request Body
Response
Click Execute to test