<!-- 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 — Building On Call Rotation Management

## Endpoints

| Endpoint | Method | Purpose |
|---|---|---|
| `POST /api/oncall/schedules` | POST | Generate rotation schedule |
| `GET /api/oncall/{team}/coverage` | GET | Check coverage gaps |
| `GET /api/oncall/{team}/fatigue` | GET | Get fatigue metrics |
| `POST /api/oncall/swap` | POST | Request schedule swap |

## Agent Script

```bash
node agent.js generate-schedule --team security-ir --rotation-type weekly --start-date 2026-02-01
node agent.js check-coverage --team security-ir --period next-30-days
node agent.js fatigue-report --team security-ir
```
