All responses use the envelope.
404 is returned for an unknown session or workflow.
Get a definition
GET /api/sessions/{sessionId}/workflows/{workflowId}
Returns the workflow as stored.
Response data: workflowId, description, nodes (each with nodeId, type, config) and edges (each with source, target, sourcePort).
Get the graph
GET /api/sessions/{sessionId}/workflows/{workflowId}/graph
Returns the nodes and edges enriched with what a canvas needs to draw them, plus the order in which nodes would run.
Response data
List the runs of one workflow
GET /api/sessions/{sessionId}/workflows/{workflowId}/executions
Returns run summaries of this workflow, newest first. An empty list means the workflow has never run. It takes limit and cursor and announces more pages in the X-Next-Cursor header; see paging.
Response data: an array of run summaries.
List saved versions
GET /api/sessions/{sessionId}/workflows/{workflowId}/versions
Every change to a workflow’s definition is saved as a version. The list is newest first and holds the newest 20 versions. Applying an unchanged definition does not create a version.
Response data: an array of versions.
Compare versions
GET /api/sessions/{sessionId}/workflows/{workflowId}/versions/diff
Compares an older version with a newer one, or with the current definition.
Response
data
Errors:
404 if a version does not exist; 400 if from is missing.
Roll back to a version
POST /api/sessions/{sessionId}/workflows/{workflowId}/rollback?version={id}
Makes an earlier version the current definition. The restored definition is saved as a new version, so you can undo the rollback the same way. Runs that have already started keep the definition they use.
Response
data: workflowId and version.
Errors: 404 if the version does not exist.
Write a version note
POST /api/sessions/{sessionId}/workflows/{workflowId}/versions/note?version={id}¬e={text}
Writes a note on a saved version, for example what changed and why. A blank note clears it. The text is trimmed.
Response
data: workflowId, version and note.
Start a workflow
POST /api/workflow/start
Starts a run and returns its id at once. The run continues in the background; follow it with status or the streams. A start may wait in a queue when the execution limits are full; the run then reports QUEUED until it gets a slot.
Request body
Response
202 Accepted. data.executionId is the run id.
Errors: 404 unknown session or workflow, 400 a workflow that fails validation, 429 limit reached and no room to queue, 503 on a standby server.
Stop all runs of a workflow
POST /api/workflow/{sessionId}/{workflowId}/stop
Stops every active run of the workflow and cuts the trigger’s input stream, so no new messages arrive.
Response
data: executionIds, the runs that were signalled. To stop one run, use POST /api/executions/{executionId}/stop.
Errors: 400 for an unknown mode.
List the runs of a session
GET /api/workflow/{sessionId}/history
Returns the runs of every workflow in the session, newest first. It takes limit and cursor (see paging) and these filters. Every filter that is set must match.
Response
data: run summaries, as in the per-workflow list. How many runs the history keeps is set by yukta.execution-log.retained-runs (default 500).
Errors: 404 if the session does not exist.