Legacy alias for `/gateway/fetch`
Mirrors `/gateway/fetch` for clients still calling `/gateway/data` with the same payload/response envelope. Supports `X-Athena-Client` or direct PostgreSQL URI headers (`x-pg-uri` preferred; `x-athena-jdbc-url` / `x-jdbc-url` compatibility).
Header Parameters
Registered Athena client name. Optional when direct PostgreSQL URI headers are provided.
Preferred direct PostgreSQL URI (postgres://... or jdbc:postgresql://...).
Compatibility direct PostgreSQL URI header.
Compatibility direct PostgreSQL URI header.
optional API key mirror of the apikey header
Required when X-Athena-Client is custom_supabase
uriRequired when X-Athena-Client is custom_supabase
Request Body
application/json
Optional schema override (defaults to public search_path behavior).
Column name to group results by
Time granularity for grouping timestamp data
"day" | "hour" | "minute"Column to aggregate (required when using aggregation_strategy)
Aggregation strategy to apply (requires aggregation_column)
"cumulative_sum"Whether to deduplicate during aggregation
Optional sort (camelCase). Use sort_by for snake_case.
Optional sort (snake_case). Same shape as sortBy.
Response Body
curl -X POST "https://athena-cluster.com/gateway/data" \ -H "Content-Type: application/json" \ -d '{ "conditions": [ {} ] }'Execute SQL via driver POST
For `driver: postgresql`, connection resolution matches gateway handlers: - Send `X-Athena-Client` for a registered client pool, or - Send direct PostgreSQL URI headers (`x-pg-uri` preferred; `x-athena-jdbc-url` / `x-jdbc-url` compatibility). For PostgreSQL driver requests, Athena accepts direct URI auth bypass (no `X-Athena-Client`, no `X-Athena-Key`) when the URI includes both username and password credentials. Non-PostgreSQL drivers still require standard auth. Optional `schema_name` is supported only for the PostgreSQL driver and configures execution search_path as `schema_name, public`.
Immediately flush all pending deferred writes POST
Triggers an immediate flush of any queued deferred writes (when `deferred_writes.enabled` is true). Useful for operators to force persistence before maintenance or to clear backpressure. When deferred writes are disabled the endpoint returns a benign success with zero counts.