How do I view all configured maintenance windows?

The maintenance REST endpoint enables 3rd party tools to read all configured maintainence windows and downtimes within a monitored environment. Please note that to use the Configuration API, an additional permission scope must be enabled for your Dynatrace API token. You find the scope toggle within your Dynatrace API token config.

The following HTTP GET request returns the details of a specific maintenance window:

https://{id}.live.dynatrace.com/api/v1/maintenance/{mwid}

The following HTTP GET request returns all defined maintainence windows and downtimes within your environment:

https://{id}.live.dynatrace.com/api/v1/maintenance/

The following request parameters can be used to filter the returned list of maintenance windows:

  • from, to: Specifies a time frame for the query as a Unix Epoch timestamp in milliseconds (default is all windows).
  • type: Values are Planned or Unplanned.

Result

The query result returns a JSON object that contains an array of single events. Each event contains at least the following meta information elements, along with event-specific properties:

  • id: Unique maintenance window identifier.
  • type: The type of the downtime either Planned or Unplanned.
  • description: Textual description of a maintenance window.
  • suppressAlerts: Suppresses the sending of alerts for problems detected during maintenance windows.
  • suppressProblems: Disables problem detection within the scope of the maintenance window.
  • scope:The defined scope of the maintenance window.
  • schedule: Specifies the schedule of the maintenance window. Can be either a one-time window or a recurring schedule of maintenance windows.

The following example shows the result of a successful call to an environment's maintenance endpoint:

[
  {
    id: "New application deployment",
    type: "Planned",
    description: "We will deploy a new easyTravel application version",
    suppressAlerts: false,
    suppressProblems: false,
    scope: null,
    schedule: {
      type: "Day",
      timezoneId: "Europe/Vienna",
      maintenanceStart: "2017-08-29 14:43",
      maintenanceEnd: "2017-08-29 15:43",
      recurrence: {
        start: "14:43",
        duration: 556
      }
    }
  }
]