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

**URL:** <https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799>\
**Category:** Dynatrace API\
**Tags:** maintenance-window, dynatrace-api\
**Created:** [August 15, 2018, 2:00pm UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799 "2018-08-15T14:00:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![grogers](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/grogers/32/25969_2.png) [@grogers](https://community.dynatrace.com/u/grogers)\
**Post date:** [August 15, 2018, 2:00pm UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/1 "2018-08-15T14:00:38Z")

</div>

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.

```auto
https://path_to/e/my_managed_instance/api/v1/maintenance/test_mw

```

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [August 15, 2018, 2:46pm UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/2 "2018-08-15T14:46:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![grogers](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/grogers/32/25969_2.png) [@grogers](https://community.dynatrace.com/u/grogers)\
**Post date:** [August 15, 2018, 3:15pm UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/3 "2018-08-15T15:15:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [August 15, 2018, 5:48pm UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/4 "2018-08-15T17:48:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [August 20, 2018, 4:25am UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/5 "2018-08-20T04:25:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![grogers](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/grogers/32/25969_2.png) [@grogers](https://community.dynatrace.com/u/grogers)\
**Post date:** [August 20, 2018, 12:22pm UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/6 "2018-08-20T12:22:37Z")

</div>

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.

```auto
{
	"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"
	}
}

```

---

<div class="post-metadata">

**Author:** ![scott\_newbold](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@scott\_newbold](https://community.dynatrace.com/u/scott_newbold)\
**Post date:** [September 7, 2018, 9:44am UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/7 "2018-09-07T09:44:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![grogers](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/grogers/32/25969_2.png) [@grogers](https://community.dynatrace.com/u/grogers)\
**Post date:** [September 7, 2018, 12:18pm UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/8 "2018-09-07T12:18:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![p000apaes](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/p000apaes/32/3497_2.png) [@p000apaes](https://community.dynatrace.com/u/p000apaes)\
**Post date:** [August 27, 2019, 5:40pm UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/9 "2019-08-27T17:40:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [August 28, 2019, 5:28am UTC](https://community.dynatrace.com/t/how-do-i-get-a-specific-maintenance-window-via-the-api/14799/10 "2019-08-28T05:28:25Z")

</div>

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
