Maintenance windows allow you to suppress alerts during planned maintenance periods. This endpoint returns all maintenance windows configured in your account, including their schedules and affected resources.
During maintenance windows, checks continue to run but alerts are suppressed. This prevents unnecessary notifications during planned downtime.
Determine if a maintenance window is currently active:
Copy
Ask AI
function isMaintenanceActive(window) { const now = new Date(); const starts = new Date(window.startsAt); const ends = new Date(window.endsAt); return now >= starts && now <= ends;}
Upcoming Status
Check if a maintenance window is scheduled in the future:
Copy
Ask AI
function isMaintenanceUpcoming(window) { const now = new Date(); const starts = new Date(window.startsAt); return starts > now;}
Maintenance windows are essential for managing alert fatigue during planned maintenance. They ensure your team only receives notifications for unexpected issues, not planned downtime.
The Checkly Public API uses API keys to authenticate requests. You can get the API Key here. Your API key is like a password: keep it secure!
Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.
For example, set Authorization header while using cURL: curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"