1. Reference
  2. Operator API

The operator serves a REST API next to its UI, at http://127.0.0.1:7435/api/v1. It can do what the UI and the ava command do.

curl -X POST http://127.0.0.1:7435/api/v1/runs \
  -H "Content-Type: application/json" \
  -d '{"workflow_selector": "flow.py::process_invoice", "input_json": "{\"text\": \"Invoice 42\"}"}'

Interactive documentation is served by the operator itself at /api/docs, and the OpenAPI document at /api/openapi.json.

Like the UI, the API has no sign-in. See Self-hosting.

​
Workflows

MethodPathDoes
GET/v1/flowsLists workflows
POST/v1/flows/{workflow_selector}/scheduleTurns a schedule on or off. Body: {"enabled": true, "input_json": "..."}

​
Runs

MethodPathDoes
POST/v1/runsStarts a run. Answers 202.
GET/v1/runsLists runs. Filter with workflow_selector.
GET/v1/runs/{run_id}A run’s state, step by step
GET/v1/runs:resolveFinds a keyed run by workflow_selector and key_fields
POST/v1/runs/{run_id}/cancelCancels a run
GET/v1/runs/{run_id}/resultThe result
GET/v1/runs/{run_id}/outputThe raw output
GET/v1/runs/{run_id}/activityLogs and agent activity. Filter with node_id.
GET/v1/runs/{run_id}/evaluationsEvaluation answers
GET/v1/runs/{run_id}/linksParent and child runs

​
Waits

MethodPathDoes
GET/v1/runs/{run_id}/waitsWhat the run is waiting for
POST/v1/runs/{run_id}/events/{key}Sends an event
POST/v1/runs/{run_id}/decisions/{node}Submits an approval. Body: {"outcome": {...}, "reason": "..."}

Both POST routes need an Idempotency-Key header.

​
State machines

MethodPathDoes
GET/v1/runs/{run_id}/machineThe machine’s current state
GET/v1/runs/{run_id}/machine/historyIts transitions
GET/v1/runs/{run_id}/machine/entries/{entry}One state entry
GET/v1/runs/{run_id}/machine/entries/{entry}/eventsThe events of one state entry
POST/v1/runs/{run_id}/machine/events/{name}Sends an event. Needs Idempotency-Key.
POST/v1/runs/{run_id}/machine/entries:retryRetries an interrupted state

​
Shapes

Request bodiesJSON, up to 4 MiB
Errors{"error": {"code": "...", "message": "..."}}
Field namessnake_case