# V2 API - Get Platform and Get Number of CPUs

**URL:** <https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [February 16, 2022, 2:09pm UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164 "2022-02-16T14:09:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![louis\_gallo](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@louis\_gallo](https://community.dynatrace.com/u/louis_gallo)\
**Post date:** [February 16, 2022, 2:09pm UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164/1 "2022-02-16T14:09:19Z")

</div>

Which API do I use to get the configuration for an host entity. I am particularly interested in the number of CPUs, and in the platform (Windows, Linux, other).

Any help would be greatly appreciated.

Lou

---

<div class="post-metadata">

**Author:** ![axel\_ayala](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@axel\_ayala](https://community.dynatrace.com/u/axel_ayala)\
**Post date:** [March 3, 2022, 9:17am UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164/2 "2022-03-03T09:17:28Z")

</div>

You can use the Monitoring Entities API, here you can find the&nbsp; **osType, logicalCpuCores** &nbsp;and&nbsp; **cpuCores** &nbsp;parameters with the info you are looking for:

 ![axel_ayala_0-1646299016445.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/c/dc15c0ef4d6523cab3b39af08fdf7b312ea04a4c.png)

---

<div class="post-metadata">

**Author:** ![louis\_gallo](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@louis\_gallo](https://community.dynatrace.com/u/louis_gallo)\
**Post date:** [March 3, 2022, 1:41pm UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164/3 "2022-03-03T13:41:43Z")

</div>

Thank you. I have already started using that API to get this information.

---

<div class="post-metadata">

**Author:** ![36Krazyfists](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/36krazyfists/32/37434_2.png) [@36Krazyfists](https://community.dynatrace.com/u/36Krazyfists)\
**Post date:** [July 11, 2023, 5:27pm UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164/4 "2023-07-11T17:27:20Z")

</div>

So what’s the actual API query to get this?

Their documentation has no examples in the EntitySelector section and this is the only google result I get for how to get this data, but I don’t actually know what the API call is to get this returned.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [July 11, 2023, 10:07pm UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164/5 "2023-07-11T22:07:08Z")

</div>

Hi,

You can use&nbsp;[Monitored entities API](https://www.dynatrace.com/support/help/shortlink/api-entities-v2-get-entity).

Best regards

---

<div class="post-metadata">

**Author:** ![36Krazyfists](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/36krazyfists/32/37434_2.png) [@36Krazyfists](https://community.dynatrace.com/u/36Krazyfists)\
**Post date:** [July 12, 2023, 1:45pm UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164/6 "2023-07-12T13:45:53Z")

</div>

Yes, I can see that in the comment I replied to… My question was more what the exact query was because there are no good examples of using the Monitored Entities API in their documentation.&nbsp; There’s little snippets here and there, but no full examples like they provide in their Metrics API docs.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [July 12, 2023, 2:17pm UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164/7 "2023-07-12T14:17:13Z")

</div>

Hi,

For example, you make a GET request against “https://{environmentid}.live.dynatrace.com/api/v2/entities?pageSize=200&entitySelector=type(“HOST”)”

And you received host list:

```markup
{
    "totalCount": 1,
    "pageSize": 200,
    "entities": [
        {
            "entityId": "HOST-XXXXXXXXXXXXXXXX",
            "type": "HOST",
            "displayName": "YYYYYYYYY"
        }
    ]
}

```

Using entityId, you can get more details makinng another GET request against “https://{environmentid}.live.dynatrace.com/api/v2/entities/HOST-XXXXXXXXXXXXXXXX”.

Best regards

---

<div class="post-metadata">

**Author:** ![Saharnir](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@Saharnir](https://community.dynatrace.com/u/Saharnir)\
**Post date:** [November 1, 2023, 9:36am UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164/8 "2023-11-01T09:36:49Z")

</div>

hi,

when you get into&nbsp; API V2&nbsp; search&nbsp; for entities

![Saharnir_0-1698830946796.png](https://global.discourse-cdn.com/dynatrace/original/1X/26b70878ccf5c5c201c98d349fdc3a99e2921b4d.png)

you have field call : entityselector, put the parameter&nbsp; &nbsp; &nbsp; **type(“host”)**

seconded&nbsp;field call : fields, put the parameter&nbsp; &nbsp;&nbsp; **properties.logicalCpuCores,properties.cpucores,properties.ostype**

that give you the CPU cores ,CPU logical cores and operation system

\*\*when you run that API from the Dynatrace you will get a window with the query that you can use later on

---

<div class="post-metadata">

**Author:** ![susmita\_k](https://avatars.discourse-cdn.com/v4/letter/s/7993a0/32.png) [@susmita\_k](https://community.dynatrace.com/u/susmita_k)\
**Post date:** [January 6, 2025, 9:18pm UTC](https://community.dynatrace.com/t/v2-api-get-platform-and-get-number-of-cpus/34164/9 "2025-01-06T21:18:39Z")

</div>

Is there a list of properties available in the documenation? I need to see if number of core and storage is an option…
