# How to get OneAgent versions for all enviroment hosts?

**URL:** <https://community.dynatrace.com/t/how-to-get-oneagent-versions-for-all-enviroment-hosts/37894>\
**Category:** Open Q&A\
**Tags:** oneagent, hosts-classic\
**Created:** [January 5, 2023, 7:10pm UTC](https://community.dynatrace.com/t/how-to-get-oneagent-versions-for-all-enviroment-hosts/37894 "2023-01-05T19:10:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![tibebe\_m\_digafe](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tibebe\_m\_digafe](https://community.dynatrace.com/u/tibebe_m_digafe)\
**Post date:** [January 5, 2023, 8:52pm UTC](https://community.dynatrace.com/t/how-to-get-oneagent-versions-for-all-enviroment-hosts/37894/2 "2023-01-05T20:52:55Z")

</div>

Hello,

You may want to try&nbsp; environment API v2:&nbsp;/entities&nbsp; &nbsp; (monitored entities)

Example:&nbsp;curl -X GET “[https://dt-host/e/](https://apm.cbp.dhs.gov/e/) **\<tenantId\>** /api/v2/entities?entitySelector=type%28HOST%29&fields=properties” -H “accept: application/json; charset=utf-8” -H “Authorization: Api-Token **\<yourToken\>** ”

Extract from response:

```markup
"osType": "LINUX",
        "state": "RUNNING",
        "physicalMemory": 99129450496,
        "detectedName": "hostFQDN",
        "installerVersion": "1.255.179.20221213-180126",

```

Tibebe

---

_[View the full topic](https://community.dynatrace.com/t/how-to-get-oneagent-versions-for-all-enviroment-hosts/37894)._
