REST API - Overview#
Base URL#
https://api.rafikidb.com/api/v1
TextLocal development: http://localhost:8080/api/v1
Envelope#
Every response uses the same envelope.
Success:
{
"success": true,
"message": "Request was successful",
"data": { }
}
JSONError:
{
"success": false,
"message": "Email must be a valid email address",
"errors": ["Email must be a valid email address"]
}
JSONValidation failures return one errors entry per field. Bare statuses get
friendly defaults ("The requested resource was not found", "You do not have
permission to perform this action", ...).
Authentication#
| Header | Use |
|---|---|
X-AFRIBASE-API-Key | Project identity (data + module routes) |
Authorization: Bearer <jwt> | Project-user JWT (end-users) |
See Authentication.
Endpoint map#
| Area | Base path |
|---|---|
| Data | /data/{table} |
| Project auth | /projects/{id}/auth/* |
| Realtime | /projects/{id}/realtime/* |
| Storage | /projects/{id}/storage/* |
| Env vars | /projects/{id}/env |
| Secrets | /projects/{id}/secrets |
| Webhooks | /projects/{id}/webhooks |
| Edge functions | /projects/{id}/functions |
| Payments | /projects/{id}/payments/* |
| Platform auth | /auth/* |
| Tables / schema | /projects/{id}/tables |
| Query engine | /projects/{id}/query/run |
| GraphQL | /projects/{id}/graphql |
Pagination#
limit(max 200 on/data, max 1000 on the query engine)offsetfor small tablescursorfor keyset pagination on large tables (created_at ordering)
Continue to Data.