Create and durably persist a new run from an inline pipeline.
const url = 'https://example.com/v1/runs';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"params":{},"pipeline":{"budget":1,"interface":{},"ir_version":1,"steps":[{"command":["example"],"env":{"additionalProperty":"example"},"id":"example","image":"example","inputs":["example"],"k8s_overlay":{},"needs":["example"],"outputs":["example"],"placement_profiles":["example"],"resources":{},"retry":{},"secrets":["example"],"security":{},"services":{},"timeout":1,"uses":["example"]}]},"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/runs \ --header 'Content-Type: application/json' \ --data '{ "params": {}, "pipeline": { "budget": 1, "interface": {}, "ir_version": 1, "steps": [ { "command": [ "example" ], "env": { "additionalProperty": "example" }, "id": "example", "image": "example", "inputs": [ "example" ], "k8s_overlay": {}, "needs": [ "example" ], "outputs": [ "example" ], "placement_profiles": [ "example" ], "resources": {}, "retry": {}, "secrets": [ "example" ], "security": {}, "services": {}, "timeout": 1, "uses": [ "example" ] } ] }, "reason": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”POST /v1/runs body: an inline pipeline to run immediately, plus any launch
parameters (ADR-0043) declared by the pipeline’s interface.
object
Supplied launch parameters, name → value (ADR-0043). Resolved against
pipeline.interface.inputs at creation: coerced to the declared types,
defaults applied, validated fail-closed. Absent = none supplied.
object
The inline pipeline (IR subset).
object
Opt-in run budget in seconds (ADR-0047): the run fails once its active time (gate-suspended time excluded) exceeds this. No default.
The pipeline’s launch/reuse interface (ADR-0038, 0043) — its declared
typed parameters (inputs) and exposed outputs. Carried as the pure
scarab_pipeline::Interface (opaque object in the schema; the pure crate
cannot derive ToSchema). Absent = no parameters.
object
IR schema version (ADR-0022).
One step (IR subset): the step contract is an OCI image + command.
object
object
Explicit input workspaces (ADR-0007): the subset of needs whose output
workspace this step consumes. Absent = implicit-by-default (inherit every
need’s workspace). Naming a subset both restricts what flows in and
sharpens restart invalidation — the skip-if-unchanged signature is then
computed over exactly these inputs (mirrors scarab_pipeline::StepSpec).
Governed raw pod-spec overlay (ADR-0055). Carries no authority; an inline API run targets no Environment, so any overlay is rejected fail-closed.
object
Explicit output workspace paths (ADR-0007): the workspace-relative paths
this step publishes downstream. Absent = the whole workspace. A declared
path the step did not produce fails the step (fail-closed), so this is a
contract, not a filter (mirrors scarab_pipeline::StepSpec).
PlacementProfile names this step runs on (ADR-0055); their admin-defined k8s overlays merge onto the Pod in listed order. Empty = the default profile.
Requested compute resources (ADR-0055): exact cpu_millis/memory_mib.
object
Opt-in retry policy {on, max} (ADR-0047). ⚠ At-least-once: retry
re-runs the whole step at-least-once; enable only if the step is
idempotent or fenced against a cooperating sink. Never-started infra
failures auto-retry regardless.
object
Secret keys to resolve and inject at launch (ADR-0037).
Privilege escalation requested above the hardened baseline (ADR-0039).
On an inline API run only the self-service run_as_root grant is admitted
(it stays inside the sandbox); governed grants (add-capabilities /
privileged) require a target Environment and are rejected fail-closed.
object
Sidecar services (ADR-0058): throwaway backing containers co-located in
this step’s Pod, reachable at localhost:<port>, with an optional
readiness probe gating the step’s main container start.
object
Per-step execution deadline in seconds (ADR-0047). Absent = the global
default (1h). Exceeding it is a Timeout failure.
Shared-service opt-in (ADR-0058): names of pipeline-level shared services
this step reaches over the network (DNS <name>:<port> + readiness gate).
Optional caller-supplied reason for this inline run (ADR-0057 §3),
stamped as the run Headline (trigger_title) for this api-style
dispatch. Accepted and stamped verbatim, no requiredness check. Absent =
no headline.
Examplegenerated
{ "params": {}, "pipeline": { "budget": 1, "interface": {}, "ir_version": 1, "steps": [ { "command": [ "example" ], "env": { "additionalProperty": "example" }, "id": "example", "image": "example", "inputs": [ "example" ], "k8s_overlay": {}, "needs": [ "example" ], "outputs": [ "example" ], "placement_profiles": [ "example" ], "resources": {}, "retry": {}, "secrets": [ "example" ], "security": {}, "services": {}, "timeout": 1, "uses": [ "example" ] } ] }, "reason": "example"}Responses
Section titled “Responses”Run created
object
Examplegenerated
{ "id": "example", "status": "example"}