v35

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-016584221.4 KB
Gateway

Execute SQL query

Execute a single SQL query or a batch of queries against a PostgreSQL branch.

Authentication: send the branch's PostgreSQL connection string in the Connection-String header. The control-plane API key (Bearer token) is not accepted on the gateway host.

Routing: the target branch, region, and endpoint type are taken from the hostname embedded in the connection string, which must match the request host. See the Connection-String security scheme for the host format.

Single query: provide query (and optional params) at the top level.

Batch: provide queries as an array of query objects, or send the request body as a JSON array. Batch queries execute within a single transaction.

post/sql

Headers

Array-Mode'true' | 'false'

When true, return rows as arrays instead of objects.

Raw-Text-Output'true' | 'false'

When true, return all values as strings without type conversion.

Batch-Isolation-Level'ReadCommitted' | 'ReadUncommitted' | 'RepeatableRead' | 'Serializable'

Transaction isolation level for batch queries.

Batch-Read-Only'true' | 'false'

When true, execute the batch transaction in read-only mode.

Batch-Deferrable'true' | 'false'

When true, execute the batch transaction in deferrable mode.

Request body

querystring

SQL query to execute (single query mode).

arrayModeboolean

Override array mode for this query (single query mode only).

Response

Query executed successfully

OR