REST API
Data Sources
Connected data sources with their schemas and table annotations (descriptions, use cases, gotchas). Metadata only — no credentials, no query execution.
Authorization
bearerAuth AuthorizationBearer <token>
Workspace API key (Settings → API Keys)
In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/data-sources"{
"items": [
{
"name": "string",
"connectorType": "postgres",
"status": "connected",
"schema": [
{
"tableName": "string",
"columns": [
{
"columnName": "string",
"dataType": "string"
}
]
}
],
"tableAnnotations": [
{
"tableName": "string",
"description": "string",
"useCases": [
"string"
],
"gotchas": [
"string"
]
}
],
"createdAt": 0
}
]
}{
"error": "string"
}{
"error": "string"
}Proven SQL patterns and error learnings for a data source, matched to your question — what has worked before and which mistakes to avoid.
Authorization
bearerAuth AuthorizationBearer <token>
Workspace API key (Settings → API Keys)
In: header
Path Parameters
name*string
Data source name (URL-encoded)
Query Parameters
question*string
What you're trying to compute
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/data-sources/string/query-intelligence?question=weekly+churn+in+EMEA"{
"patterns": [
{
"question": "string",
"sql": "string",
"resultSummary": "string",
"successCount": 0,
"lastUsedAt": 0
}
],
"errorLearnings": [
{
"failedSql": "string",
"errorMessage": "string",
"learning": "string",
"createdAt": 0
}
]
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}