REST API
Every dfdb serve node exposes an HTTP API. The core endpoints:
| Method | Path | Purpose |
|---|---|---|
POST | /query | Run SQL against the default database |
GET | /stats | Database statistics — collections, document counts, indexes |
GET | /version | Build version and commit |
GET | /databases | List attached databases (multi-DB hosts) |
POST | /db/{name}/query | Run SQL against a named database |
GET | /db/{name}/replication/status | Replication role and sequence for a database |
POST | /services | Spawn a child dfdb serve process |
POST | /routers | Spawn a dfdb router cluster gateway |
Example:
curl -X POST http://localhost:5000/query \
-H "Content-Type: application/json" \
-d '{"sql": "SELECT * FROM orders WHERE pnr = '\''ABC123'\''"}'A complete, spec-driven reference (every endpoint, full request/response
schemas, and per-endpoint error codes) is generated from an OpenAPI document
in a later phase of #68 .
Older single-database builds expose /stats and /query but not /databases.
Last updated on