Hi All,
Can some provide example for building maintenance window via API with the new mode?
The bellow way seems to be removed and routed to the second one, but not too easy to use:
Have a nice day.
Solved! Go to Solution.
Hi Malaik,
you can try following against the /api/v2/settings/objects endpoint
[
{
"schemaId": "builtin:alerting.maintenance-window",
"scope": "environment",
"value": {
"enabled": true,
"generalProperties": {
"name": "Example Window",
"description": "An example Maintenance window",
"maintenanceType": "UNPLANNED",
"suppression": "DETECT_PROBLEMS_AND_ALERT",
"disableSyntheticMonitorExecution": true
},
"schedule": {
"scheduleType": "MONTHLY",
"monthlyRecurrence": {
"dayOfMonth": 1,
"timeWindow": {
"startTime": "13:45:00",
"endTime": "14:45:00",
"timeZone": "Europe/Vienna"
},
"recurrenceRange": {
"scheduleStartDate": "2022-04-01",
"scheduleEndDate": "2022-05-26"
}
}
},
"filters": [
{
"entityType": "HOST",
"entityTags": [
"[AWS]testkey:testvalue"
]
},
{
"entityType": "HOST",
"entityId": "HOST-0A7500C12EB9471D",
"entityTags": [],
"managementZones": []
}
]
}
}
]
Make sure the version defined in the payload matches the one you also see in your environment
Hope this helps.
Best,
Mark
Thanks @mark_bley
Solution found last time, thanks for your comment.
Just a comment, where can I get the view for schema version.
@mark_bley is right
similar thread marked closed already Solved: Re: When will maintenance windows via the API for OneAgents will be available ? - Dynatrace ...