Run one command in a computer
Changed onGive exactly one of command (run by /bin/sh -c) and argv. Output is text with stdout and stderr merged. With stream true (the default) the response is newline-delimited JSON events: start, output, keepalive, exit. With stream false the output is collected into one JSON result, cut at 8 MiB and marked truncated. timeoutSeconds bounds the run time (at most 3600) and is reported as timedOut with exit code -1. The command is killed when the client disconnects; start long-lived processes with setsid nohup.
Request
- Base URLhttps://api.steel.dev
- URLhttps://api.steel.dev/v1/computers/{id}/exec
- Auth
- API key in header steel-api-key
- or none
Path parameters
Headers
The project the computer belongs to. Required for an organization-scoped key, which binds to no project; ignored for a project-scoped key, which stays pinned to its own, and for an attach token, which carries the project of the computer it was minted for.
Request body
Response
The command ran. The content type follows the stream flag.
Changes
- info
endpoint added
- info