Skip to content

REST API

Once you create tables through the schema tools, a full REST API is automatically available. No code generation or route setup needed.

Placeholders:

  • {app_id} — Your app’s identifier
  • {table} — A table name in your schema
  • {id} — A row’s primary key value
MethodPathPurpose
GET/v1/{app_id}/{table}List rows with filtering, sorting, pagination
GET/v1/{app_id}/{table}/{id}Read a single row by primary key
POST/v1/{app_id}/{table}Create a row
PATCH/v1/{app_id}/{table}/{id}Update a row (partial)
DELETE/v1/{app_id}/{table}/{id}Delete a row

Add query parameters in the format column=operator.value:

OperatorExampleMeaning
eqstatus=eq.publishedEquals
neqstatus=neq.draftNot equals
gtage=gt.18Greater than
gteage=gte.18Greater than or equal
ltprice=lt.100Less than
lteprice=lte.100Less than or equal
liketitle=like.%hello%Pattern match (case-sensitive)
iliketitle=ilike.%hello%Pattern match (case-insensitive)
isdeleted_at=is.nullIS NULL, IS TRUE, IS FALSE
inid=in.(1,2,3)In a list of values
ftstitle=fts.hello worldFull-text search (English, with stemming)

Use the order parameter:

?order=created_at.desc
?order=name.asc,created_at.desc

Use limit and offset:

?limit=20&offset=40

Returns rows 41-60.

Use the select parameter:

?select=id,title,created_at
GET /v1/{app_id}/posts?select=id,title,author_id&status=eq.published&order=created_at.desc&limit=20

The role is determined automatically by the Authorization header:

Request typeAuthorization headerRole
No auth header(none)butterbase_anon
End-user JWTBearer {jwt}butterbase_user
Platform API keyBearer {api_key}butterbase_service

See Row-Level Security for how these roles interact with data access policies.

MethodPathPurpose
GET/v1/{app_id}/schemaRead current schema
POST/v1/{app_id}/schema/applyApply a schema update
GET/v1/{app_id}/migrationsList applied migrations
MethodPathPurpose
GET/appsList your apps
POST/initCreate a new app
DELETE/apps/{app_id}Delete an app
MethodPathPurpose
GET/healthLiveness check
GET/health/readyReadiness check (verifies database)

Errors include structured objects with code, message, and remediation fields:

{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Table 'nonexistent' does not exist",
"remediation": "Check the table name and ensure it exists in your schema"
}
}

For complete endpoint references, see the API Reference section.