Sprint 3: Public API Value
This release exposes the registry's existing health-check data through new public API endpoints. Mobile apps can now display service uptime, embed status badges, and poll efficiently with conditional requests.
New Endpoints
| Method | Path | Purpose |
|--------|------|---------|
| GET | /api/v1/registry/{callsign}/health-history | Paginated health-check probe results |
| GET | /api/v1/registry/{callsign}/uptime | Uptime percentage + stats over a time period |
| GET | /api/v1/registry/{callsign}/badge.svg | Embeddable shields.io-style SVG badge |
| GET | /api/v1/stats | Aggregate registry statistics |
| GET | /api/v1/count | Lightweight polling endpoint with ETag/304 |
Health History
GET /api/v1/registry/WXBOT/health-history?limit=50&since=2026-08-01T00:00:00ZReturns timestamped probe results in reverse chronological order. Supports:
limit— max records (default 100, max 1000)since— ISO-8601 timestamp filter
Uptime Statistics
GET /api/v1/registry/WXBOT/uptime?period=7d
Returns uptime percentage, total/successful/failed checks, and average response
time over a configurable period. Supported periods: 1h–8760h, 1d–365d.
Status Badges
Generates a shields.io-style SVG badge with color coding:
- 🟢 Green: ≥99% uptime
- 🟡 Yellow: ≥95%
- 🟠 Orange: ≥80%
- 🔴 Red: <80%
- ⚪ Grey: no data
5-minute cache. Embeddable in READMEs, dashboards, or documentation.
Registry Stats
GET /api/v1/statsAggregate counts: total services, breakdown by status and category, total health checks stored, total commands registered.
Polling Count Endpoint
GET /api/v1/countLightweight endpoint designed for frequent polling by mobile apps.
- Returns non-deleted service count + by-status breakdown
- Higher rate limit (120/min vs 60/min)
- ETag header for conditional GET → 304 Not Modified (zero-bandwidth poll)
- 60-second Cache-Control
Pydantic Response Models
All new endpoints return typed Pydantic models. A new models.py module
defines ServiceResponse, HealthCheckResult, UptimeResponse,
HealthHistoryResponse, RegistryStatsResponse, and ServiceCountResponse.
These feed into the auto-generated OpenAPI spec at /docs and /openapi.json,
enabling future SDK auto-generation.
Testing
38 new tests covering DB methods and all API endpoints (243 total, all passing).
What's Next (Sprint 4+)
- APRS-native discovery: message RGSTRY from radio to list/find services
- Registration authentication (API keys)
- Capability flags for structured command metadata