How do I manage maintenance windows via the Dynatrace API?

Dynatrace uses maintenance windows to ensure accurate monitoring data during planned maintenance of your systems.

The maintenance endpoint enables you to use 3rd party tools to manage maintenance windows and downtimes within a monitored environment.

POST Maintenance window

Creates a new or updates an existing maintenance window.

The request consumes application/json payload.

POST
  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/maintenance
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v1/maintenance

GET Maintenance window

Lists all parameters of a maintenance window. You can also get the list of all maintenance windows (and their parameters) available in your Dynatrace environment.

The request produces application/json payload.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/maintenance/{mwid}
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v1/maintenance/{mwid}

DELETE Maintenance window

Deletes a specified maintenance window. Deletion can't be undone.

DELETE
  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/maintenance/{mwid}
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v1/maintenance/{mwid}