- API Reference
- Box API
- Stats & logs
Read per-10-minute uptime of one slot for each day in a range
Use this to draw an uptime chart. The range may span at most about 3 months (93 days). data is keyed by the epoch second of each day, walking back from end_date in 24-hour steps; each day has 144 ten-minute buckets with status 1 (up), 0 (down) or null (no data).
GET
/v2/stats/uptime_statsQuery parameters
positionintegerrequired
start_dateintegerrequired
Epoch seconds.
end_dateintegerrequired
Epoch seconds.
Responses
Uptime buckets or an error.
statusbooleanoptional
msgstringoptional
dateintegeroptional
Echo of start_date.
dataobjectoptional
The caller is not trusted (not loopback, LAN, whitelisted or allowed Tailscale) and sent no valid Basic credentials. The body depends on whether "Basic auth for all API" is on. Routes that also use the panel login can answer a plain-text 401 "Unauthorized Access" instead.
Errors returned in msg
| msg | Meaning | What to do |
|---|---|---|
position, start_date and end_date are required | A parameter is missing or not an integer. | Send all three as integers. |
Please select date range is not over than 3 months! | The range is 93 days or more. | Shorten the range. |
Have an error during request! Contact administrator! | The database query failed. | Retry; check the box logs. |