# How do I update maintenance windows via the API v2?

**URL:** <https://community.dynatrace.com/t/how-do-i-update-maintenance-windows-via-the-api-v2/48465>\
**Category:** Dynatrace API\
**Tags:** settings, maintenance-window, dynatrace-api\
**Created:** [October 22, 2024, 11:21am UTC](https://community.dynatrace.com/t/how-do-i-update-maintenance-windows-via-the-api-v2/48465 "2024-10-22T11:21:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![badgerfifteen](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@badgerfifteen](https://community.dynatrace.com/u/badgerfifteen)\
**Post date:** [October 22, 2024, 11:21am UTC](https://community.dynatrace.com/t/how-do-i-update-maintenance-windows-via-the-api-v2/48465/1 "2024-10-22T11:21:27Z")

</div>

Hi,

For context, I am using the Settings - Objects API

![badgerfifteen_0-1729595956300.png](https://global.discourse-cdn.com/dynatrace/optimized/2X/5/5c0ca1245e0eb5eacc57fb19ccbc1404a9c4a785_2_690x26.png)

I’m looking to create an application which calls the Dynatrace API to update an existing maintenance window. When I put the object ID, I get the following 404 error:

```auto
"message": "Configuration schema builtin:alerting.maintenance-window does not exist with version 1.0.0."

```

I can’t see any other API which would allow me to update a maintenance window, other than the deprecated one which I can’t use for obvious reasons.

Any ideas? Would be greatly appreciated 🙂

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [October 22, 2024, 11:57am UTC](https://community.dynatrace.com/t/how-do-i-update-maintenance-windows-via-the-api-v2/48465/2 "2024-10-22T11:57:51Z")

</div>

Hello&nbsp;[@badgerfifteen](https://community.dynatrace.com/user/67521)

As per the latest Dynatrace version, Maintenance window via environment API has been deprecated, so you can use Environment API v2 “Settings - Objects”

 ![2024-10-22_15h50_32.png](https://global.discourse-cdn.com/dynatrace/original/2X/0/03cde9925dd38bec9f75b812f4c1dca179fcb7cc.png)

**Simply you will :**

1. Get the Object ID using token with settings.read scope.
2. Put The Object ID using settings.write scope, and execute the required actions

**As per attached steps (1)**

![2024-10-22_15h53_31.png](https://global.discourse-cdn.com/dynatrace/optimized/3X/d/b/db64cfec1b6a5451ad793209c0c5653c19175d1c_2_690x30.png)

(2)

 ![2024-10-22_15h56_16.png](https://global.discourse-cdn.com/dynatrace/original/2X/4/4e41207db94f7bc03ab143dc3feaf4312c03c671.png)

All the best.

KR,

Peter
