Uptime from the API
The API gives the same uptime figure as a Monitor’s Uptime card, worked out the same way. It also gives what the figure leaves out, so your own page can say it too. The uptime percentage explains the figure itself.
A Monitor’s uptime
Section titled “A Monitor’s uptime”This answers the figure over the last 24 hours, 7 days, 30 days and 90 days:
curl -H "Authorization: Bearer $UUP_API_TOKEN" \ "https://api.uup.dev/v1/projects/prj_01J9Z3K8X4M2N6P8Q0R2S4T6V8/monitors/mon_01J9Z3K8X4M2N6P8Q0R2S4T6V8/uptime"Each window in windows reads like this one:
{ "window": "30d", "asOf": "2026-11-01T09:00:00.000Z", "percentage": 0.9995118549511854, "coveredSeconds": 2581200, "incidentSeconds": 1260, "notMeasuredSeconds": 10800, "notMeasuredHours": 3}percentageis the share of the time we were watching that the target was up, from 0 to 1, unrounded. It isnullwhen nothing was measured in the window.coveredSecondsis the time we were watching and could measure: the figure is worked out over it.incidentSecondsis the part of it inside an Incident: the time it was down.notMeasuredHourscounts the hours we could not measure, andnotMeasuredSecondsgives them in seconds. They are left out of both sides of the figure: neither up nor down.
Time the Monitor was paused, Suspended or not created yet is on neither side either. A window we watched for only a short time has a figure over that short time, so coveredSeconds says how much the figure stands on.
Showing it as the dashboard does
Section titled “Showing it as the dashboard does”The dashboard shows the figure above as 99.95%, with 3 hours not measured beside it. To show it the same way:
- Two decimals, rounded half up. Multiply
percentageby 100. - Never 100 while there was downtime. While
incidentSecondsis above 0, show at most 99.99: 20 seconds down in 30 days prints as 99.99%, and not 100%. - A dash when there is nothing. When
percentageisnull, show “—”, never 0 or 100. - The hours not measured beside it. When
notMeasuredHoursis above 0, say so next to the figure, as the card does with3 h not measured. The figure leaves them out, so a reader who sees only the figure would take them for good hours.
Day by day
Section titled “Day by day”This answers each day of the last week, cut at midnight in the Project’s timezone, oldest first. Ask for up to 90 days with days:
curl -H "Authorization: Bearer $UUP_API_TOKEN" \ "https://api.uup.dev/v1/projects/prj_01J9Z3K8X4M2N6P8Q0R2S4T6V8/monitors/mon_01J9Z3K8X4M2N6P8Q0R2S4T6V8/uptime/days?days=7"Each day has its own percentage, worked out over measuredSeconds, with notMeasuredSeconds and notMeasuredHours beside it, and notCoveredSeconds, the time we were not watching, by why: paused, suspended, not_yet_monitored or deleted. Its incidents are the Incidents that touched it.
The bar under the Uptime card colours each day in this order:
- Down when
incidentSecondsis above 0, however little of the day was measured. - Up when it was measured for at least 50% of the day so far.
- Grey otherwise, with the reason the day was not watched, or the hours not measured.
Every Monitor of a Project
Section titled “Every Monitor of a Project”This answers each Monitor’s figure over the last 30 days, with its days, a page at a time:
curl -H "Authorization: Bearer $UUP_API_TOKEN" \ "https://api.uup.dev/v1/projects/prj_01J9Z3K8X4M2N6P8Q0R2S4T6V8/uptime"Read on
Section titled “Read on”- The uptime percentage: how the figure is worked out, and what not measured means.
- Reference: every field of the answer.