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

get Service calls count using displayNames

Frequent Guest

I am new to Dynatrace API's , we have one use case were currently our team is manually retrieving the  service calls count from Dynatrace UI every 15 days from view web request options provide in UI.


Instead of manual work we are planning to automate this process using one program which will communicate to Dynatrace API's and will return the data, but i am not sure which API's need to be used .


Note:- Team search the entity in webservices search box user application observability section using controller class name (that is how the services is configured in Dynatrace)  





DynaMight Legend
DynaMight Legend

You can query the metrics using Metrics v2 API easily. Don't forget it is possible to query multiple metrics in one single call (request count and failed request count for example).

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Sorry for asking basic questions ! 

Which metricKey need to be used in query to get the service calls count for each endpoint expose by individuals services? 

where to pass the displayName of the service ? 

Sure, you find the list of builtin metrics here: you probably want 
If you need to find your services by display name, use the entitySelector parameter, such as:






For more info on Entity Selectors see it's documentation page.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Sorry to bother you again!

I did try to create the query/url but did not get success😶 

Can you please help me create query/url for below inputs.


In UI getting requests count.

Notes:  In above picture process group name is web service name


But that's not a service name in your screenshot, but a process group name. Basically, you want parameters like this:

metricSelector: builtin:service.requestCount.server:splitBy("dt.entity.service"):auto
entitySelector: type(service),fromRelationship.runsOn(type(PROCESS_GROUP),entityName.equals("PG1")),tag("CF Space:PROD")

However with metrics you can't have it split by the webservice:method. If this is required, you need to define all your service methods as key requests or define calculated metrics. If you are on SaaS with Grail, then it will soon be possible to get this data using DQL when traces on grail are available.

Another solution is to export that in the MDA (what you have in your screen), on the bottom there is a menu for that:


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts