Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Path Parameters

id
string
required

The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")

Body

application/json
sql
string
required

The SQL to execute. Multiple statements may be separated by ; — the last statement that returns rows is surfaced.

Response

Query result

object
string
required

Always "database_query_result".

rows
object[]
required

The rows returned by the query, each an object keyed by column name.

row_count
integer
required

Number of rows returned.

meta
object | null

Execution metadata for the surfaced statement (e.g. rows read/written, duration).