Skip to content

Database (REST) API

The REST API for querying tables follows PostgREST conventions. The exact same URL shape and filter syntax below also works against MySQL databases — the platform routes to the right REST service (PostgREST or mysql-rest) server-side based on how the database was created. MySQL supports a smaller filter subset; see the SDK filter compatibility table for exactly what differs.

Base path

/{stage}/db/{database-name}/rest/{table-name}

GET — select rows

GET /production/db/main/rest/posts

Query parameters:

ParameterExampleEffect
selectid,title,created_atColumns to return (default: *)
ordercreated_at.descSort column and direction
limit20Maximum rows
offset40Skip rows (for pagination)
{col}published=eq.trueFilter: col=op.value

Filter operators: eq, neq, gt, gte, lt, lte, like, ilike, is, in, cs, cd.

POST — insert rows

POST /production/db/main/rest/posts
Content-Type: application/json
Prefer: return=representation
{ "title": "Hello", "body": "..." }

Pass an array for bulk inserts.

PATCH — update rows

PATCH /production/db/main/rest/posts?id=eq.{uuid}
Content-Type: application/json
{ "title": "Updated" }

Always include a filter to avoid updating all rows.

DELETE — delete rows

DELETE /production/db/main/rest/posts?id=eq.{uuid}

Always include a filter.