Run a query
Runs one operation (select, insert, update, delete or a function call), or a batch of them in order, in one transaction as the key's role. With a public key and a Chelabase-User token it runs as authenticated with the user's claims. Row-level security applies throughout.
A data API key (chk_pub_… or chk_sec_…) as Authorization: Bearer <key>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
One operation, or a batch of them, as a JSON tree. Unknown fields are rejected everywhere
One operation, or a batch of them, as a JSON tree. Unknown fields are rejected everywhere
The Postgres database to run in (1 to 63 bytes); the key's main database when left out
1 <= length <= 63"name" (in the database's default schema) or "schema.name", matched exactly
^[^.]+(\.[^.]+)?$At most this many rows (the server caps it)
0 <= valueSkip this many rows first
0 <= valueValue in
- "select"
The columns to return; every column when left out
1 <= itemsThe query language's version
Value in
- 1
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/data/v1/query" \ -H "Content-Type: application/json" \ -d '{ "from": "string", "op": "select", "v": 1 }'null