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 string required

Monitor ID.

target number default: 99.9

SLA target percentage.

days integer default: 30

Lookback period in days.

Request

bash
curl -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).

Real measured uptime percentage over the lookback window.

compliant boolean

true if actual_uptime >= target.

Total recorded downtime in minutes.

Minutes of downtime you can still incur before breaching the SLA.

Ask a question... ⌘I