Server health
Auth: Public (rate limited)
Quick liveness check — use this for load balancer health probes or uptime monitoring.
Response
{
"status": "ok",
"timestamp": "2024-03-15T10:30:00.000Z",
"service": "openinary-api"
}
Status codes: 200 healthy
Example
curl http://localhost:3000/health
Database health
Auth: API Key required
Detailed diagnostic — checks the SQLite database connection, file permissions, and table record counts.
Response
{
"status": "ok",
"timestamp": "2024-03-15T10:30:00.000Z",
"database": {
"connected": true,
"path": "/app/data/openinary.db",
"size": "2.4 MB",
"permissions": "0644",
"tables": {
"user": 1,
"session": 3,
"account": 1,
"verification": 0,
"apiKey": 2
}
}
}
Whether the database connection is active.
Absolute path to the database file.
Record counts per table. Useful for verifying migrations applied correctly.
Optional warning (e.g. unusual permissions).
Status codes: 200 healthy · 503 database connection failed
Example
curl http://localhost:3000/health/database \
-H "Authorization: Bearer <api_key>"