GET /api/health

Get Health Status

Retrieve the current health status summary including overall status, check count, active issues, and last check timestamp.

Overview

Returns the current health engine summary. The response includes the computed overall_status, the number of checks that have been run, any active issues, and the timestamp of the last check.

This endpoint does not trigger a new check run — it returns cached results from the most recent startup check or heartbeat. To force a fresh check, use POST /api/health/check.

Info

This endpoint requires no authentication. Health status is considered non-sensitive system metadata.

Response

status string

Overall system health: healthy, degraded, or unhealthy. Computed from individual check results — any critical failure makes the system unhealthy, any warning makes it degraded.

check_count integer

Total number of health checks that have been run.

issues array

List of check results that are not ok. Each issue is an object with:

check_id string
Unique identifier for the check (e.g. api_key_primary, llm_reachable)
name string
Human-readable check name (e.g. “Primary API Key”)
category string
Check category: config, connectivity, or storage
status string
Check status: warning or critical
message string
Description of the issue
fix_hint string
Suggested fix action
timestamp string
ISO 8601 timestamp of when the check ran
last_check string

ISO 8601 timestamp of the most recent check run. Empty string if no checks have been run yet.

Terminal window
curl -X GET "http://localhost:8888/api/health"
const response = await fetch("http://localhost:8888/api/health");
const data = await response.json();
console.log(data.status); // "healthy", "degraded", or "unhealthy"
import requests
response = requests.get("http://localhost:8888/api/health")
data = response.json()
print(data["status"])
{
"status": "healthy",
"check_count": 11,
"issues": [],
"last_check": "2025-03-15T10:30:00+00:00"
}
{
"status": "degraded",
"check_count": 11,
"issues": [
{
"check_id": "config_permissions",
"name": "Config Permissions",
"category": "config",
"status": "warning",
"message": "Config file permissions too open: 0o644 (should be 600)",
"fix_hint": "Run: chmod 600 ~/.mudabbir/config.json",
"timestamp": "2025-03-15T10:30:00+00:00"
}
],
"last_check": "2025-03-15T10:30:00+00:00"
}
Request
curl -X GET "http://localhost:8888/api/health" \
  -H "Content-Type: application/json"
const response = await fetch("http://localhost:8888/api/health", {
  method: "GET",
  headers: {
    "Content-Type": "application/json"
},
});

const data = await response.json();
console.log(data);
import requests

response = requests.get(
    "http://localhost:8888/api/health",
    headers={'Content-Type':'application/json'},
)

print(response.json())
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {
    req, _ := http.NewRequest("GET", "http://localhost:8888/api/health", nil)
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
Response
Send a request to see the response