# Trying to get the ID of a Management Domain

**URL:** <https://community.dynatrace.com/t/trying-to-get-the-id-of-a-management-domain/42116>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [October 17, 2023, 8:45am UTC](https://community.dynatrace.com/t/trying-to-get-the-id-of-a-management-domain/42116 "2023-10-17T08:45:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![francois\_dejage](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@francois\_dejage](https://community.dynatrace.com/u/francois_dejage)\
**Post date:** [October 17, 2023, 8:45am UTC](https://community.dynatrace.com/t/trying-to-get-the-id-of-a-management-domain/42116/1 "2023-10-17T08:45:44Z")

</div>

Greetings:

I found the following:

[@Solved: I’m trying to POST an event.. but where do I find the ENTITYID? - Dynatrace Community](https://community.dynatrace.com/post/121632)

but when I try the same to get the Managment domain and use it in an API call I get:

Cannot deserialize value:

This is a portion of the URL id=e3fe8df4-

**Question:** how do I convert the value provided in the URL into a number that the API can understand?

Or

Is there an API call that will give me the ID of the Managment Domain?

Regards

---

<div class="post-metadata">

**Author:** ![victor\_balbuena](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/victor_balbuena/32/9773_2.png) [@victor\_balbuena](https://community.dynatrace.com/u/victor_balbuena)\
**Post date:** [October 17, 2023, 9:57am UTC](https://community.dynatrace.com/t/trying-to-get-the-id-of-a-management-domain/42116/2 "2023-10-17T09:57:01Z")

</div>

Is a Management Domain a Management Zone? If so, you can get the ID of a management zone either with the [Management Zone API](https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/management-zones-api) (using the old v1 API) or the [Settings v2 API](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/settings), using the&nbsp; **builtin:management-zones** schema Id.

Consider, however, that if you’re trying to post an event, you can’t push it to Management Zone, you need to choose one or multiple entities to push it to. A management zone is a settings object, meanwhile an entity is a host, a process, a service, etc. The closest thing you can do is use the&nbsp; **entitySelector** field to specify the Management Zone you want to use, but that would push the event to&nbsp;_every entity_ in that Management Zone, so it’s definitely not advised.

---

<div class="post-metadata">

**Author:** ![francois\_dejage](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@francois\_dejage](https://community.dynatrace.com/u/francois_dejage)\
**Post date:** [October 17, 2023, 10:05am UTC](https://community.dynatrace.com/t/trying-to-get-the-id-of-a-management-domain/42116/3 "2023-10-17T10:05:22Z")

</div>

Greetings

Thanks for the detailed answer and warning.

I only need the ID as I am&nbsp;I am trying to follow the following page&nbsp;[Monitored entities API - GET entities list | Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-entities-list#definition--ManagementZone)

QUOTE

In this example, the request list services that belong to the management zones with the ID of&nbsp; **229130632296508575249**. To achieve that, the&nbsp; **entitySelector** &nbsp;query parameter is set to&nbsp;type(“SERVICE”),mzId(“229130632296508575249”)

UNQUOTE

Regards

---

<div class="post-metadata">

**Author:** ![maneeshbanda18](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@maneeshbanda18](https://community.dynatrace.com/u/maneeshbanda18)\
**Post date:** [April 2, 2024, 4:02pm UTC](https://community.dynatrace.com/t/trying-to-get-the-id-of-a-management-domain/42116/4 "2024-04-02T16:02:04Z")

</div>

I was trying to use setting api to get mz id using object id but not getting mz id as a part of response.  
[mzresponse.txt](https://community.dynatrace.com/uploads/short-url/A92YBEuDLxSDwUO0iAkrsJ18Att.txt) (1.03 KB)
