Execute SQL using selected driver
For `driver: postgresql`, connection resolution matches gateway handlers: send `X-Athena-Client` for a registered client pool, or `X-JDBC-URL` with a `jdbc:postgresql://...` URL for a direct connection (subject to gateway JDBC allowlists when configured).
Request Body
application/json
"athena" | "postgresql" | "supabase"Response Body
application/json
curl -X POST "https://athena-cluster.com/query/sql" \ -H "Content-Type: application/json" \ -d '{ "query": "string", "driver": "athena", "db_name": "string" }'{}Cached row count (COUNT query or table reference) POST
Returns a single row count using the same cache layers as gateway fetch (in-process + Redis when configured). Provide either validated `query` (single SELECT COUNT ... with no GROUP BY / UNION / comments) or `table_name` with optional `table_schema` (default `public`). `Cache-Control: no-cache` bypasses the cache. Responses include `X-Athena-Cached`, `X-Athena-Cache-Outcome`, and `X-Athena-Cache-Source` when applicable.
Legacy alias for `/gateway/fetch` POST
Mirrors `/gateway/fetch` for clients still calling `/gateway/data` with the same payload/response envelope.