Skip to Content
ReferenceREST API

REST API

Every dfdb serve node exposes an HTTP API. The core endpoints:

MethodPathPurpose
POST/queryRun SQL against the default database
GET/statsDatabase statistics — collections, document counts, indexes
GET/versionBuild version and commit
GET/databasesList attached databases (multi-DB hosts)
POST/db/{name}/queryRun SQL against a named database
GET/db/{name}/replication/statusReplication role and sequence for a database
POST/servicesSpawn a child dfdb serve process
POST/routersSpawn 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