REST API v2 Reference — OQENS Cloud Docs
Complete HTTP endpoint reference for DBaaS projects, SQL execution, table CRUD, and auth.
The DBaaS REST API v2 operates under base URL https://db.echo.oqens.me/api/dbaas/v2/. All project endpoints require the :slug path parameter.
1. Projects Management
List Projects
GET /api/dbaas/v2/projects
curl -H "Authorization: Bearer oq_live_..." https://db.echo.oqens.me/api/dbaas/v2/projects
Create Project
POST /api/dbaas/v2/projects
curl -X POST https://db.echo.oqens.me/api/dbaas/v2/projects \
-H "Authorization: Bearer oq_live_..." \
-H "Content-Type: application/json" \
-d '{"name": "analytics-service", "limit_mb": 150}'
2. SQL Query Execution
POST /api/dbaas/v2/projects/:slug/query
curl -X POST https://db.echo.oqens.me/api/dbaas/v2/projects/analytics-service/query \
-H "Authorization: Bearer oq_live_..." \
-H "Content-Type: application/json" \
-d '{"query": "SELECT * FROM events ORDER BY created_at DESC LIMIT 10;", "limit": 10}'
Response Payload:
JSON Response
{
"ok": true,
"columns": ["id", "event_name", "user_id", "created_at"],
"rows": [
{"id": 101, "event_name": "checkout_completed", "user_id": 42, "created_at": "2026-08-29T09:15:00Z"}
],
"row_count": 1,
"duration_ms": 3.42
}
3. Table CRUD Operations
Paginated Rows
GET /api/dbaas/v2/projects/:slug/tables/:table?limit=25&page=1
curl -H "Authorization: Bearer oq_live_..." \
"https://db.echo.oqens.me/api/dbaas/v2/projects/analytics-service/tables/events?limit=25&page=1"
Insert Row
POST /api/dbaas/v2/projects/:slug/tables/:table
curl -X POST https://db.echo.oqens.me/api/dbaas/v2/projects/analytics-service/tables/events \
-H "Authorization: Bearer oq_live_..." \
-H "Content-Type: application/json" \
-d '{"event_name": "page_view", "user_id": 42}'
4. End-User Authentication
Sign Up
POST /api/dbaas/v2/projects/:slug/auth/signup
curl -X POST https://db.echo.oqens.me/api/dbaas/v2/projects/analytics-service/auth/signup \
-H "Authorization: Bearer oq_live_..." \
-H "Content-Type: application/json" \
-d '{"email": "user@domain.com", "password": "SecurePassword123!", "data": {"name": "Alice"}}'