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

Dynatrace V2 Metrics API - Metrics for Only One Tag


Okay, my journey becoming acclimated to the V2 API continues.


How do I limit my entities returned to only one particular application tag? I only want the entities returned in "SomeApplication:SomeApp". The way I am doing it here works but it returns every entity it can find."SomeApplication:SomeApp")  


Any help is appreciated.




Dynatrace Champion
Dynatrace Champion

Hi Lou,


If you have a tag called "SomeApplication" with value "SomeApp" you can add this using the tag entry of the entitySelector parameter.


Your query:


Is invalid, so I am surprised it works at all. entityName should be part of the entitySelector parameter, but will only work for matching entity names - however, in this case I think it is disregarded completely as it's not part of entitySelector query parameter. Also there is no need to specify "to" when the time is relative as that already implies it's to now.


What you need to use is the entitySelector parameter with the tag you want to filter by. Among other things, tag is an optional sub-component of it. However, you must also specify either enitity type or ID when using this parameter. For your chosen metric, the entity type is PROCESS_GROUP_INSTANCE (since it's collected per process).


Your query would work as such:



Give this a try and let us know how it goes.


Best regards,


Radu, thanks so much!! That worked great! I just needed the kick start to get the hang of the API.

Featured Posts