Runs API

Routes to start, read, and retry runs.

Routes to start and read runs. See Run workflows with the API.

Run the published version

POST /api/v1/workflows/{id}/run

The answer is 202 and has the run id. With wait=true, the request stays open until the run ends. Then the answer is 200 and has the output of the last node. If the run does not end before the timeout, the answer is 202 and has the current status. If you send the header Idempotency-Key again, the answer gives the first run.

Path parameters

Name Type Required Notes
id UUID Yes

Query parameters

Name Type Required Notes
wait true, false No Default: false.

Body

Name Type Required Notes
input any No
nodeId string No The trigger node where the run starts. Default: the first trigger node.

Answer: 200 or 202. Fields: runId, status, output, error, warnings.

Test the draft

POST /api/v1/workflows/{id}/test

Caution: A test run uses real credentials and writes real data. Zerodot deletes test runs after the retention time for test runs.

Path parameters

Name Type Required Notes
id UUID Yes

Query parameters

Name Type Required Notes
wait true, false No Default: false.

Body

Name Type Required Notes
input any No
graph object No The graph to test. Default: the saved draft.
toNodeId string No Run only the path from the trigger to this node.

Answer: 200 or 202. Fields: runId, status, output, error, warnings.

List runs, newest first

GET /api/v1/runs

Query parameters

Name Type Required Notes
limit integer No Default: 50. Range: 1 to 100.
cursor string No Maximum length: 512.
workflowId UUID No A workflow id.

Answer: 200. Fields: items, nextCursor.

Get a run with the result of each node

GET /api/v1/runs/{id}

Path parameters

Name Type Required Notes
id UUID Yes

Answer: 200. Fields: id, workflowId, workflowName, mode, status, triggerType, createdAt, startedAt, finishedAt, triggerInput, error, results, warnings.

Retry a failed run

POST /api/v1/runs/{id}/retry

This request makes a new run with the same version and trigger input. The new run uses the saved results of the successful nodes. Only the failed node and the nodes after it run. You can retry only a failed run. wait=true operates as in the run route.

Path parameters

Name Type Required Notes
id UUID Yes

Query parameters

Name Type Required Notes
wait true, false No Default: false.

Answer: 200 or 202. Fields: runId, status, output, error, warnings.

Read the events of a run

GET /api/v1/runs/{id}/events

The answer is a stream of server-sent events. The stream ends after run.finished. To continue after a break, send the header Last-Event-ID. The browser EventSource cannot send the Authorization header. Use a different client.

Path parameters

Name Type Required Notes
id UUID Yes

Answer: 200, text/event-stream.

Change this page on GitHub