# API Call or commond to gather OneAgent Version details on Each Host

**URL:** <https://community.dynatrace.com/t/api-call-or-commond-to-gather-oneagent-version-details-on-each-host/14350>\
**Category:** Dynatrace API\
**Tags:** oneagent, dynatrace-api\
**Created:** [August 2, 2018, 5:57am UTC](https://community.dynatrace.com/t/api-call-or-commond-to-gather-oneagent-version-details-on-each-host/14350 "2018-08-02T05:57:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nj\_njoku](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nj_njoku/32/13710_2.png) [@nj\_njoku](https://community.dynatrace.com/u/nj_njoku)\
**Post date:** [August 2, 2018, 3:15pm UTC](https://community.dynatrace.com/t/api-call-or-commond-to-gather-oneagent-version-details-on-each-host/14350/2 "2018-08-02T15:15:46Z")

</div>

Hi Prashant,

The API call to fetch the list of monitored hosts contains the agent version information for each host. You should see something like " **agentVersion:{major:1, minor:139, revision:240, sourceRevision":“”, timestamp:“xxxxxx”}.** This translates to agent version 139.240 on that host that was updated on the value of the time-stamp.

See details on the documentation of this API call [here](https://www.dynatrace.com/support/help/dynatrace-api/topology-and-smartscape/how-do-i-fetch-the-list-of-monitored-hosts/)

Using python, you can retrieve this data in a way that is more presentable by combining the values of minor and revision. You may want to verify what version you are running as I believe this became possible in server v139 or v140 for managed. Hope this helps

Thanks

NJ

---

_[View the full topic](https://community.dynatrace.com/t/api-call-or-commond-to-gather-oneagent-version-details-on-each-host/14350)._
