Explore documentation

Get a heartbeat's availability summary

Returns availability summary for a specific heartbeat.

GET https://uptime.betterstack.com/api/v2/heartbeats/{heartbeat_id}/availability

URL parameters

heartbeat_id
required string

Query parameters

from
string
to
string

Headers

Authorization
required string
200

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
    }
  }
}
400

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."
}

Example cURL

Example
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"