Data connections
Manage the data connections configured in the workspace — the databases and files agents query — and read the semantic views each one exposes. To attach a connection's data to an agent, build a semantic data model on top of it.
All paths are relative to the base URL and require an Authorization: Bearer YOUR_API_KEY header.
The data connection object
PublicDataConnection. Each connection is typed by its source — PostgreSQL, Redshift, Snowflake, MySQL, BigQuery, and Databricks.
| Field | Type | Description |
|---|---|---|
| id | string | Connection ID. |
| name | string | Connection name. |
| description | string | What the connection is for. |
| engine | string | Source type (postgres, snowflake, redshift, …). |
| configuration | object | Engine-specific connection settings (no secrets returned). |
| tags | array | Tags applied to the connection. |
| created_at / updated_at | string | Timestamps. |
Numeric configuration fields are returned as JSON numbers — e.g. port comes back as 5432.0, not 5432. Parse them as numbers, not strict integers.
List data connections
GET /data-connections
Returns a PaginatedResponse of connections.
Get a data connection
GET /data-connections/{connection_id}
Returns a single PublicDataConnection.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| connection_id | path | string | Yes | Connection ID. |
Create a data connection
POST /data-connections
Creates a connection. The body is typed by engine, with an engine-specific configuration. The platform verifies the connection before saving — if it can't connect, you get 400 and nothing is written.
Body (PostgreSQL example)
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Connection name. |
| description | string | No | What the connection is for. |
| engine | string | Yes | Source type — selects the configuration shape. |
| configuration | object | Yes | Engine-specific settings (e.g. Postgres: host, port, database, user, password, schema, sslmode). |
| tags | array | No | Tags. |
curl -X POST 'https://{your-deployment-host}/tenants/{tenant-id}/api/v2/data-connections' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Invoices DB",
"description": "AP invoices",
"engine": "postgres",
"configuration": {
"host": "db.internal", "port": 5432, "database": "invoices",
"user": "readonly", "password": "…", "schema": "public", "sslmode": "require"
}
}'Returns the created PublicDataConnection.
Update a data connection
PUT /data-connections/{connection_id}
Updates a connection. Like create, the connection is verified before saving (400 on failure). Returns the updated PublicDataConnection.
Delete a data connection
DELETE /data-connections/{connection_id}
Returns 204 No Content.
A connection can't be deleted while a semantic data model still references it.
List semantic views
GET /data-connections/{connection_id}/semantic-views
Lists the semantic views available in a connection — the tables/views a semantic data model can build on.
Semantic views are a Snowflake-only feature. Calling this on a
non-Snowflake connection (e.g. PostgreSQL) returns 400.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| connection_id | path | string | Yes | Connection ID. |
Response — SemanticViewsListResponse
{
"semantic_views": [
{ "name": "string", "database": "string", "schema": "string", "created_on": "string", "description": "string" }
]
}| Field (SemanticViewInfo) | Type | Description |
|---|---|---|
| name | string | View name. |
| database | string | Database it lives in. |
| schema | string | Schema it lives in. |
| created_on | string | When it was created. |
| description | string | Optional description. |