Data sources
Connect, test, and introspect the databases and warehouses queries run against.
GET/api/data_sources
List data sources visible to the current user, each annotated with a server-computed caller block (can_edit/can_delete/etc.) and a top-level can_create flag.
Response
{
"data_sources": [
{
"id": 3,
"name": "Production Postgres",
"type": "pg",
"schema": null,
"schema_refreshed_at": null,
"paused": false,
"pause_reason": null,
"created_at": "2026-01-10T00:00:00Z",
"updated_at": "2026-01-10T00:00:00Z",
"caller": { "can_edit": true, "can_delete": true }
}
],
"can_create": true
}POST/api/data_sources
Create a data source. Requires create_data_source AND at least one of the caller's groups to both grant that permission and be unrestricted — otherwise there'd be no unrestricted group to attach the new data source to.
Request
{
"name": "Production Postgres",
"type": "pg",
"options": { "host": "db.internal", "port": 5432, "user": "readonly", "password": "...", "dbname": "app" }
}Response
{
"id": 3,
"name": "Production Postgres",
"type": "pg",
"schema": null,
"schema_refreshed_at": null,
"paused": false,
"pause_reason": null,
"created_at": "2026-01-10T00:00:00Z",
"updated_at": "2026-01-10T00:00:00Z",
"caller": { "can_edit": true, "can_delete": true }
}GET/api/data_sources/{id}/schema
Cached table/column schema. Refreshes synchronously (hitting the live connector) if nothing is cached yet, or always when ?refresh=true is passed by a caller with reach to refresh it.
| Param | Type | Required | Description |
|---|---|---|---|
refresh | boolean | No | Force a synchronous live-connector refresh instead of serving the cached schema. |
Response
{ "schema": { "tables": [ { "name": "users", "columns": [ { "name": "id", "type": "integer" } ] } ] } }GET/api/data_sources/types
Static catalog of every supported connector type and its configuration JSON schema, for rendering the "new data source" form. No auth required.
Response
[
{ "type": "pg", "name": "PostgreSQL", "configuration_schema": { "...": "..." } },
{ "type": "bigquery", "name": "Google BigQuery", "configuration_schema": { "...": "..." } }
]