API Reference
REST API and WebSocket protocol reference for EdgeBase. Most endpoints are available at your project's base URL, with WebSocket and admin-only helpers called out below.
Base URL
https://your-project.edgebase.fun/api/
API Groups
| Group | Base Path | Description |
|---|---|---|
| Authentication | /api/auth/* | Sign up, sign in, OAuth, token refresh, password reset |
| Database | /api/db/{namespace}/tables/{table}, /api/db/{namespace}/{instanceId}/tables/{table} | CRUD, batch, queries, count |
| Storage | /api/storage/{bucket}/* | Upload, download, signed URLs, multipart |
| Database Subscriptions | /api/db/subscribe, /api/db/connect-check, /api/db/broadcast | WebSocket connection, preflight diagnostics, and server-side broadcasts |
| Room | /api/room, /api/room/connect-check, /api/room/metadata | Room WebSocket connection plus room metadata and diagnostics |
| Push | /api/push/* | Device registration, topic management |
| Functions | /api/functions/* | HTTP-triggered App Functions |
| Analytics | /api/analytics/* | Request metrics and custom event tracking |
| Admin | /api/auth/admin/* | User management (requires Service Key) |
| Native Resources | /api/kv/*, /api/d1/*, /api/vectorize/* | Direct KV, D1, Vectorize access |
| Raw SQL | /api/sql | Service-key-backed SQL execution for configured database namespaces |
| System | /api/health, /api/schema, /api/config | Health check, schema introspection, and public runtime config |
Authentication
Most endpoints require a JWT access token:
Authorization: Bearer <access_token>
Admin endpoints additionally require a Service Key:
X-EdgeBase-Service-Key: <service_key>
Next Steps
| Page | Description |
|---|---|
| Authentication API | Auth endpoints (signup, signin, OAuth, refresh) |
| Database API | CRUD, batch, query, count endpoints |
| Storage API | File upload, download, signed URL endpoints |
| Database Subscriptions API | WebSocket protocol for database subscriptions |
| Room API | WebSocket protocol plus room metadata and diagnostics |
| Push API | Push notification endpoints |
| Functions API | HTTP function endpoints |
| Analytics API | Metrics query and custom event endpoints |
| Admin API | Admin user management endpoints |
| Native Resources API | KV, D1, Vectorize endpoints |
| Raw SQL | Service-key-backed SQL execution against configured namespaces |
| System API | Health check, schema, and config endpoints |