REST API Reference
REST API Reference
Ciaren is a FastAPI service. The visual editor is built entirely on this REST
API, and you can drive every feature with it directly. All endpoints are served
under http://localhost:8055 by default.
Interactive docs
Run the backend and open http://localhost:8055/docs for the live Swagger UI,
or http://localhost:8055/redoc for ReDoc. Both are generated from the running
app, so they always match your version.
Resources
Each resource has its own reference page:
- Projects — workspaces grouping datasets and flows
- Datasets — upload and inspect versioned source files
- Flows — saved pipelines (graph), preview, and code export
- Runs — execute flows and read status, logs, per-node results, SSE stream
- Transformations — list node types, preview one node
- Catalog & Plugins — backend-fed node catalog and installed-plugin introspection
- Schedules — run flows automatically on a cron schedule
- Connections — reusable database connections for SQL nodes
- Settings — read and override the runtime-editable server settings
- ML endpoints — model metrics, registration, aliases, experiments, and runs under
/api/ml/*,/api/runs/{id}/ml/*, and/api/flows/{id}/ml/* - Marketplace — plugin Explore catalog and install endpoint under
/api/marketplace
Webhook trigger
POST /api/flows/{flow_id}/trigger starts a run authenticated by a pre-shared secret
(CIAREN_WEBHOOK_SECRET). Designed for CI/CD pipelines and external
orchestrators. See the Webhook guide for full details.
| Method | Path | Description |
|---|---|---|
GET | /api/settings/webhook | Returns {"configured": true/false} (never the secret) |
POST | /api/flows/{flow_id}/trigger | Trigger a run; requires X-Ciaren-Secret header |
Conventions
- Base URL:
http://localhost:8055(configurable via--host/--port). - Format: JSON request and response bodies;
POST /api/datasets/uploaduses multipart form data. - IDs: path parameters like
{flow_id}are the resource'sid. - Health check:
GET /health(liveness) returns{"status": "ok"}— the process is up, no dependencies checked. - Readiness check:
GET /readyverifies the database is reachable. Returns200{"status": "ok", "database": "up"}when ready, or503{"status": "unavailable", "database": "down"}so a load balancer drains the instance. - Optional API auth: when
CIAREN_API_TOKENis set,/api/*requests must sendAuthorization: Bearer <token>orX-Ciaren-Token: <token>. Static UI,/health,/ready, OpenAPI docs, and the webhook trigger's own secret are exempt. Browser clients may use either header; CORS preflight allowsX-Ciaren-Token. The bundled web UI keeps the token in memory andsessionStorageonly (neverlocalStorage): it is cleared when the browser session ends and is not inherited by the next user of a shared machine. You can seed it once from a bookmarked…/?api_token=<token>URL, which the UI strips from the address bar. Sending the token as a header (rather than a cookie) is deliberate — it is what defeats cross-site (CSRF) requests, since a browser can't attach a custom header cross-site without a preflight the token gate would reject. - Browser origin guard: without an API token, state-changing (
POST/PUT/PATCH/DELETE)/api/*requests that carry a browserOriginheader are refused (403) unless the origin is inCIAREN_CORS_ORIGINSor its hostname is local (localhost,127.0.0.1,::1) or listed inCIAREN_TRUSTED_HOSTS. This blocks CSRF/DNS-rebinding against a local, unauthenticated instance; clients that send noOrigin(curl, scripts, server-to-server) are unaffected. See Local-first trust model.
Typical workflow
POST /api/datasets/upload— upload a CSV/TSV/Excel/Parquet/JSON/text file.POST /api/flows— save a graph that reads the dataset and applies nodes.POST /api/flows/{id}/preview— check the result on sample data.POST /api/flows/{id}/runs— run the full pipeline.GET /api/runs/{run_id}— poll status and read logs.GET /api/runs/{run_id}/logs/stream— stream logs as SSE (optional).POST /api/flows/{id}/export/python— get standalone code (pandas and polars).
See Also
- Transformations Reference — every node and its config
- Webhook Trigger — trigger runs from CI/CD or Airflow
- Python SDK — typed Python client for the API
- Installation — get the backend running