Skip to main content
In plain terms: use these calls to check on a run you started: is it done, what did it produce, what failed. They also let you search past runs, restart or recover one, and manage the waiting line of runs.
An execution is one run of a workflow, identified by the executionId that the start call returns. These endpoints observe a run, end it, restart it, and manage the queue that decides when runs begin. Pause, resume and per-node controls are on the Control page, and live updates are on the Streams page. Responses use the envelope, except the results read, which returns its object directly. For an unknown execution, or one that belongs to another session, every call answers 404.

Search runs

GET /api/executions Finds runs across all sessions, or in one session, newest first. Response data: an array of hits. The search reads each session’s history, which keeps the newest yukta.execution-log.retained-runs runs (default 500).

Count the runs that need attention

GET /api/executions/counts?hours={n} Counts runs across all sessions: those RUNNING and QUEUED now, and those with status FAILURE that started in the last hours (default 24). Each session’s history is bounded by yukta.execution-log.retained-runs. Response data: running, queued and failed.

Get the status of a run

GET /api/executions/{executionId} Returns a snapshot of the run: its status and a status for every node. Response data GET /api/executions/{executionId} resolves a run from the execution index, which keeps a finished run for 10 minutes (yukta.tracker.cleanup-ttl). To read an older run that is still in its session’s history, add the session: GET /api/executions/{executionId}?sessionId={sessionId}, which also checks that the run belongs to that session.

Read the result of a run

GET /api/sessions/{sessionId}/executions/{executionId}/results Returns what the terminal nodes of the run have received so far. Use it when you want the outcome of a run without holding a stream open. To follow a run live, use the results stream. This endpoint returns the object below directly, without the envelope. Each event has a kind: RESULT when a message reached a terminal node (with the message in payload), NODE_END when a terminal node finished, and EXECUTION_END as the last event. It also carries nodeId (absent on EXECUTION_END), sequence (position in the run’s stream from 0), status (on the end events), truncated (on the end events) and timestamp. Results are kept per run for yukta.results.retention (default 1h), up to yukta.results.retained-events events per run (default 1000) and yukta.results.max-executions runs (default 200).

List the runs a run started

GET /api/executions/{executionId}/tree The run and every run it started as a sub-workflow, at any depth, oldest first. Each entry is a history entry: executionId, workflowId, status, startTime, endTime, parentExecutionId, rootExecutionId and restartOf. Answers 404 for an unknown run.

Read what a run was started with

GET /api/executions/{executionId}/start-payload The start payload that ${start.…} in a node’s config reads, taken from the run’s start in the execution log: {"payload": {...}}. Text under a key whose name says it holds a secret (password, token, API key and the like), at any depth, is replaced by ******, and the engine’s own yukta.* entries are left out. payload is null once the log no longer holds the run (yukta.execution-log.retained-runs). Answers 404 for an unknown run. The web UI uses it to show, under a node’s config, what each ${start.…} resolved to.

Read part of a node’s output

GET /api/executions/{executionId}/nodes/{nodeId}/output Returns numbered lines of what one node wrote, so a client does not have to stream the whole log. Query parameters: tail, head and offset exclude each other. The answer holds lines (number from 1 in the stream, and text, cut at 2000 characters), totalLines and totalBytes of the stream, matchedLines (the lines selected before the window was cut), truncated, and nextOffset for the next page (absent on the last page and for tail and head). A 10,000 line node is read in pages of 50 with offset, or only its errors with grep=ERROR. Answers 400 for a bad argument and 404 for an unknown run or node. The same slicing is available as yukta-cli logs <session> <execution> --node N and as the MCP tool get_node_output.

Why a run failed

GET /api/executions/{executionId}/digest Read this before any log. The answer holds the run’s status, whether it has completed (a running run gets what failed so far), runsSearched (the run and its failed sub-runs), failedNodes (at most 10, each with executionId, nodeId, module, status of FAILURE or TIMED_OUT, error cut at 300 characters, lines and errorLines), findings (the failures recognised in their output: tests, compile errors, lint violations and tasks, each with kind, executionId, nodeId, name, location as file:line, message and line, its first line in the node’s output; findingsOmitted counts those left out to keep the answer small) and next, the reads that show more. Each next entry has a kind (NODE_OUTPUT, read a node near offset, or SEARCH, search the logs), the run, the node, and why. Answers 404 for an unknown run. The same answer is available as yukta-cli digest <execution-id> and as the MCP tool get_failure_digest.

