Skip to content

API Reference — Control Plane

All public HTTP routes are listed in services/gateway-config/public-route-catalog.json and tagged with a privilege domain. This page is the index; the data-plane families have their own pages (PostgreSQL, MongoDB, Realtime, Gateway).

Base URL & versioning

All routes are under /v1 and served through the gateway:

https://<api-host>/v1/...

Authentication

MethodHeaderNotes
API keyapikey: flc_anon_… / flc_service_…Data plane; also ?apikey= for SSE
Bearer JWTAuthorization: Bearer <jwt>Operator/admin; issued by Keycloak

The tenant/workspace are resolved from the credential, in precedence order (API key → JWT → gateway headers). Invalid credentials return 401 and never fall back to headers. See Security.

Privilege domains

DomainMeaning
structural_adminLifecycle & management — requires admin/owner scope
data_accessDay-to-day data plane

Structural-admin routes

MethodPathPurpose
POST/v1/tenantsCreate a tenant
PUT/v1/tenants/{id}Update a tenant
DELETE/v1/tenants/{id}Soft-delete a tenant
POST/v1/workspacesCreate a workspace
PUT/v1/workspaces/{id}Update a workspace
DELETE/v1/workspaces/{id}Soft-delete a workspace
GET/v1/workspaces/{id}/membersList members
POST/v1/workspaces/{id}/membersAdd a member
DELETE/v1/workspaces/{id}/members/{memberId}Remove a member
GET/v1/schemasList schemas/collections
POST/v1/schemasDefine a schema/collection
PUT/v1/schemas/{id}Update a schema
DELETE/v1/schemas/{id}Drop a schema
POST/v1/functionsDeploy a function (function_deployment)
PUT/v1/functions/{id}/configConfigure a function (function_deployment)
DELETE/v1/functions/{id}Remove a function (function_deployment)
POST/v1/api-keysMint an anon/service API key
DELETE/v1/api-keys/{id}Revoke an API key
POST/v1/services/configureConfigure a backing service
PUT/v1/quotasSet quota limits

Data-access routes

MethodPathFamily
GET/POST/v1/collections/{name}/documentsData API
PUT/DELETE/v1/collections/{name}/documents/{id}Data API
POST/v1/collections/{name}/queryData API
GET/PUT/DELETE/v1/objects/{bucket}/{key}Object storage
POST/v1/functions/{id}/invokeFunctions (function_deployment)
GET/v1/analytics/queryAnalytics
POST/v1/events/publishEvents
GET/v1/events/subscribeRealtime (SSE)

Flows routes (Preview)

Served by the control-plane runtime when Flows is enabled (TEMPORAL_ADDRESS). Workspace-scoped; authoring is structural_admin, running/observing is data_access. See the Flows guide and the Workflow DSL Reference.

MethodPathPurpose
GET/POST/v1/flows/workspaces/{ws}/flowsList / create flows
GET/PATCH/DELETE…/flows/{flowId}Get / update / delete a flow
POST…/flows/{flowId}/validateValidate a draft (FLW-E checks)
GET/POST…/flows/{flowId}/versionsList / publish immutable versions
GET/POST…/flows/{flowId}/executionsList / start runs
GET…/executions/{executionId}Run status
POST…/executions/{executionId}/cancellations · …/retries · …/signals/{name}Cancel / retry / signal
GET…/executions/{executionId}/eventsRun event stream (SSE)

MCP management routes (Preview)

Served by the control-plane runtime when MCP hosting is enabled (MCP_ENABLED). Workspace-scoped; the tenant is credential-derived, so a cross-tenant read/call/audit returns 404. See the MCP guide and MCP Architecture.

MethodPathPurpose
GET/POST/v1/mcp/workspaces/{ws}/serversList / create a server (source: instant | official)
GET/DELETE…/servers/{serverId}Get (endpoint, version, tools) / delete
POST…/servers/{serverId}/curationsCurate the tool set
POST…/servers/{serverId}/versionsPublish a version
POST…/servers/{serverId}/versions/{version}/approvalApprove a held (rug-pull-reviewed) version
POST…/servers/{serverId}/tool-callsInvoke a tool (control-plane-mediated)
GET…/servers/{serverId}/auditTenant-scoped audit trail

Flows and MCP routes are served directly by the control-plane runtime; gateway public-surface registration in the route catalog is part of the ongoing work.

Errors

Errors are JSON with a stable code and a message:

json
{ "code": "IDENTITY_MISSING", "message": "Missing tenant identity" }
StatusWhen
400Malformed body/query (INVALID_JSON, INVALID_QUERY_JSON)
401Missing/invalid credential (fails closed)
403Wrong privilege domain / scope
404Unknown resource
429Rate limit exceeded
502/503Upstream/backend unavailable (UPSTREAM_UNAVAILABLE, WORKSPACE_DB_UNRESOLVED)

Released under the MIT License.