GET /v1/uptime
Uptime for each service, by day
Returns each of our services' uptime for the last 90 UTC days, oldest first. A day's percentage is the share of its samples in which the service was running. A day with no samples has a null percentage. Before the first sample it returns 503 with the code not_ready. The response may be cached for five minutes.
Auth. None. Anyone can call this route.
Responses
| Status | Meaning | Body |
|---|---|---|
200 | Uptime by day, per service | Uptime |
429 | Too many requests from this client address. Retry after the Retry-After seconds. | Error |
503 | No sample yet | NotReady |
Example response
{
"version": 0,
"window_days": 0,
"services": [
{
"name": "string",
"days": [
{}
]
}
]
}
Code samples
Set KEY to your own token first.
curl
curl \
"https://api.sasek.org/telemetry/v1/uptime"
JavaScript
const res = await fetch("https://api.sasek.org/telemetry/v1/uptime", {
});
const data = await res.json();
Python
import json
import os
import urllib.request
request = urllib.request.Request(
"https://api.sasek.org/telemetry/v1/uptime",
method="GET",
)
with urllib.request.urlopen(request) as response:
print(json.load(response))