Athena
Sql

Execute SQL via driver

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`.

POST
/query/sql

Header Parameters

X-Athena-Client?string

Registered Athena client name for client-routed execution.

x-pg-uri?string

Preferred direct PostgreSQL URI (postgres://... or jdbc:postgresql://...) for driver=postgresql.

x-athena-jdbc-url?string

Compatibility direct PostgreSQL URI header.

x-jdbc-url?string

Compatibility direct PostgreSQL URI header.

X-Athena-Key?string

Required for non-PostgreSQL drivers and for PostgreSQL requests without credentialed direct URI bypass.

Request Body

application/json

query*string
driver*string
Value in"athena" | "postgresql" | "supabase"
db_name*string
schema_name?string

Optional schema override; supported only when driver is postgresql.

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"  }'
{}
Empty
Empty
Empty
Empty