# Get a list of all host-group names from the environment

**URL:** <https://community.dynatrace.com/t/get-a-list-of-all-host-group-names-from-the-environment/20806>\
**Category:** Open Q&A\
**Tags:** management-zones, account-management, dynatrace-saas\
**Created:** [November 14, 2020, 5:52am UTC](https://community.dynatrace.com/t/get-a-list-of-all-host-group-names-from-the-environment/20806 "2020-11-14T05:52:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![khoros\_anonymous](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@khoros\_anonymous](https://community.dynatrace.com/u/khoros_anonymous)\
**Post date:** [November 14, 2020, 6:59am UTC](https://community.dynatrace.com/t/get-a-list-of-all-host-group-names-from-the-environment/20806/2 "2020-11-14T06:59:34Z")

</div>

You should be able to query all the OneAgents API (/api/v1/oneagents) and extract the HostGroup Object: [OneAgent on a host - GET a list of hosts with OneAgent details — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/api-oneagent-on-host#oneagents-get-response-hostgroup)

Name → “The name of the Dynatrace entity, displayed in the UI”

```auto
"hostGroup": {          

```

The name doesn’t show anything?

---

_[View the full topic](https://community.dynatrace.com/t/get-a-list-of-all-host-group-names-from-the-environment/20806)._
