v51

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01206322659.2 KB
connectors

`POST /orgs/{org_id}/connectors/{connector_id}/query`

Run an ad-hoc SQL query against a connector's source and return the bounded result inline. Read-only by default (enforced node-side); write mode must also be allowed by the connection's local policy on the connector box. Requires a connector advertising query:sql (0.1.26+).

post/orgs/{org_id}/connectors/{connector_id}/query

Path parameters

org_idstring required
connector_idstring required

Request body

connection_refstring required

Connection ref on the node (from /browse/connections).

max_rowsinteger nullable

Row cap on the returned result. Defaults to 500, ceiling 10000.

modestring nullable

read (default) | write. read is enforced node-side with engine-level read-only semantics; write additionally requires the connection's local policy (connections.json) to allow writes.

sqlstring required

The SQL to run. One statement on MySQL; multi-statement batches work on Postgres and SQL Server (the last result set is returned; on Postgres that's the last row-returning set — zero-row sets are invisible to the node's driver — while SQL Server returns the true last set even when empty).

timeout_msinteger nullable

Node-side execution budget in milliseconds. Defaults to 30000, ceiling 60000.

Response

Query executed

row_countinteger required
rows_affectedinteger nullable

Rows changed by non-row-returning statements, when the engine reports it (Postgres/MySQL; null on SQL Server = unknown, not zero).

truncatedboolean required

The node's row or byte cap bit — rows is a prefix of the real result.