Confluye
Endpoints

Workers

Status, doctor, smoke tests, n8n bundle import, and local AI CLI sessions.

Worker and readiness endpoints under /api/v1/workers. Unless noted, send Authorization: Bearer (any valid API key scoped to the workspace). Session twins under /api/workers/* use the app cookie and workspaceId query or body.

Wrong or missing bearer → 401 { error: "Valid bearer API key is required" }. Session calls without workspace access → the workspace-auth error for that action.

Endpoints

MethodPathDescription
GET/api/v1/workers/statusPublic worker status
GET/api/v1/workers/doctorCompact platform doctor
POST/api/v1/workers/smoke-testTemporary safe deployment smoke
POST/api/v1/workers/n8n/import-bundleImport server bundle JSON or path
POST/api/v1/workers/n8n/smoke-testImported n8n bundle smoke + audit
POST/api/v1/workers/n8n/credentials/bootstrap-from-envCreate missing n8n-mapped credentials from env
POST/api/v1/workers/n8n/subflows/import-originalsImport original n8n child JSON
POST/api/v1/workers/luminai/smoke-testLuminAI alias of n8n smoke
POST/api/v1/workers/luminai/credentials/bootstrap-from-envLuminAI credential bootstrap
POST/api/v1/workers/luminai/subflows/import-originalsLuminAI subflow import
POST/api/v1/workers/local-ai-cli/sessionprepare / verify / disconnect
POST/api/v1/workers/local-ai-cli/loginStart CLI login
POST/api/v1/workers/local-ai-cli/callbackFinish browser login
POST/api/v1/workers/local-ai-cli/tokenClaude Code token capture
GET/api/v1/workers/local-ai-cli/modelsDiscovered CLI models

Status

GET /api/v1/workers/status?now= optional ISO timestamp (invalid → 400). Returns { status } from toPublicWorkerStatus: queue (direct | bullmq, queueName: "workflow-runs", workerConcurrency, optional counts, error), persistence, database, scheduler, health, localAiCli, managedWorkspaces, agentRuntime, sideEffectTransports (no envVar), deployment (labels, not env names), run counters, recentRuns, latestSmokeTest, checkedAt.

Doctor

GET /api/v1/workers/doctor?now=&bundlePath=. Returns { doctor } compact: status, workspaceId, checkedAt, source, appUrl, persistence/database, queue subset, scheduler subset, workerHealth, deployment missing lists, localAiCli, managedWorkspaces, agentRuntime, n8nBundle, blockers, warnings, nextActions. Connection strings and env var names are stripped.

Smoke test

POST /api/v1/workers/smoke-test

FieldTypeEffect
targetWorkflowIdstringAudit only; temp workflow still runs
useQueuebooleanForce queue or inline
waitForWorkerMsnumberHow long to wait for a queued temp run

Envelope { smokeTest }. HTTP 200 passed, 202 attention, 500 failed.

The wait is bounded to 30 seconds. An accepted run can remain queued or active after the response. Until a terminal state is positively observed, cleanup.scheduleDeleted and cleanup.workflowDeleted remain false and cleanup.retainedWorkflowReason explains retention. This also applies if reading the accepted run fails. Keep both resources: the schedule is the run's execution principal. Use the returned runId to inspect that same execution, then remove the retained temporary schedule and workflow after it succeeds, fails or is canceled.

n8n smoke: POST /api/v1/workers/n8n/smoke-test { bundlePath?, useQueue?, waitForWorkerMs? } → { importedWorkflowSmokeTest } with the same status codes. Includes persistence.durable.

n8n bundle

POST /api/v1/workers/n8n/import-bundle { importBundleJson?, bundlePath? } → 201 import result + doctor. 400 on parse/import failure.

POST /api/v1/workers/n8n/credentials/bootstrap-from-env { bundlePath? } → { bootstrap, doctor } (public bootstrap: created/skipped counts, no secret values). 400 on bootstrap error.

POST /api/v1/workers/n8n/subflows/import-originals { importJson? \| importBundleJson } → 201 { importResult, doctor }.

Local AI CLI

Session POST body { action?, kind? }. action default verify; allowed prepare, verify, disconnect. kind optional claudeCode | codexCli. Returns { session: { workspaceId, ...public readiness } }.

Login: { kind } required. Callback: { callbackUrl } required. Token: { kind: "claudeCode", token } only. Models: ?kind= (400 if invalid). Persistence failure after a successful verify → 500.

Session HTTP copies: /api/workers/status, /doctor, /smoke-test, /n8n/*, /luminai/*, /local-ai-cli/*.

Next steps