Webinar: Better Agents, Easier than Ever — Thursday, June 18th at 9am PT / 12pm ET. Register Now
Version 2.5
Data connections

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.

FieldTypeDescription
idstringConnection ID.
namestringConnection name.
descriptionstringWhat the connection is for.
enginestringSource type (postgres, snowflake, redshift, …).
configurationobjectEngine-specific connection settings (no secrets returned).
tagsarrayTags applied to the connection.
created_at / updated_atstringTimestamps.

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.

ParameterInTypeRequiredDescription
connection_idpathstringYesConnection 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)

FieldTypeRequiredDescription
namestringYesConnection name.
descriptionstringNoWhat the connection is for.
enginestringYesSource type — selects the configuration shape.
configurationobjectYesEngine-specific settings (e.g. Postgres: host, port, database, user, password, schema, sslmode).
tagsarrayNoTags.
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.

ParameterInTypeRequiredDescription
connection_idpathstringYesConnection ID.

ResponseSemanticViewsListResponse

{
  "semantic_views": [
    { "name": "string", "database": "string", "schema": "string", "created_on": "string", "description": "string" }
  ]
}
Field (SemanticViewInfo)TypeDescription
namestringView name.
databasestringDatabase it lives in.
schemastringSchema it lives in.
created_onstringWhen it was created.
descriptionstringOptional description.