21 Mar 2024 09:37 PM - last edited on 08 Aug 2024 02:37 PM by Michal_Gebacki
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
Solved! Go to Solution.
22 Mar 2024 10:56 AM - edited 25 Mar 2024 07:39 AM
Hi,
I would use Data Explorer to filter information you are interested:
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