Monitor availability

Get a monitor's availability and SLA summary for a date range. The range defaults to the monitor's whole lifetime.

GET https://incidents.betterstack.com/api/v3/monitors/{id}/sla
id string required

The ID of the monitor.

from string

First day of the range, as a date like 2021-01-26. The range starts at midnight UTC that day. Required when you send to.

to string

Last day of the range, as a date like 2021-01-27. The range ends at the end of that day in UTC. Defaults to now.

team_id string

Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.

Authorization string required

Bearer $TOKEN

200 OK
{
  "data": {
    "id": "258338",
    "type": "monitor_sla",
    "attributes": {
      "availability": 99.98,
      "total_downtime": 600,
      "number_of_incidents": 3,
      "longest_incident": 300,
      "average_incident": 200
    }
  }
}

Returns the monitor's availability summary.

id string

ID of the monitor.

type string

Always monitor_sla.

availability number

Percentage of the range the monitor was up, from 0 to 100, rounded to four decimal places.

total_downtime integer

Downtime within the range, in whole seconds.

number_of_incidents integer

Number of incidents that overlap the range.

longest_incident integer

Downtime of the longest incident within the range, in whole seconds.

average_incident integer

Average downtime per incident within the range, in whole seconds. 0 when there were no incidents.

Example cURL

Monitor availability
curl --request GET \
  --url "https://incidents.betterstack.com/api/v3/monitors/123456789/sla?from=2021-01-26&to=2021-01-27" \
  --header "Authorization: Bearer $TOKEN"