Maintenance windows¶
Use the maintenance scope to mark planned downtime. Probes continue during a window and those checks are counted separately from regular uptime. Start times are inclusive and end times are exclusive. If windows overlap, the monitor stays in maintenance until all overlapping windows end.
Choose a window ID for each deploy and reuse it when retrying the same operation. IDs are 1–96 characters, start with a letter or digit, and may contain letters, digits, hyphens, and underscores.
WINDOW="https://live.tvr.works/v1/monitors/$MONITOR_ID/maintenance/$DEPLOY_ID"
printf 'Authorization: Bearer %s\n' "$LIVE_MAINTENANCE_TOKEN" |
curl -fsS -X PUT -H @- "$WINDOW/start"
# Deploy and verify the monitored service.
printf 'Authorization: Bearer %s\n' "$LIVE_MAINTENANCE_TOKEN" |
curl -fsS -X PUT -H @- "$WINDOW/stop"
Start a window with an empty body. Repeating start returns the stored window. A closed window stays closed.
Stop with an empty body to use the current time. To record a missed stop, send JSON with the actual endsAt timestamp. To record a window you never opened, send both startsAt and endsAt to the window URL with a fresh ID. Send UTC timestamps ending in Z. A correction outside raw check retention returns 409 with earliestCorrectableAt.
See the API reference for the list, start, stop, and backfill operations.