# How can I pull OneAgent versions at process level?

**URL:** <https://community.dynatrace.com/t/how-can-i-pull-oneagent-versions-at-process-level/34668>\
**Category:** Dynatrace API\
**Tags:** oneagent, processes, dynatrace-api\
**Created:** [March 30, 2022, 12:00pm UTC](https://community.dynatrace.com/t/how-can-i-pull-oneagent-versions-at-process-level/34668 "2022-03-30T12:00:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadirhan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kadirhan/32/31211_2.png) [@kadirhan](https://community.dynatrace.com/u/kadirhan)\
**Post date:** [March 30, 2022, 12:00pm UTC](https://community.dynatrace.com/t/how-can-i-pull-oneagent-versions-at-process-level/34668/1 "2022-03-30T12:00:45Z")

</div>

I’m new to dynatrace. I tried to pull using api. I used monitored entities in v2 for this. But I did not understand how to pull at the process level. Can anyone help?

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [March 30, 2022, 12:06pm UTC](https://community.dynatrace.com/t/how-can-i-pull-oneagent-versions-at-process-level/34668/2 "2022-03-30T12:06:37Z")

</div>

If you want to get the version of the agent inside the process (code module) you need to query the PROCESS\_GROUP\_INSTANCE via the Entities v2 API.

It is listed there under&nbsp;_installedVersion._

You can get the Process Group Instance ID via the entities API or direct from the URL in the GUI.

---

<div class="post-metadata">

**Author:** ![kadirhan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kadirhan/32/31211_2.png) [@kadirhan](https://community.dynatrace.com/u/kadirhan)\
**Post date:** [March 30, 2022, 12:32pm UTC](https://community.dynatrace.com/t/how-can-i-pull-oneagent-versions-at-process-level/34668/3 "2022-03-30T12:32:04Z")

</div>

Thanks for your answer it was really helpful. can I ask one more question?

I also want to get actualMonitoringState and expectedMonitoringState information, how can I add them

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [May 3, 2022, 8:59am UTC](https://community.dynatrace.com/t/how-can-i-pull-oneagent-versions-at-process-level/34668/4 "2022-05-03T08:59:38Z")

</div>

From here have you got those field names? I don’t see them as part of a PGI.
