REST API - Overview#

Base URL#

https://api.rafikidb.com/api/v1
Text

Local development: http://localhost:8080/api/v1

Envelope#

Every response uses the same envelope.

Success:

{
  "success": true,
  "message": "Request was successful",
  "data": { }
}
JSON

Error:

{
  "success": false,
  "message": "Email must be a valid email address",
  "errors": ["Email must be a valid email address"]
}
JSON

Validation 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#

HeaderUse
X-AFRIBASE-API-KeyProject identity (data + module routes)
Authorization: Bearer <jwt>Project-user JWT (end-users)

See Authentication.

Endpoint map#

AreaBase 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)
  • offset for small tables
  • cursor for keyset pagination on large tables (created_at ordering)

Continue to Data.