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

Single value using Dynatrace API?

sraghavk01
Newcomer_

For a metric, I am trying to get a single value like it is shown in Dashlet(refer to screenshot), but the API response gives me a list of values.

 

2 REPLIES 2

LawrenceBarratt
Dynatrace Advisor
Dynatrace Advisor

Hi @sraghavk01 ,

 

Which API are you currently querying for this data?

Can you please provide the API query - minus token and tenantId.

Thanks,

Lawrence

Hi @LawrenceBarratt 

I am using below query,

https://***.com/e/***/api/v2/metrics/query?metricSelector=(builtin:service.requestCount.total:filter(and(or(in("dt.entity.service",entitySelector("type(service),entityName.equals(~"***~")"))))):sort(value(avg,descending)))&from=2023-08-21T00:00:00Z&to=2023-08-22T00:00:00Z&resolution=Inf

thanks for checking my post;
resolution=Inf parameter gives me a single value, the time mentioned in above query is in UTC do know how to set user time zone in query?

Cheers

 

 

Featured Posts