GET /admin/health

Get comprehensive system health information including database status, memory usage, uptime, and connected WhatsApp clients

Responses

  • 200 application/json

    Health information retrieved successfully

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • status string
      • database string
      • whatsapp_clients integer
      • total_devices integer
      • memory_alloc string
      • memory_sys string
      • goroutines integer
      • uptime string
      • uptime_seconds integer
      • version string
      • go_version string
  • 401 application/json

    Unauthorized - Invalid admin secret

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
GET /admin/health
curl \
 --request GET 'http://localhost:7001/admin/health' \
 --header "X-Admin-Secret: $API_KEY"
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "System health retrieved successfully",
  "data": {
    "status": "ok",
    "database": "ok",
    "whatsapp_clients": 18,
    "total_devices": 25,
    "memory_alloc": "128.5 MB",
    "memory_sys": "256.0 MB",
    "goroutines": 42,
    "uptime": "5d 12h 30m 15s",
    "uptime_seconds": 475815,
    "version": "2.0.0",
    "go_version": "go1.21.0"
  }
}
Response examples (401)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}