This API is deprecated. Use the Settings API with the Maintenance windows (builtin:alerting.maintenance-window
) schema instead.
Gets the parameters of the specified maintenance window.
The request produces an application/json
payload.
GET | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/config/v1/maintenanceWindows/{id} |
Environment ActiveGate | https://{your-activegate-domain}/e/{your-environment-id}/api/config/v1/maintenanceWindows/{id} |
To execute this request, you need an access token with ReadConfig
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
id | string | The ID of the required maintenance window. | path | required |
Code | Type | Description |
---|---|---|
200 | Maintenance | Success |
MaintenanceWindow
objectConfiguration of a maintenance window.
Element | Type | Description |
---|---|---|
description | string | A short description of the maintenance purpose. |
id | string | The ID of the maintenance window. |
metadata | Configuration | Metadata useful for debugging |
name | string | The name of the maintenance window, displayed in the UI. |
schedule | Schedule | The schedule of the maintenance window. |
scope | Scope | The scope of the maintenance window. The scope restricts the alert/problem detection suppression to certain Dynatrace entities. It can contain a list of entities and/or matching rules for dynamic formation of the scope. If no scope is specified, the alert/problem detection suppression applies to the entire environment. |
suppressSyntheticMonitorsExecution | boolean | Suppress execution of synthetic monitors during the maintenance. |
suppression | string | The type of suppression of alerting and problem detection during the maintenance.
|
type | string | The type of the maintenance: planned or unplanned.
|
ConfigurationMetadata
objectMetadata useful for debugging
Element | Type | Description |
---|---|---|
clusterVersion | string | Dynatrace version. |
configurationVersions | integer[] | A sorted list of the version numbers of the configuration. |
currentConfigurationVersions | string[] | A sorted list of version numbers of the configuration. |
Schedule
objectThe schedule of the maintenance window.
Element | Type | Description |
---|---|---|
end | string | The end date and time of the maintenance window validity period in yyyy-mm-dd HH:mm format. |
recurrence | Recurrence | The recurrence of the maintenance window. |
recurrenceType | string | The type of the schedule recurrence.
|
start | string | The start date and time of the maintenance window validity period in yyyy-mm-dd HH:mm format. |
zoneId | string | The time zone of the start and end time. Default time zone is UTC. You can use either UTC offset |
Recurrence
objectThe recurrence of the maintenance window.
Element | Type | Description |
---|---|---|
dayOfMonth | integer | The day of the month for monthly maintenance. The value of |
dayOfWeek | string | The day of the week for weekly maintenance. The format is the full name of the day in upper case, for example
|
durationMinutes | integer | The duration of the maintenance window in minutes. |
startTime | string | The start time of the maintenance window in HH:mm format. |
Scope
objectThe scope of the maintenance window.
The scope restricts the alert/problem detection suppression to certain Dynatrace entities. It can contain a list of entities and/or matching rules for dynamic formation of the scope.
If no scope is specified, the alert/problem detection suppression applies to the entire environment.
Element | Type | Description |
---|---|---|
entities | string[] | A list of Dynatrace entities (for example, hosts or services) to be included in the scope. Allowed values are Dynatrace entity IDs. |
matches | Monitored | A list of matching rules for dynamic scope formation. If several rules are set, the OR logic applies. |
MonitoredEntityFilter
objectA matching rule for Dynatrace entities.
Element | Type | Description |
---|---|---|
mzId | string | The ID of a management zone to which the matched entities must belong. |
tagCombination | string | The logic that applies when several tags are specified: AND/OR. If not set, the OR logic is used.
|
tags | Tag | The tag you want to use for matching. You can use custom tags from the UI, AWS tags, Cloud Foundry tags, OpenShift/Kubernetes, and tags based on environment variables. |
type | string | The type of the Dynatrace entities (for example, hosts or services) you want to pick up by matching.
|
TagInfo
objectTag of a Dynatrace entity.
Element | Type | Description |
---|---|---|
context | string | The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the
|
key | string | The key of the tag. Custom tags have the tag value here. |
value | string | The value of the tag. Not applicable to custom tags. |
{"description": "An example Maintenance window","metadata": {"clusterVersion": "Mock version","configurationVersions": [4,2]},"name": "Example Window","schedule": {"end": "2019-02-27 00:00","recurrence": {"dayOfMonth": "23","durationMinutes": "60","startTime": "16:28"},"recurrenceType": "MONTHLY","start": "2018-08-02 00:00","zoneId": "Europe/Vienna"},"scope": {"entities": ["HOST-0000000000123456"],"matches": [{"mzId": "123456789","tagCombination": "AND","tags": [{"context": "AWS","key": "testkey","value": "testvalue"}],"type": "HOST"}]},"suppressSyntheticMonitorsExecution": "true","suppression": "DETECT_PROBLEMS_AND_ALERT","type": "UNPLANNED"}
In this example, the request inquires about the properties of the infrastructure maintenance maintenance window, which has the ID 0b989446-e56f-4837-a521-96f4d39a9b76.
The configuration has the following settings:
The API token is passed in the Authorization header.
curl -X GET \"https://mySampleEnv.live.dynatrace.com/api/config/v1/maintenanceWindows/0b989446-e56f-4837-a521-96f4d39a9b76" \-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890'
https://mySampleEnv.live.dynatrace.com/api/config/v1/maintenanceWindows/0b989446-e56f-4837-a521-96f4d39a9b76
{"metadata": {"configurationVersions": [0],"clusterVersion": "1.175.0.20190731-075319"},"id": "0b989446-e56f-4837-a521-96f4d39a9b76","name": "infrastructure maintenance","description": "Monthly check-up of infrastructure","type": "PLANNED","suppression": "DETECT_PROBLEMS_DONT_ALERT","scope": {"entities": [],"matches": [{"type": "HOST","managementZoneId": null,"tags": [{"context": "CONTEXTLESS","key": "InfWindows"},{"context": "CONTEXTLESS","key": "InfLinux"}],"tagCombination": "OR"}]},"schedule": {"recurrenceType": "MONTHLY","recurrence": {"dayOfWeek": null,"dayOfMonth": 31,"startTime": "19:00","durationMinutes": 60},"start": "2019-07-01 00:00","end": "2020-07-31 23:59","zoneId": "Europe/Vienna"}}
200