Monitor availability
Get a monitor's availability and SLA summary for a date range. The range defaults to the monitor's whole lifetime.
The ID of the monitor.
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.
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 to use, such as t123. Get the ID via List teams. Required when you can access more than one team.
Bearer $TOKEN
{
"data": {
"id": "258338",
"type": "monitor_sla",
"attributes": {
"availability": 99.98,
"total_downtime": 600,
"number_of_incidents": 3,
"longest_incident": 300,
"average_incident": 200
}
}
}
{
"errors": "The data range is invalid. The date format could not be parsed, the start time is in the future, or the end time is before the start time."
}
{
"errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-an-incidents-api-token"
}
{
"errors": "Team with ID t999 not found. Available team IDs: t1, t2"
}
Returns the monitor's availability summary.
The from date can't be parsed or is after today, to is sent without from, or to is before from.
The API token is missing or invalid.
Your role doesn't allow viewing this, or the token can't be used for this API.
The monitor doesn't exist, or the token can't access it.
The team in team_id isn't one the token can reach.
ID of the monitor.
Always monitor_sla.
Percentage of the range the monitor was up, from 0 to 100, rounded to four decimal places.
Downtime within the range, in whole seconds.
Number of incidents that overlap the range.
Downtime of the longest incident within the range, in whole seconds.
Average downtime per incident within the range, in whole seconds. 0 when there were no incidents.
Example cURL