DocsAPI Reference

API Reference

Complete reference for Postrust REST API endpoints, operators, and headers.

Endpoints

MethodEndpointDescription
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

OperatorDescriptionExample
eqEquals?status=eq.active
neqNot equals?status=neq.deleted
gtGreater than?price=gt.100
gteGreater than or equal?price=gte.100
ltLess than?price=lt.50
lteLess than or equal?price=lte.50
likePattern match (case-sensitive)?name=like.*Widget*
ilikePattern match (case-insensitive)?name=ilike.*widget*
inIn list?id=in.(1,2,3)
isIs 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.US

Prefer Headers

return=representationReturn created/updated records in response
return=headers-onlyReturn only headers (for count)
count=exactInclude exact row count in response
resolution=merge-duplicatesUpsert (insert or update)