Get hourly per-region metrics
const url = 'https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/uptime/monitors/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metrics?hours=24';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/uptime/monitors/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metrics?hours=24' \ --header 'x-api-key: <x-api-key>'Hourly per-region latency and failure buckets for charts. Buckets are
closed hours only — combine with the /live endpoint for the open
hour. uptimePct uses the same incident-based definition as the
day-bar report, over this range.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The site’s UUID.
The uptime monitor’s UUID.
Query Parameters
Section titled “ Query Parameters ”How many hours to cover, ending now. Defaults to 24, capped at 2160 (90 days).
Responses
Section titled “ Responses ”Hourly buckets, incidents in range, and the range’s uptime %.
object
A stored uptime monitor. status/status_since double as current status.
object
JSON-encoded array of extra alert addresses.
JSON-encoded array of extra alert webhooks.
Consensus status written by the coordinator; unknown before the first probes.
Epoch ms the current status began, or null.
Epoch ms of the last probe, or null.
Epoch ms of the first bucket.
One closed hour of one region’s probes.
object
Epoch ms of the hour’s start.
A confirmed downtime incident (multi-region consensus).
object
Epoch ms the incident was confirmed.
Epoch ms of recovery, or null while ongoing.
Why the probes failed, classified.
JSON per-region probe snapshot captured at confirmation.
Example
{ "monitor": { "enabled": 0, "status": "up" }, "hours": [ { "region": "na" } ], "events": [ { "cause": "dns" } ]}Missing or invalid credentials.
object
A human-readable error message.
Example
{ "error": "invalid api key"}The site or monitor was not found.
object
A human-readable error message.
Example
{ "error": "monitor not found"}