API7 Docs
AISIX AI GatewayOpen-Source AISIX Gateway Admin APIGet Gateway Health

Get Gateway Health

GET /admin/v1/health

GET /admin/v1/health

Interactive request editor loads with JavaScript.

Authorization

AdminBearer
AuthorizationBearer <token>

Admin key from config.admin.admin_keys.

In: header

Response Body

application/json

application/json

application/json

curl -X GET "http://127.0.0.1:3001/admin/v1/health"

OK

{
  "config": {
    "snapshot_age_seconds": 0,
    "snapshot_revision": 0
  },
  "models": [
    {
      "health": 0,
      "id": "string",
      "name": "string"
    }
  ],
  "status": "ok"
}
Complete operation details and schema variants

GET /admin/v1/health

Get Gateway Health

Get model health levels and configuration-watch freshness for this gateway.

Parameters

Responses

  • 200: OK
  • config (object, optional): Configuration watch freshness. Omitted when the watch supervisor is not wired into the admin state.
  • allOf variant 1
  • config.snapshot_age_seconds (integer,null, required): Seconds since the watch supervisor last applied a snapshot, or null before the first apply.
  • config.snapshot_revision (integer, required): Highest configuration-store revision reflected in the current snapshot.
  • models (array, required): Per-model health levels.
  • models[].health (integer, required): Numeric model health level. Lower values indicate healthier states. A value of 0 indicates healthy, 1 indicates degraded, and 2 indicates down.
  • models[].id (string, required): Model resource ID.
  • models[].name (string, required): Model alias used by proxy callers.
  • status (string, required): Aggregate health summary derived from per-model health and config freshness. ok = all models healthy and config fresh; degraded = at least one model degraded or the config watch is stale/not yet applied; unhealthy = at least one model is down. Use models[].health and config for the per-dimension detail.
  • 401: Missing or invalid admin key
  • error_msg (string, required): Human-readable error message.
  • 500: Configuration store operation failed Response fields (application/json): identical to GET /admin/v1/health, response 401 above.

cURL

curl -X GET 'http://127.0.0.1:3001/admin/v1/health'