Search the logs of a run

GET /api/executions/{executionId}/logs/search Searches the logs of one run, and of the runs it started with includeChildren=true. Query parameters: LINES answers within maxMatches and 16 KB. The answer holds mode, executionsScanned, linesScanned, matches, nodes (counts per node, the nodes with most matches and errors first, at most 50, with nodesOmitted), lines (each with executionId, nodeId, sequence, stream, level, match and text cut at 2000 characters), truncated, nextCursor (null on the last page) and a hint for the cheapest next search. Answers 400 for a bad argument and 404 for an unknown run. The same search is the MCP tool search_logs.

Stop a run

POST /api/executions/{executionId}/stop Stops one run; with ?tree=true also every unfinished run it started as a sub-workflow, at any depth. ?mode=DRAIN (default), CANCEL or KILL picks how it ends, as for stopping a workflow. To stop every active run of a workflow, use POST /api/workflow/{sessionId}/{workflowId}/stop. Response data: executionId of the stopped run.

Restart a run

POST /api/executions/{executionId}/restart Stops the run if it is still active and starts the workflow again with the original trigger payload. The new run gets a new id. Response data: executionId of the new run.

Restart from a node

POST /api/executions/{executionId}/restart/{fromNodeId} Starts a new run from one node. The nodes before it replay their last recorded output; the node and everything behind it run again. The response is the same as for a full restart. Errors: 404 if the run is unknown or no longer restartable. 400 if the node is not in the workflow, or if the run is still active and a node before the chosen one has not finished. To restart from a node that failed, you can also use the retry endpoint.

Recover an aborted run

POST /api/executions/{executionId}/recover Continues a run that a server restart aborted, as a new run. Nodes that finished are replayed from their recorded output and the rest run again. It needs the execution log and checkpoints to be kept in PostgreSQL; see Checkpoints and resume. Response data: executionId of the new run. Errors: 409 if the run was not aborted, was already recovered, has no recorded start payload, its workflow changed since it started, or every node had already finished. 404 if the run or its workflow no longer exists.

Change the priority of a queued run

POST /api/executions/{executionId}/priority?priority={n} Changes the priority of a run that waits for an execution slot. Higher values are admitted first; the run moves behind the queued runs of equal or higher priority. Response data: executionId. Errors: 400 unless the run is waiting for a slot.

Read the execution limits

GET /api/scheduler/limits Response data: maxConcurrent and maxPerWorkflow as in force (0 means no limit, whether set at startup or by the last POST), running (runs holding a slot now), queued (starts waiting for a slot now) and queueCapacity (how many starts may wait).

Change the execution limits

POST /api/scheduler/limits?maxConcurrent={n}&maxPerWorkflow={n} Changes how many runs may execute at once on the running server. Raising a limit admits waiting starts immediately. Lowering it lets running runs finish and holds new starts back. The yukta.execution.* settings themselves are not changed. See Admission and limits. Response data: maxConcurrent and maxPerWorkflow as set. A supervisor that refuses the command makes the call answer 403.

Drain the server

Use a drain to swap the server without cutting off runs. While it is on, new starts are refused with 429 and the runs already going carry on. Response data: draining, running, queued and idle, which is true once nothing runs or waits. Poll GET until idle is true, then swap the server.

Next steps

Control API

Pause, resume and steer a running execution and its nodes, send signals, and use the control bus and its audit log.

Streams API

Follow a run live over server-sent events: status, logs, results and the server-wide event feed.

Executions

The life of one run: its statuses, how they change, what you can read while it runs and what you get at the end.

Run controls

Pause, resume, step, set breakpoints, skip, stop, restart and retry a live execution through one ordered, audited command path.