Athena
Update

Fetch or update data using a SQLx client (same payload as /gateway/fetch)

Applies updates to rows matching supplied conditions. Payload shape mirrors fetch-style condition blocks so callers can reuse filtering logic between read and write flows. Supports optional post-processing fields for response shaping where applicable.

POST
/gateway/update

Header Parameters

X-User-Id?string
X-Athena-Client?string

selects which PostgreSQL pool to use

X-Strip-Nulls?string
apikey?string
x-api-key?string

optional API key mirror of the apikey header

x-supabase-url?string

Required when X-Athena-Client is custom_supabase

Formaturi
x-supabase-key?string

Required when X-Athena-Client is custom_supabase

Request Body

application/json

view_name?string
table_name?string
columns?array<>|
conditions*array<>
limit?integer
current_page?integer
page_size?integer
offset?integer
total_pages?integer
strip_nulls?boolean
group_by?string

Column name to group results by

time_granularity?string

Time granularity for grouping timestamp data

Value in"day" | "hour" | "minute"
aggregation_column?string

Column to aggregate (required when using aggregation_strategy)

aggregation_strategy?string

Aggregation strategy to apply (requires aggregation_column)

Value in"cumulative_sum"
aggregation_dedup?boolean

Whether to deduplicate during aggregation

Response Body

application/json

curl -X POST "https://athena-cluster.com/gateway/update" \  -H "Content-Type: application/json" \  -d '{    "table_name": "app_events",    "conditions": [      {        "eq_column": "id",        "eq_value": "5d845b27-8d06-40a0-9e76-08de9d9f3c1f"      }    ],    "update_body": {      "source": "api"    }  }'
{
  "status": "success",
  "message": "Rows updated",
  "data": {
    "affected_rows": 1
  }
}
Empty
Empty