<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->

# API Reference — Incident Metrics Tracking

## Metrics Endpoints

| Endpoint | Method | Purpose |
|---|---|---|
| `GET /api/metrics/timing` | GET | MTTD, MTTR, MTTC for date range |
| `GET /api/metrics/sla` | GET | SLA compliance by severity |
| `GET /api/metrics/volume` | GET | Incident volume trends |
| `GET /api/metrics/recurrence` | GET | Recurrence rate |

## SLA Targets

| Severity | First Response | Containment | Resolution |
|----------|---------------|-------------|-----------|
| S1 | 5 min | 1 hr | 48 hr |
| S2 | 15 min | 4 hr | 1 week |
| S3 | 1 hr | 24 hr | 2 weeks |
| S4 | 4 hr | 72 hr | 30 days |

## Agent Script

```bash
node agent.js metrics --incidents-json '[{"declared_at":"2026-01-15T10:00:00","first_response_at":"2026-01-15T10:12:00"}]'
node agent.js sla --incidents-json '[{"severity":"S1","declared_at":"2026-01-15T10:00:00","first_response_at":"2026-01-15T10:03:00"}]'
node agent.js targets
```
