Operion LogoOperion
Reference

HTTP API

Every route operion serve answers, with authentication, tenant and status codes

All routes are served by operion serve on one port, 9091 by default.

Authentication and tenant

Every route under Workflows, Executions, Catalog and Platform needs Authorization: Bearer <token>, with the token given to serve as OPERION_API_TOKEN. Without it the answer is 401 with WWW-Authenticate: Bearer.

Workflow and execution routes also need X-Tenant-Id. Without it the answer is 400, and a workflow or execution of another tenant answers 404. See tenants.

Errors on these routes are application/problem+json:

{"type": "about:blank", "title": "Not Found", "status": 404, "detail": "workflow not found", "instance": "/workflows/0f9a..."}

Workflows

RouteDescription
POST /workflowsCreate a workflow for the tenant from the workflow JSON. It is always stored as a draft. 201 with the workflow, 400 when name or description is missing or workflow_group_id is not a UUID, 404 when workflow_group_id is not a group of the tenant
GET /workflowsList the tenant's workflows
GET /workflows/:idGet a workflow
POST /workflows/:id/publishValidate the workflow and publish it. 200 with the workflow, 422 with every problem found
POST /workflows/:id/unpublishTurn the published workflow off: its triggers stop and its schedules are dropped, executions already running or waiting finish. 200 with the workflow, 409 when it is not published
GET /workflows/:id/executionsList the workflow's executions, newest first. ?limit= from 1 to 500, default 50

Executions

RouteDescription
GET /executions/:idGet an execution with its status and node results
POST /executions/:id/nodes/:node_id/resumeContinue a waiting node now. A JSON object in the body becomes the node's data; without a body the node sends on what it held. A remote node waiting for its callback takes its answer, {"port": "<output>", "data": {...}}. 202, 400 for a remote node without port, or 409 when the node is not waiting or was already resumed

Catalog

RouteDescription
GET /catalog/eventsList the catalog events with key, name, description and schema

Platform

These routes manage what all tenants share and take no tenant header.

RouteDescription
PUT /platform/event-definitions/:keyRegister or replace an event definition. 400 when a required field is missing or invalid
GET /platform/event-definitions/:keyGet an event definition
PUT /platform/node-types/:idRegister or replace a remote node type. The answer leaves out secret
GET /platform/node-types/:idGet a remote node type, without secret

Open routes

These need no token.

RouteDescription
POST /webhooks/:tenant/*Start the tenant's published workflows whose webhook trigger listens on the rest of the path. 202 with {"executions": [...]}, 404 when none listens, 400 when the body is not JSON
POST /callbacks/:execution_id/:node_id/:tokenThe callback_url a remote node answers through. 202, 400, 404 or 409
GET /livezLiveness, 200 while the process serves HTTP
GET /readyzReadiness, 200 when Postgres answers a ping within a second, 503 otherwise