HeadlessOps
API Reference

Runs API

Trigger and monitor integration run executions

Runs API

Endpoints

POST /api/integrations/:name/runs

Trigger a manual run for an integration.

Auth: API Key | Min Role: DEVELOPER | MCP: runs:write

Body: { "payload": { "key": "value" } } (optional)

Response: 202 { "runId": "run_abc123" }


GET /api/runs

List runs for the workspace with pagination.

Auth: API Key | Min Role: VIEWER | MCP: runs:read

Query parameters:

ParameterDescription
statusPENDING | RUNNING | SUCCEEDED | FAILED | CANCELLED
integrationIdFilter by integration ID
searchFull-text search on integration name, error message, trigger type
dateFromISO date string — filter runs started on or after this date
dateToISO date string — filter runs started on or before this date
pagePage number (default: 1)
limitItems per page, max 100 (default: 20)

Response: { "runs": [...], "total": 42, "page": 1, "limit": 20 }


GET /api/runs/:runId

Get run detail including step logs.

Auth: API Key | Min Role: VIEWER | MCP: runs:read

Response: Run object with stepLogs array.


GET /api/runs/:runId/steps

Get step events for a run.

Auth: API Key | Min Role: VIEWER | MCP: runs:read

Query: outputPath (optional) — absolute server path to write the response if >40KB.

Response: { "steps": [...] }


GET /api/runs/:runId/stream

Server-sent events (SSE) stream for real-time run progress.

Auth: API Key | Min Role: VIEWER

Response: text/event-stream

Run Status Values

StatusDescription
PENDINGRun is queued but not yet started
RUNNINGRun is currently executing
SUCCEEDEDAll steps completed successfully
FAILEDOne or more steps failed without an error handler
CANCELLEDRun was manually cancelled