REST API - Data#
CRUD over your project's tables. Table name is a slug, e.g. profiles,
messages, users (the managed auth users table is always available,
read-only).
List rows#
GET /data/{table}
Textcurl "https://api.rafikidb.com/api/v1/data/profiles?limit=25" \
-H "X-AFRIBASE-API-Key: raf_live_..."
BashQuery parameters#
| Param | Example | Description |
|---|---|---|
select | select=id,full_name | Project only these columns |
{column} | nationality=eq.Tanzania | Filter (see operators) |
order | order=created_at.desc,full_name.asc | Sort columns |
limit | limit=50 | Max 200 |
offset | offset=100 | Offset pagination |
cursor | cursor={last_id} | Keyset pagination (created_at ordering) |
count | count=exact | Return only { "count": n } |
Filter operators#
| Operator | Example |
|---|---|
eq | status=eq.active |
neq | status=neq.archived |
gt / gte | age=gt.18 / age=gte.18 |
lt / lte | price=lt.10000 |
like | name=like.%asha% |
ilike | name=ilike.%ASHA% |
is | user_id=is.null / user_id=is.not.null |
in | status=in.(active,pending) |
Columns are validated against the table metadata; values are parameterized.
Get a row#
GET /data/{table}/{id}
TextInsert#
POST /data/{table}
Text{ "full_name": "Asha Mwinyi", "nationality": "Tanzania" }
JSONReturns the created row. Server fills id, created_at, updated_at,
deleted_at.
Update#
PATCH /data/{table}/{id}
Text{ "nationality": "Kenya" }
JSONDelete (soft)#
DELETE /data/{table}/{id}
TextThe users table#
users is the managed auth users table for every project:
- Lists project users (email, phone, full_name, is_active, timestamps)
- Read-only over the data API: writes return 400
- Schema (id, email, phone, full_name, is_active, created_at, updated_at) is managed by the platform; columns cannot be modified
RLS#
Policies on the table decide what each request can do. See Security (RLS).