Skip to main content
POST

Authorizations

Authorization
string
header
required

An API key (sk_live_...) created under Settings → API keys, or a short-lived JWT access token from a browser session. A key only reaches the scope it was granted; see API keys and scopes.

Path Parameters

teamId
string
required
id
string
required

Datasource id from GET /teams/{teamId}/datasources.

Body

application/json

PostgreSQL or BigQuery.

sql
string
required

A single SELECT statement.

Required string length: 1 - 50000
limit
integer

Clamped server-side to the team's row cap regardless of what is asked for.

Required range: 1 <= x <= 10000

Response

The query ran.

columns
object[]
required
rows
any[][]
required

Each row is an array positioned to match columns.

rowCount
integer
required
truncated
boolean
required

True when more rows matched than were returned. Narrow the query rather than raising the limit — the per-team cap applies regardless.

durationMs
integer
required