cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Retrieve all the services of a process group using API call

nayana
Newcomer

Hello Team,

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

/api/v2/entities and below 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

1 REPLY 1

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

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

AntonPineiro_0-1711104926228.png

And you can use a query as that:

 

 

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

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Featured Posts