AI agents now work inside Duna processesSee agentic orchestration
Documentation/Test & operate

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

MethodRoutePurpose
POST/definitionsPublish a process definition.
POST/definitions/{key}/instancesStart an instance with initial variables.
GET/instances/{id}Read an instance snapshot.
GET/instances/{id}/historyRead execution history.
POST/instances/{id}/cancelCancel an instance under policy.
GET/instances/statsRead instance counts by status.
POST/definitions/simulateSimulate a draft.
POST/evaluateEvaluate an expression.
POST/eventsDeliver an event.
POST/signalsSignal matching event waits.
POST/agentsPublish an agent definition.
GET/agents/{key}Read an agent and its versions.
GET/instances/{id}/agent-runsRead the agent runs of an instance.
GET/health/readyCheck runtime readiness.

Publishing example

bash
curl -i -X POST http://localhost:5218/definitions \
  -H 'Content-Type: application/json' \
  --data-binary @samples/order-pipeline.jsonc

A 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.