Hi,
I’d like to create a maintenance window for all hosts within a specific DC (GEOLOC_Site) through API, however I’m not able to figure out the correct JSON to do this, beside quering for all entities prior the request and concatenate them within the entities.
I’d like to archive something like this:
"scope": {<br> "entities": [],<br> "matches": [<br> {<br> "type": "HOST",<br> "managementZoneId": null,<br> "tags": [<br> {<br> "context": "ENVIRONMENT",<br> "key": "GEOLOC_SITE",<br> "value": "GEOLOC_SITE-123456789abdcf"<br> }<br> ]<br> }<br> ]<br> },
kind regards
René
Hi René
You are on the right track. However; we would use the type element in the MonitoredEntityFilter object to specify the geolocation. Documentation can be found on this here:
Such as:
- “type”: “Geolocation”,
- “managementZoneId”: example
If you navigate to your tenant. You can click the oneagent icon in the top right corner, you can navigate to configuration API to test a few queries 
-Michael
Hi all,
i want to achieve nearly the same, but scope being limited to one management zone.
However using this
[
{
"schemaId": "builtin:alerting.maintenance-window",
"scope": {
"entities": [],
"matches": [
{
"type": "HOST",
"managementZoneId": "-89498072342349753701"
}
]
},
does give me a 400 in Postman (
“Could not map JSON at ‘[0].scope’ near line 4 column 18”)
How do i define the scope here? Am i blind? 
Many thanks,
Bjoern