URL parameters
The ID of your requested heartbeat
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 heartbeat.
URL parameters
The ID of your requested heartbeat
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 heartbeat 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": "824910",
    "type": "heartbeat_availability",
    "attributes": {
      "availability": 99.98,
      "total_downtime": 335,
      "number_of_incidents": 5,
      "longest_incident": 194,
      "average_incident": 67
    }
  }
}
    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 before the start time."
}
    curl --request GET \
  --url https://uptime.betterstack.com/api/v2/heartbeats/123456789/availability?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.