Skip to main content
POST
Run database query

Authorizations

Authorization
string
header
required

Session access JWT or an API token (insta_<prefix>_<secret>).

Path Parameters

projectId
string<uuid>
required

Query Parameters

branch
string

Branch name (defaults to the project's default branch)

group
string

postgres service name (default: the sole postgres service)

database
string

database on the instance (default: the connection-string database)

Body

application/json
sql
string
required
Minimum string length: 1
params
any[]

positional parameter values for $1..$n — audited as a count, never as values

maxRows
integer
default:1000
Required range: 1 <= x <= 1000

Response

Default Response

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

rows as positional cells — duplicate column names stay distinct; numeric/int8 arrive as strings

rowCount
integer
required
truncated
boolean
required

true when maxRows clipped the result — narrow with WHERE/LIMIT

queryId
null
required

reserved for future cancellation