API reference
Duna includes the authoritative HTTP API reference and a generated OpenAPI document with a Scalar interface. This page is a navigation aid, not a replacement contract.
Core route index
| Method | Route | Purpose |
|---|---|---|
| POST | /definitions | Publish a process definition. |
| POST | /definitions/{key}/instances | Start an instance with initial variables. |
| GET | /instances/{id} | Read an instance snapshot. |
| GET | /instances/{id}/history | Read execution history. |
| POST | /instances/{id}/cancel | Cancel an instance under policy. |
| GET | /instances/stats | Read instance counts by status. |
| POST | /definitions/simulate | Simulate a draft. |
| POST | /evaluate | Evaluate an expression. |
| POST | /events | Deliver an event. |
| POST | /signals | Signal matching event waits. |
| POST | /agents | Publish an agent definition. |
| GET | /agents/{key} | Read an agent and its versions. |
| GET | /instances/{id}/agent-runs | Read the agent runs of an instance. |
| GET | /health/ready | Check runtime readiness. |
Publishing example
curl -i -X POST http://localhost:5218/definitions \
-H 'Content-Type: application/json' \
--data-binary @samples/order-pipeline.jsoncA successful publication returns 201 and a definition location. The server assigns the saved version. Starting an instance returns its location; inspect the actual response rather than constructing an ID.
Authentication and authorization
The development stack’s defaults are different from a secured deployment. Production clients need the authentication and permissions configured for that host. OPA evaluates protected operations and resource access. Company scoping may restrict which definitions and instances are visible.
The reference documents request bodies, status codes, concurrency behavior, idempotency and per-route policy actions. Read the exact endpoint before building an integration. The public website does not offer a proxy to the operational API.