Retrieve Check Stats for an Organization's Uptime Monitors

ExperimentalThis API is under active development and may change.
GET /api/0/organizations/{organization_id_or_slug}/uptime-stats/

Return uptime check counts by outcome for each requested uptime monitor, in time buckets. The response maps each uptime monitor ID to a list of [timestamp, counts] pairs, sorted by time, where timestamp is the bucket start as a Unix timestamp. An uptime monitor with no checks in the range is left out.

Path Parameters

organization_id_or_slug (string)
REQUIRED

The ID or slug of the organization the resource belongs to.

Query Parameters:

uptimeDetectorId (array(integer))
REQUIRED

The IDs of the uptime monitors to return stats for, up to 100. The request fails if any of them is missing or you can't access it.

since (number)

Start of the time range, as a Unix timestamp in seconds. Defaults to one day before until.

until (number)

End of the time range, as a Unix timestamp in seconds. Defaults to now.

resolution (string)

Size of each bucket, as a number followed by s, m, h or d. Must be one of 15s, 30s, 1m, 2m, 5m, 10m, 15m, 30m, 1h, 2h, 3h, 4h, 6h, 12h or 24h, and no longer than the time range. At most 10,100 buckets are allowed. Defaults to the smallest of these that is at least the size picked for the time range.

project (array(undefined))

The IDs or slugs of projects to filter by. Project slugs are unique within each organization. Omit this parameter to include all accessible projects. -1 is also accepted to include all accessible projects. For example, the following are valid parameters:

  • /?project=1234&project=56789
  • /?project=android&project=javascript-react
  • /?project=-1

Scopes

<auth_token> requires one of the following scopes:
  • org:admin
  • org:read
  • org:write
Copied
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/uptime-stats/ \
 -H 'Authorization: Bearer <auth_token>'
RESPONSESCHEMA
Copied
.
Was this helpful?