DocsAPI Reference
API Reference
Complete reference for Postrust REST API endpoints, operators, and headers.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /{table} | Read rows from table |
POST | /{table} | Create new rows |
PATCH | /{table} | Update existing rows |
PUT | /{table} | Upsert rows |
DELETE | /{table} | Delete rows |
POST | /rpc/{function} | Call stored procedure |
Filtering Operators
| Operator | Description | Example |
|---|---|---|
| eq | Equals | ?status=eq.active |
| neq | Not equals | ?status=neq.deleted |
| gt | Greater than | ?price=gt.100 |
| gte | Greater than or equal | ?price=gte.100 |
| lt | Less than | ?price=lt.50 |
| lte | Less than or equal | ?price=lte.50 |
| like | Pattern match (case-sensitive) | ?name=like.*Widget* |
| ilike | Pattern match (case-insensitive) | ?name=ilike.*widget* |
| in | In list | ?id=in.(1,2,3) |
| is | Is null/true/false | ?deleted_at=is.null |
Resource Embedding
Embed related resources using foreign key relationships:
# Embed customer in orders
GET /orders?select=*,customer(name,email)
# Nested embedding
GET /orders?select=*,items(product(name,price))
# Filter on embedded resource
GET /orders?select=*,customer!inner(*)&customer.country=eq.USPrefer Headers
return=representationReturn created/updated records in responsereturn=headers-onlyReturn only headers (for count)count=exactInclude exact row count in responseresolution=merge-duplicatesUpsert (insert or update)