Insert a row into a table
Inserts one row (or server-normalized payload) into the target table selected by `X-Athena-Client`. The optional `X-Athena-Insert-Window` header can enable request-scoped batching for Postgres-backed inserts. Conflict responses (409) are typically raised for unique/constraint violations.
Header Parameters
Optional Postgres insert batching window in milliseconds (1–60000).
When non-zero, enables or overrides gateway.insert_execution_window_ms for this request.
The handler blocks until the window elapses and the row is flushed; under load, connection
hold time can increase by up to this value. Ignored when X-Athena-Deadpool-Enable requests
deadpool, when update_body is present, or for non-Postgres clients.
1 <= value <= 60000Request Body
application/json
Response Body
application/json
curl -X PUT "https://athena-cluster.com/gateway/insert" \ -H "X-Company-Id: string" \ -H "X-Organization-Id: string" \ -H "Content-Type: application/json" \ -d '{ "table_name": "app_events", "insert_body": { "event_type": "user_login", "user_id": "u_123", "source": "dashboard" } }'{
"status": "success",
"message": "Row inserted",
"data": {
"table_name": "app_events"
}
}Fetch data with conditions POST
Fetches rows from a table or view using structured conditions, optional pagination, sort instructions, and optional post-processing (`group_by`, `time_granularity`, aggregation options). Notes: - Route selection is based on `X-Athena-Client` (or custom Supabase headers for `custom_supabase`). - `X-Strip-Nulls` can be used to remove null-valued fields from response payloads. - Cache behavior may include `X-Athena-Cached`, `X-Athena-Cache-Outcome`, and `X-Athena-Cache-Source` headers.
Run a raw SQL query against the selected PostgreSQL pool POST
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.