Get uptime statistics
get_uptime_statisticsRead-onlyIdempotent
Get uptime and downtime percentages for a monitor over a date range, grouped per minute, hour, day, week or month, alongside the average response timings measured in each interval. Use this to answer how much downtime a site had. See https://ohdear.app/docs/api/uptime.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | End of the period, as YmdHis (20241202120000) or ISO 8601. Defaults to now. | |
| start | No | Start of the period, as YmdHis (20241201120000) or ISO 8601. Defaults to seven days ago. | |
| group_by | No | Grouping interval: minute, hour, day, week, or month | |
| monitor_id | Yes | The ID of the monitor to get statistics for |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | Requested time range and grouping interval when uptime is available. | |
| message | No | ||
| metrics | Yes | Calculated uptime metrics for each interval. | |
| monitor | Yes | ||
| view_url | No |