03 Aug 2021 10:02 PM - last edited on 21 Aug 2024 10:30 AM by Michal_Gebacki
At the current time there is only an option for creating maintenance windows for monitoring, alerting and availability.
Solved! Go to Solution.
04 Aug 2021 02:18 PM
I am not sure when a dedicated API endpoint will be available - but you are able to create OneAgent Update Maintenance Windows using the Dynatrace API Objects endpoint, 'api/v2/setting/objects'.
You simply need to provide the proper JSON input for the object and schemaId, here is an example that you can use and tweak for your needs (Which enables the OneAgents to update only on Sundays from 12pm-11pmEST - environment-wide):
"[ { "schemaId": "builtin:deployment.management.update-windows", "scope": "environment", "value": { "enabled": true, "name": "OneAgent Sunday Updates - 12pm-11pm EST", "recurrence": "WEEKLY", "weeklyRecurrence": { "selectedWeekDays": { "monday": false, "tuesday": false, "wednesday": false, "thursday": false, "friday": false, "saturday": false, "sunday": true }, "every": 1, "updateTime": { "startTime": "12:00", "timeZone": "GMT-04:00", "duration": 660 }, "recurrenceRange": { "start": "2021-05-25T00:00:00Z", "end": "2025-05-25T00:00:00Z" } } } } ]"