GET Public /api/v1/health

Health now reports the API, Discord bot connection, and database separately. Browsers get a clean status page. API clients and uptime tools get JSON.

Open the live status page here: https://api.kiba-is-a.top/api/v1/health

Plain English Flow

  1. A browser opens /api/v1/health and sees a readable status page.
  2. A monitor calls /api/v1/health.json and receives structured JSON.
  3. The API checks itself, the Discord bot connection, and SQLite separately.
  4. If any component is not ready, the overall status becomes degraded.

Human Status Page

When a browser visits /api/v1/health, the API returns a black themed status page with cards for each component:

API FastAPI is answering requests.
Discord Bot Bot is connected and ready.
Database SQLite is reachable.

JSON Status

Use /api/v1/health.json when you always want machine-readable output. Calling /api/v1/health from curl also returns JSON unless the request asks for HTML.

curl https://api.kiba-is-a.top/api/v1/health.json
{
    "service": "wolfgon-overseer",
    "display_name": "Wolfgon Overseer",
    "status": "ok",
    "checked_at": "2026-06-12T05:00:00Z",
    "components": {
        "api": {
            "status": "ok",
            "message": "FastAPI is answering requests."
        },
        "bot": {
            "status": "ok",
            "message": "Discord bot is connected and ready.",
            "details": {
                "guild_count": 2,
                "user": "Wolfgon Overseer#6849",
                "latency_ms": 82
            }
        },
        "database": {
            "status": "ok",
            "message": "SQLite is reachable."
        }
    }
}

Monitor Examples

Simple uptime check

curl -fsS https://api.kiba-is-a.top/api/v1/health.json

Check the overall status field

curl -fsS https://api.kiba-is-a.top/api/v1/health.json | jq -r '.status'

Check the Discord bot component

curl -fsS https://api.kiba-is-a.top/api/v1/health.json | jq -r '.components.bot.status'

Degraded Example

If the API is online but the Discord bot is disconnected, the page stays readable and the JSON shows the split clearly.

{
    "service": "wolfgon-overseer",
    "display_name": "Wolfgon Overseer",
    "status": "degraded",
    "components": {
        "api": {
            "status": "ok",
            "message": "FastAPI is answering requests."
        },
        "bot": {
            "status": "down",
            "message": "Discord bot is not ready."
        },
        "database": {
            "status": "ok",
            "message": "SQLite is reachable."
        }
    }
}

Status Codes

HTTPOverall statusMeaning
200okAPI, Discord bot, and database all passed.
503degradedThe API is answering, but at least one component is down or not ready.

Authentication

None required. Health is public so monitors and users can check status quickly.

Rate Limiting

None. The endpoint is intentionally lightweight for uptime checks.