22 Aug 2023 03:00 PM - last edited on 08 Aug 2024 01:54 PM by Michal_Gebacki
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.
22 Aug 2023 06:43 PM
Hi @sraghavk01 ,
Which API are you currently querying for this data?
Can you please provide the API query - minus token and tenantId.
Thanks,
Lawrence
22 Aug 2023 07:05 PM - edited 22 Aug 2023 07:09 PM
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