Skip to main content
GET
/
health
curl https://hapi.7331.org/health
{
  "status": "healthy",
  "database": true,
  "cache": true,
  "started_at": "2025-01-01T00:00:00Z",
  "db_statistics": {
    "size": 20,
    "checked_in": 18,
    "checked_out": 2,
    "overflow": 0,
    "total": 20,
    "latency_ms": 1.2
  },
  "cache_statistics": {
    "memory_usage_bytes": 1048576,
    "total_keys": 150,
    "connected_clients": 5,
    "uptime_seconds": 86400,
    "evicted_keys": 0,
    "hit_rate": 95.5,
    "total_commands_processed": 50000,
    "latency_ms": 0.3
  },
  "errors": []
}
Returns the current health status of the API, including database and cache connectivity, connection pool statistics, and uptime information.

Response

status
string
required
Overall system status. One of: healthy, degraded, unhealthy.
database
boolean
required
Database connectivity status.
cache
boolean
required
Cache (Redis) connectivity status.
started_at
string
required
Service start time in ISO 8601 format.
db_statistics
object
required
Database connection pool statistics.
cache_statistics
object
required
Cache server statistics.
errors
string[]
required
List of error messages, if any.
curl https://hapi.7331.org/health
{
  "status": "healthy",
  "database": true,
  "cache": true,
  "started_at": "2025-01-01T00:00:00Z",
  "db_statistics": {
    "size": 20,
    "checked_in": 18,
    "checked_out": 2,
    "overflow": 0,
    "total": 20,
    "latency_ms": 1.2
  },
  "cache_statistics": {
    "memory_usage_bytes": 1048576,
    "total_keys": 150,
    "connected_clients": 5,
    "uptime_seconds": 86400,
    "evicted_keys": 0,
    "hit_rate": 95.5,
    "total_commands_processed": 50000,
    "latency_ms": 0.3
  },
  "errors": []
}