# Retrieve all the services of a process group using API call

**URL:** <https://community.dynatrace.com/t/retrieve-all-the-services-of-a-process-group-using-api-call/44801>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [March 21, 2024, 9:37pm UTC](https://community.dynatrace.com/t/retrieve-all-the-services-of-a-process-group-using-api-call/44801 "2024-03-21T21:37:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nayana](https://avatars.discourse-cdn.com/v4/letter/n/8baadc/32.png) [@nayana](https://community.dynatrace.com/u/nayana)\
**Post date:** [March 21, 2024, 9:37pm UTC](https://community.dynatrace.com/t/retrieve-all-the-services-of-a-process-group-using-api-call/44801/1 "2024-03-21T21:37:08Z")

</div>

Hello Team,

I am trying to retrieve all the services of a process group through api call

/api/v2/entities and below&nbsp;entitySelector

entitySelector=type(SERVICE),entityId($PROCESS\_GROUP\_ID)&fields=fromRelationships,tags" -H “accept: application/json”

its responding with null value. Please help me on this

---

<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:** [March 22, 2024, 10:56am UTC](https://community.dynatrace.com/t/retrieve-all-the-services-of-a-process-group-using-api-call/44801/2 "2024-03-22T10:56:07Z")

</div>

Hi,

I would use Data Explorer to filter information you are interested:

 ![AntonPineiro_0-1711104926228.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/e/eedf12f6a28bfba06b34c851c8d36a1b9841eed2.png)

And you can use a query as that:

```markup
curl -X GET "https://XXXXX.live.dynatrace.com/api/v2/metrics/query?metricSelector=(builtin:service.errors.total.rate:filter(and(or(in(\"dt.entity.service\",entitySelector(\"type(service),fromRelationship.runsOn(type(PROCESS_GROUP),entityName.equals(~\"XXXXX~\"))\"))))):splitBy(\"dt.entity.service\"):sort(value(auto,descending))):names&from=-7d&to=now&resolution=Inf" -H "accept: application/json" -H "Authorization: Api-Token XXXX-XXXX"

```

Another option can be user DQL is you are in a Grail enabled tenant.

Best regards
