Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Admin API

All admin endpoints are under /api/v1/admin/. When admin authentication is enabled, requests must include a valid bearer token or API key.

Channels

MethodPathDescription
POST/api/v1/admin/channelsCreate channel (as draft)
GET/api/v1/admin/channelsList channels. Filter with ?status=, ?channel_type=, ?protocol=
GET/api/v1/admin/channels/{id}Get channel by ID
PUT/api/v1/admin/channels/{id}Update draft channel
DELETE/api/v1/admin/channels/{id}Delete channel (all versions)
PATCH/api/v1/admin/channels/{id}/statusChange status (active/archived)
GET/api/v1/admin/channels/{id}/versionsList channel version history
POST/api/v1/admin/channels/{id}/versionsCreate new draft version from active channel
POST/api/v1/admin/channels/importBulk import channels (as drafts). ?dry_run=true validates without writing

Workflows

MethodPathDescription
POST/api/v1/admin/workflowsCreate workflow (as draft; optional id field for custom IDs)
GET/api/v1/admin/workflowsList workflows. Filter with ?tag=, ?status=
GET/api/v1/admin/workflows/{id}Get workflow by ID
PUT/api/v1/admin/workflows/{id}Update draft workflow
DELETE/api/v1/admin/workflows/{id}Delete workflow (all versions)
PATCH/api/v1/admin/workflows/{id}/statusChange status (active/archived)
GET/api/v1/admin/workflows/{id}/versionsList workflow version history
POST/api/v1/admin/workflows/{id}/versionsCreate new draft version from active workflow
PATCH/api/v1/admin/workflows/{id}/rolloutUpdate rollout percentage
POST/api/v1/admin/workflows/{id}/testDry-run on sample payload
POST/api/v1/admin/workflows/importBulk import workflows (as drafts). ?dry_run=true validates without writing
GET/api/v1/admin/workflows/exportExport workflows. Filter with ?tag=, ?status=
POST/api/v1/admin/workflows/validateValidate workflow definition

Connectors

MethodPathDescription
POST/api/v1/admin/connectorsCreate connector. String fields may use env://VAR_NAME to pull values from the process environment
GET/api/v1/admin/connectorsList connectors (secrets masked)
GET/api/v1/admin/connectors/{id}Get connector by ID (secrets masked)
PUT/api/v1/admin/connectors/{id}Update connector
DELETE/api/v1/admin/connectors/{id}Delete connector
POST/api/v1/admin/connectors/importBulk import connectors. ?dry_run=true validates without writing
POST/api/v1/admin/connectors/reloadReload all connectors from DB
GET/api/v1/admin/connectors/circuit-breakersList circuit breaker states
POST/api/v1/admin/connectors/circuit-breakers/{key}Reset a circuit breaker

Engine

MethodPathDescription
GET/api/v1/admin/engine/statusEngine status (version, uptime, workflows count, channels)
POST/api/v1/admin/engine/reloadHot-reload channels and workflows

Functions

MethodPathDescription
GET/api/v1/admin/functionsList every task function with its input-field schema (category, type, required flag, description). Used by CLI tools and IDEs for autocompletion and by workflow validators to give field-pathed errors

Audit Logs

MethodPathDescription
GET/api/v1/admin/audit-logsList audit log entries. Filter with ?action=, ?resource_type=

Backups

MethodPathDescription
POST/api/v1/admin/backupsCreate a database backup (SQLite only — VACUUM INTO a timestamped file in storage.backup_dir)
GET/api/v1/admin/backupsList backup files currently in storage.backup_dir

Lifecycle

Both channels and workflows follow a draft → active → archived lifecycle:

  1. Create: entities are created as draft (not loaded into the engine)
  2. Update: only draft versions can be updated via PUT
  3. Activate: PATCH /status with {"status": "active"} loads the entity into the engine
  4. New version: POST /versions creates a new draft version from the active entity
  5. Archive: PATCH /status with {"status": "archived"} removes from the engine

A channel links to a workflow via workflow_id. Activating a channel makes it available for data processing; activating a workflow makes its logic available to the engine.

Authentication

Admin API endpoints support bearer token or API key authentication when enabled:

# Bearer token (default header: Authorization)
curl -H "Authorization: Bearer your-secret-key" \
  http://localhost:8080/api/v1/admin/workflows

# API key via custom header
curl -H "X-API-Key: your-secret-key" \
  http://localhost:8080/api/v1/admin/workflows

Configure via [admin_auth] in config or ORION_ADMIN_AUTH__ENABLED=true environment variable.

Error Response Format

All error responses follow a consistent structure:

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Workflow with id '...' not found"
  }
}
CodeHTTP StatusDescription
NOT_FOUND404Resource not found
BAD_REQUEST400Invalid input
UNAUTHORIZED401Missing or invalid credentials
FORBIDDEN403Access denied
CONFLICT409Duplicate or conflicting state
RATE_LIMITED429Too many requests
TIMEOUT504Workflow execution exceeded timeout
SERVICE_UNAVAILABLE503Backpressure or circuit breaker open
UNSUPPORTED_MEDIA_TYPE415Invalid content type
INTERNAL_ERROR500Internal server error

When a workflow, channel, or connector fails strict validation on create/update, the envelope is extended with a details array of field-pathed errors (kept omitted for single-message errors so v0.1 clients aren’t broken):

{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Workflow validation failed",
    "details": [
      { "field": "tasks[0].function.input.connector", "message": "is required" },
      { "field": "tasks[2].function.input.method",    "message": "expected string, got number" }
    ]
  }
}

The field path mirrors the JSON structure the API received, so editors can jump straight to the failing key. The same envelope is returned by POST /workflows/validate, POST /workflows/{id}/test, and the orion-server lint / dry-run CLI subcommands.