Skip to content

REST API

REST API

Every UI action in datarelix.ai is a REST endpoint. You can build agents, pipelines, and integrations on top.

The base URL for all endpoints is https://app.datarelix.ai/api/v1. An interactive API reference (Swagger / ReDoc) and the OpenAPI schema are available in-app.

Authentication

All endpoints require an API key passed via the X-API-Key header. SSO-authenticated browser sessions also include a Bearer token; for server-to-server use, prefer API keys.

Terminal window
curl -H "X-API-Key: $DATARELIX_API_KEY" \
https://app.datarelix.ai/api/v1/connections

See Authentication for details.

Endpoint groups

Connections

GET /api/v1/connections
POST /api/v1/connections
GET /api/v1/connections/{id}
PATCH /api/v1/connections/{id}
DELETE /api/v1/connections/{id}
POST /api/v1/connections/{id}/test
POST /api/v1/connections/{id}/introspect
POST /api/v1/connections/{id}/discover
POST /api/v1/connections/{id}/discover/stream
PUT /api/v1/connections/{id}/metadata
PUT /api/v1/connections/{id}/schema-overrides
PUT /api/v1/connections/{id}/schema-selection
GET /api/v1/connections/{id}/schema

Runs

POST /api/v1/runs/stream # SSE stream of plan + execution + artifacts
GET /api/v1/runs
GET /api/v1/runs/{id}
POST /api/v1/runs/{id}/cancel

Conversations

GET /api/v1/conversations?connection_id=...
GET /api/v1/conversations/{id}
DELETE /api/v1/conversations/{id}
POST /api/v1/conversations/{id}/truncate

Dashboards

GET /api/v1/dashboards
POST /api/v1/dashboards
GET /api/v1/dashboards/{id}
PATCH /api/v1/dashboards/{id}
DELETE /api/v1/dashboards/{id}
POST /api/v1/dashboards/{id}/refresh
POST /api/v1/dashboards/{id}/items
DELETE /api/v1/dashboards/{id}/items/{itemId}
POST /api/v1/dashboards/{id}/reorder

Artifacts

GET /api/v1/artifacts/{id}
GET /api/v1/artifacts/{id}/csv
POST /api/v1/artifacts/{id}/refresh

Streaming a run

Run execution is server-sent events. The stream emits phase events you can map to UI state.

Terminal window
curl -N -H "X-API-Key: $DATARELIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connection_id": "conn_abc",
"question": "Top 10 customers by revenue last quarter",
"chart_enabled": true
}' \
https://app.datarelix.ai/api/v1/runs/stream

Phase events you’ll see:

  • building_context — schema and conversation context being assembled.
  • planning — LLM is producing the IR.
  • executing — orchestrator is running each step.
  • step_complete — fired per step with the produced artifact reference.
  • complete — terminal event with the run id.

If the run fails, you get an error event with error_code and message. See Error Codes.

Idempotency

Run creation is not idempotent — each call creates a new run. To replay a question, fetch the original run and re-issue the same payload.

Rate limits

Default: 20 requests per minute per API key. Configurable per-key on Enterprise.