cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I get a specific maintenance window via the API?

grogers
Contributor

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

 

9 REPLIES 9

JamesKitson
Dynatrace Guru
Dynatrace Guru

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


So on further investigation, I can get specific MWs that are created via the API, but not via the UI.


Hm interesting - yeah the ones I tried to get were from the UI as well.


wolfgang_beer
Dynatrace Leader
Dynatrace Leader

Did you try to access it by using the UUID that is generated by Dynatrace?


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"
}
}

Did you ever figure out a way to get the individual details or UUID? I'm having the same issue.


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.


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


p000apaes
Newcomer

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.


Featured Posts