Linea Docs

Executions

How workflow runs are created, tracked, and streamed in real time.

Executions

An Execution is a single run of a workflow. Each execution tracks status, timing, per-node results, and input/output.

Status

StatusMeaning
queuedWaiting to be picked up
runningActively executing
suspendedPaused at an approval gate or ask-human node
completedFinished successfully
failedStopped due to an error
cancelledManually cancelled
queued → running → completed
                 → failed
                 → suspended → running (on resume)
         running → cancelled

Cancellation is most reliable before execution starts. Once running, it is best-effort.

Triggering an Execution

Via the dashboard

Open any workflow and click Run in the preview panel. Results stream live.

Via the API

POST /workspaces/:wId/pods/:podId/executions
Authorization: Bearer <token>
 
{ "workflowId": "wf_abc123", "input": { "key": "value" } }

Via the SDK

See the SDK docs.

Via webhook or schedule

Executions can be triggered automatically. See Schedules & Webhooks.

API Reference

MethodPathDescription
POST/workspaces/:wId/pods/:podId/executionsTrigger a new execution (editor+)
GET/workspaces/:wId/pods/:podId/executionsList executions (?status=, ?workflowId=)
GET/workspaces/:wId/pods/:podId/executions/:idGet execution detail
GET/workspaces/:wId/pods/:podId/executions/:id/logsGet structured node logs
GET/workspaces/:wId/pods/:podId/executions/:id/eventsLive SSE stream
PATCH/workspaces/:wId/pods/:podId/executions/:id/respondResume a suspended execution
POST/workspaces/:wId/pods/:podId/executions/:id/replayReplay from start or a specific node
DELETE/workspaces/:wId/pods/:podId/executions/:idCancel (editor+)

Live Event Streaming

Connect to the SSE stream to receive real-time node updates:

GET /workspaces/:wId/pods/:podId/executions/:id/events

Event types:

{ type: 'node_update'; nodeId: string; status: 'running' | 'completed' | 'failed' | 'suspended'; output?: unknown; error?: string; durationMs?: number }
{ type: 'execution_complete'; output: unknown }
{ type: 'execution_failed'; error: string }
{ type: 'execution_suspended'; interrupt: unknown }

The stream closes automatically after 10 minutes. Use the SDK's streamEvents() to handle reconnection automatically.

Resuming Suspended Executions

When an execution is suspended at an approval gate or ask-human node, resume it with:

PATCH /workspaces/:wId/pods/:podId/executions/:id/respond
 
{ "approved": true }

Or reject it:

{ "approved": false }

Replay

Re-run a completed, failed, or cancelled execution:

POST /workspaces/:wId/pods/:podId/executions/:id/replay
 
{ "fromNodeId": "node_abc" }

Omit fromNodeId to replay from the beginning with the original input.

On this page