SLA tracking
SLA compliance, error budget, and downtime analysis.
SLA tracking
GET /analytics/sla
SLA compliance, error budget, and downtime analysis.
Auth: Bearer token (read scope)
Query parameters
Monitor ID.
SLA target percentage.
Lookback period in days.
Request
bashcurl -H "Authorization: Bearer hu_..." \ "https://happyuptime.com/api/v1/analytics/sla?monitor_id=mon_abc123&target=99.9"
Response
json{ "data": { "target": 99.9, "actual_uptime": 99.97, "compliant": true, "total_downtime_minutes": 12.96, "remaining_budget_minutes": 30.24 } }
Response fields
target number
The SLA target you passed in (e.g., 99.9).
actual_uptime number
Real measured uptime percentage over the lookback window.
compliant boolean
true if actual_uptime >= target.
total_downtime_minutes number
Total recorded downtime in minutes.
remaining_budget_minutes number
Minutes of downtime you can still incur before breaching the SLA.