API Reference
The Exekra Orchestrator exposes a REST API over HTTPS. All endpoints (except those marked Public) require authentication via a JWT token stored in an HTTP-only cookie.
| Property | Value |
|---|---|
| Base URL | https://{orchestrator-host}:{port}/api |
| Content-Type | application/json |
| Authentication | JWT token in `token` cookie |
| Rate Limit | 100 requests per minute per client |
Authentication
/api/auth/loginPublicAuthenticate a user and receive a session token.
{
"email": "[email protected]",
"password": "securepassword"
}{
"user": {
"id": "clx1abc2300001",
"email": "[email protected]",
"name": "Admin User",
"role": "ADMIN"
}
}Sets cookie: token (HttpOnly, Secure, SameSite=Lax, 7-day expiry). Returns 401 on invalid credentials.
/api/auth/registerAuthenticated (ADMIN)Register a new user. Role defaults to OPERATOR if not specified.
{
"email": "[email protected]",
"password": "securepassword",
"name": "Jane Developer",
"role": "DEVELOPER"
}/api/auth/logoutAuthenticatedEnd the current session. Clears the token cookie.
/api/auth/meAuthenticatedGet the current authenticated user.
Executions
/api/executionsAuthenticated (ADMIN, DEVELOPER, OPERATOR)Create a new execution (trigger a workflow run). Requires a published version.
{
"workflowId": "clx1wf0001"
}{
"execution": {
"id": "clx1exec001",
"workflowId": "clx1wf0001",
"workflow": { "id": "clx1wf0001", "name": "Invoice Processing" },
"runnerId": null,
"triggeredBy": "clx1abc2300001",
"versionId": "clx1ver001",
"status": "QUEUED",
"logs": null,
"startedAt": null,
"completedAt": null,
"createdAt": "2025-01-15T10:00:00.000Z"
}
}/api/executionsAuthenticatedList executions with optional filters.
| Parameter | Type | Description |
|---|---|---|
| workflowId | string | Filter by workflow |
| runnerId | string | Filter by runner |
| status | string | QUEUED, ASSIGNED, RUNNING, COMPLETED, FAILED, STOPPED |
| page | number | Page number (default: 1) |
| limit | number | Items per page (default: 50) |
| from / to | string | ISO 8601 date range |
/api/executions/statsAuthenticatedGet aggregate execution counts (total, queued, running, completed, failed, stopped).
/api/executions/:idAuthenticatedGet a single execution by ID.
/api/executions/:id/statusPublic (Runner)Update execution status. Called by runners to report progress.
{
"status": "COMPLETED",
"logs": "[2025-01-15T10:00:05Z] Starting workflow...\n...",
"metrics": {
"cpuAvg": 35.2,
"cpuPeak": 78.5,
"memAvgMB": 512,
"memPeakMB": 1024
}
}Runners
/api/runners/registerAuthenticated (ADMIN)Register a new runner. Returns machine credentials (secret shown only once).
{
"name": "PROD-Runner-01",
"type": "UNATTENDED"
}{
"id": "clx1runner01",
"name": "PROD-Runner-01",
"machineKey": "FC-a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"machineSecret": "e5f6a1b2c3d4...64 hex chars...",
"type": "UNATTENDED"
}/api/runners/authenticatePublicAuthenticate with machine credentials and receive a JWT token (24h expiry).
{
"machineKey": "FC-a1b2c3d4...",
"machineSecret": "e5f6a1b2c3d4..."
}/api/runners/heartbeatPublicSend heartbeat with metrics. Sets runner status to ONLINE. TTL: 120 seconds.
{
"machineKey": "FC-a1b2c3d4...",
"machineSecret": "e5f6a1b2c3d4...",
"ipAddress": "10.0.1.50",
"metrics": {
"cpu": 45.2,
"memTotalMB": 16384,
"memUsedMB": 8192,
"memUsage": 50.0
}
}/api/runners/pollPublicPoll for assigned work. Returns hasWork: false if no assignment, or the execution with graphJson if work is available.
{
"hasWork": true,
"execution": {
"id": "clx1exec001",
"workflowId": "clx1wf0001",
"workflowName": "Invoice Processing",
"graphJson": "{\"nodes\":[...],\"edges\":[...]}"
}
}/api/runners/executionsPublicCreate execution directly from an attended runner. Execution created with status RUNNING (bypasses queue).
/api/runners/processesPublicGet all published workflows available for execution on this runner.
/api/runnersAuthenticatedList all runners. Filter by status (ONLINE, OFFLINE, BUSY) or type (ATTENDED, UNATTENDED).
/api/runners/:id/regenerate-secretAuthenticated (ADMIN)Generate a new machine secret. Invalidates the previous secret immediately.
/api/runners/:idAuthenticated (ADMIN)Delete a runner registration.
Workflows
/api/workflowsAuthenticated (ADMIN, DEVELOPER)Create a new workflow.
{
"name": "Invoice Processing",
"description": "Processes incoming invoices from the shared mailbox"
}/api/workflowsAuthenticatedList all workflows. Supports page and limit query parameters.
/api/workflows/:idAuthenticatedGet a single workflow with its versions, triggers, and execution count.
/api/workflows/:idAuthenticated (ADMIN, DEVELOPER)Update workflow name or description.
/api/workflows/:idAuthenticated (ADMIN)Delete a workflow and all its versions (cascade).
/api/workflows/:id/draftAuthenticated (ADMIN, DEVELOPER)Save a draft version. Each save creates a new version with auto-incremented number.
{
"graphJson": "{\"nodes\":[...],\"edges\":[...]}",
"metadata": "Added browser opening step"
}/api/workflows/:id/publishAuthenticated (ADMIN, DEVELOPER)Publish the latest draft. Supersedes any previously published version. Returns 400 if no draft exists.
/api/workflows/:id/versionsAuthenticatedList all versions of a workflow (drafts and published).
/api/workflows/:id/versions/latestAuthenticatedGet the latest version (may be a draft).
Triggers
/api/triggersAuthenticated (ADMIN, DEVELOPER)Create a trigger for a workflow.
{
"workflowId": "clx1wf0001",
"type": "SCHEDULE",
"config": "{\"cron\": \"0 9 * * 1-5\"}",
"enabled": true
}{
"workflowId": "clx1wf0001",
"type": "WEBHOOK",
"config": "{}",
"enabled": true
}/api/triggersAuthenticatedList all triggers. Supports page and limit query parameters.
/api/triggers/:idAuthenticated (ADMIN, DEVELOPER)Update trigger config or enabled status. Schedule triggers are rescheduled automatically.
/api/triggers/:idAuthenticated (ADMIN)Delete a trigger. Stops the cron job if it is a schedule trigger.
/api/triggers/webhook/:idPublicInvoke a webhook trigger. Validates the trigger exists, is type WEBHOOK, and is enabled.
{
"success": true,
"executionId": "clx1exec003"
}System
/api/statusPublicCheck system state: UNACTIVATED, ACTIVATED, BOOTSTRAPPED, or OPERATIONAL.
/api/healthPublicHealth check. Returns status: ok with a timestamp.
/api/license/activatePublicActivate the platform license. Requires system state UNACTIVATED.
/api/license/statusAuthenticatedGet license status: activated flag, status (ACTIVE/GRACE_PERIOD/EXPIRED/INVALID), limits, and days remaining.
/api/license/validateAuthenticated (ADMIN)Force revalidation of the current license.
/api/usersAuthenticated (ADMIN)List all registered users. Supports page and limit query parameters.
/api/analytics/process-performanceAuthenticatedGet per-workflow performance metrics including execution counts, success/failure rates, CPU/memory averages, and duration.