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

filter based on entityName

Cky007
Participant

While I trying to filter the entities based on entityName I'm not able to fetch with https://{your-environment}/api/v2/metrics/query?entitySelector=entityname.equals(%22{entityname}%22). with this api I'm not able to fetch the entites so help me out to fetch the entites on base of entityName.

3 REPLIES 3

@Cky007 , your trying use metric query API, where you pull the metric values.

To Fetch Entitles and entity details  you may need to use below APIs 

https://docs.dynatrace.com/docs/shortlink/api-entities-v2-get-all-entities-list
https://docs.dynatrace.com/docs/shortlink/api-entities-v2-get-entity

 

Regards,

Venkat

Cky007
Participant

But with the metric query I pulled entityID data. If possible share me an sample url with entityName function

and entitySelector parameter

 

Cky007
Participant

curl -L -X GET 'https://{environmentid}.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:host.cpu.(usa...' \
-H 'Authorization: Api-Token abcdefjhij1234567890' \
-H 'Accept: application/json'
With the help of entityId i can retrive right

 

Featured Posts