Skip to main content

Execute a SerchaQL statement

POST 

/query

The single entry point for every SerchaQL statement kind — DDL, DCL, DML, SHOW, DESCRIBE, EXPLAIN and RUN BINDING.

Send text as {"serchaql": "..."}, or a pre-compiled JSON IR tree as {"ir": {...}} (mutually exclusive). Multiple semicolon-separated statements execute in order and are not wrapped in a transaction.

SELECT is available to any authenticated caller and is bounded by the three-layer permission model (corpus grant → corpus membership → per-document ACL), AND-composed and fail-closed. DDL, DCL, SHOW and RUN BINDING require an admin caller and return 403 otherwise.

Set explain=true to compile and return the plan without executing it. A query joining an external plugin table may return 202 with a cost estimate; re-submit with "confirm": true to proceed.

Request

Responses

OK