Athena
Query

Run a raw SQL query against the selected PostgreSQL pool

Executes raw SQL against the client selected by `X-Athena-Client`. This route is intended for advanced workflows where structured gateway payloads are insufficient. Use carefully with parameterized SQL on the caller side when constructing dynamic queries.

POST
/gateway/query

Header Parameters

X-Athena-Client*string

selects which PostgreSQL pool the SQL executes against

x-api-key?string

optional API key mirror of the apikey header in the body

Request Body

application/json

query*string

raw SQL to execute

Response Body

application/json

curl -X POST "https://athena-cluster.com/gateway/query" \  -H "X-Athena-Client: string" \  -H "Content-Type: application/json" \  -d '{    "query": "SELECT id, path, status_code FROM http_request_log ORDER BY created_at DESC LIMIT 10;"  }'
{
  "status": "success",
  "message": "Query executed",
  "data": {
    "rows": [
      {
        "id": "5d845b27-8d06-40a0-9e76-08de9d9f3c1f",
        "path": "/gateway/fetch",
        "status_code": 200
      }
    ]
  }
}
Empty
Empty