15 Aug 2018 03:00 PM - last edited on 25 May 2021 12:51 PM by MaciejNeumann
When I try to get a specific Maintenance Window, I get no results from the API. Getting all MWs works fine, but I want to get a specific one.
https://path_to/e/my_managed_instance/api/v1/maintenance/test_mw
Solved! Go to Solution.
15 Aug 2018 03:46 PM
I tried this and saw the same behavior. I'll update once I can find if this is an error in what we're sending or if it is a bug in the API.
James
15 Aug 2018 04:15 PM
So on further investigation, I can get specific MWs that are created via the API, but not via the UI.
15 Aug 2018 06:48 PM
Hm interesting - yeah the ones I tried to get were from the UI as well.
20 Aug 2018 05:25 AM
Did you try to access it by using the UUID that is generated by Dynatrace?
20 Aug 2018 01:22 PM
No, I don't see a way to get that UUID, it's not exposed in the UI or the API when getting all Maintenance Windows.
{
"id": "test_mw",
"type": "Planned",
"description": "Test MW for Python Development",
"suppressAlerts": false,
"suppressProblems": false,
"scope": {
"entities": [],
"matches": [
{
"type": "HOST",
"tags": [
{
"context": "CONTEXTLESS",
"key": "Confluence"
}
]
}
]
},
"schedule": {
"type": "Once",
"timezoneId": "America/Chicago",
"maintenanceStart": "2018-08-15 21:00",
"maintenanceEnd": "2018-08-15 22:00"
}
}
07 Sep 2018 10:44 AM
Did you ever figure out a way to get the individual details or UUID? I'm having the same issue.
07 Sep 2018 01:18 PM
It appears that the API will return entries created in the API, but not those that are entered in the UI. I haven't seen the ability to get MWs by UUID.
28 Aug 2019 06:28 AM
Please use the /api/v1/config API. It exposes all the maintenance windows and represents the newer and advanced endpoint for all configurations. We will announce the deprecation of the old maintenance window endpoint soon.
Regards,
Wolfgang
27 Aug 2019 06:40 PM
Is there any plan to have this functionality working ? I don't see much sense on having it working only for MW created by API.