URL parameters
The ID of the monitor you want to get
Query parameters
Start date (e.g., 2021-01-26)
End date (e.g., 2021-01-27)
Headers
Bearer $TOKEN
Returns availability summary for a specific monitor.
URL parameters
The ID of the monitor you want to get
Query parameters
Start date (e.g., 2021-01-26)
End date (e.g., 2021-01-27)
Headers
Bearer $TOKEN
Returns the availability summary since the monitor was created or for the specified date range.
The values of total_downtime
, longest_incident
, and average_incident
are in seconds
Response body
{
"data": {
"id": "258338",
"type": "monitor_sla",
"attributes": {
"availability": 99.98,
"total_downtime": 600,
"number_of_incidents": 3,
"longest_incident": 300,
"average_incident": 200
}
}
}
When the optional from and to dates are invalid (e.g., the start date is in the future or the end date is before the start date).
Response body
{
"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 after the start time."
}
curl --request GET \
--url https://uptime.betterstack.com/api/v2/monitors/123456789/sla?from=2021-01-26&to=2021-01-27 \
--header "Authorization: Bearer $TOKEN"
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.