Health & Admin

Health check and administrative operations. The health endpoint is the only one not under the /api/v1 prefix.

Quick Reference

MethodPathSummary
GET /health Health check
POST /api/v1/admin/shutdown Graceful shutdown
GET

/health

Returns current runtime state of the TamaDB instance.

Response

200 OK
{
  "status": "ok",
  "version": "0.1.0",
  "storageMode": "auto",
  "logLevel": "debug"
}
Note: This is the only endpoint not under the /api/v1 prefix. Use it for load-balancer health checks and quick status verification.

Admin

POST

/api/v1/admin/shutdown

Trigger a graceful shutdown. Drains in-memory documents to disk, persists all configuration state, closes the HTTP server, and exits the process. Works identically on all platforms.

Response

200 OK
{
  "status": "shutting-down"
}
Note: The response is sent before the process exits. After receiving the response, the server will no longer accept new requests. This is the recommended way to stop TamaDB on all platforms (especially Windows where SIGTERM is unreliable).