Advanced Reports

Get Enhanced Stability Report

GET /api/v1/reports/stability?window=24h&area_id=<uuid>
GET /api/v1/reports/stability?window=7d&pi_id=<uuid>

Enhanced routing stability report with severity classification (ok/warning/high/critical) and per-area instability scoring (0-100). Identifies flapping links by state change frequency and unstable routers by adjacency reset and event counts. Supersedes the basic GET /api/v1/diagnostics/stability endpoint with richer data.

Auth: Any authenticated user.

Query parameters:

Response: 200 OK

{
  "window": "24h",
  "from": "2026-03-10T00:00:00Z",
  "to": "2026-03-11T00:00:00Z",
  "summary": {
    "total_events": 150,
    "flapping_links": 2,
    "unstable_routers": 1,
    "area_scores": [
      { "area_id": "uuid", "area_label": "0.0.0.0", "score": 85, "event_count": 20, "flap_count": 3 }
    ]
  },
  "flapping_links": [
    {
      "link_id": "uuid",
      "source_device": "router-a",
      "source_router_id": "10.0.0.1",
      "dest_device": "router-b",
      "dest_router_id": "10.0.0.2",
      "area_label": "0.0.0.0",
      "state_changes": 12,
      "last_change": "2026-03-11T08:30:00Z",
      "severity": "high"
    }
  ],
  "unstable_routers": [
    {
      "router_id": "10.0.0.3",
      "hostname": "router-c",
      "adjacency_resets": 4,
      "link_flaps": 8,
      "event_count": 25,
      "severity": "critical",
      "last_event": "2026-03-11T09:45:00Z"
    }
  ]
}

Severity thresholds: