14 Nov 2022
09:02 PM
- last edited on
12 Dec 2022
11:41 AM
by
Ana_Kuzmenchuk
Hello,
I'm struggling with an issue calling /api/v2/metrics/query.
I've got these two API calls, in order to get a Request Count they only diff at SERVICE_METHOD_ID
{SaaS}/api/v2/metrics/query?from=2022-11-12T00:00:00%2B01:00&to=2022-11-12T23:59:00%2B01:00&entitySelector=type("dt.entity.service_method"),entityID("{SERVICE_METHOD_ONE}")&api-token={API_TOKEN}&metricSelector=builtin:service.keyRequest.count.total:fold(sum)
{SaaS}/api/v2/metrics/query?from=2022-11-12T00:00:00%2B01:00&to=2022-11-12T23:59:00%2B01:00&entitySelector=type("dt.entity.service_method"),entityID("SERVICE_METHOD_TWO")&api-token={API_TOKEN}&metricSelector=builtin:service.keyRequest.count.total:fold(sum)
The first one works great, values are equal to the ones at Multidimensional Analysis Chart, even if I get rid off the "%2B01:00" (+1:00 GMT), same value is responded.
But the second one is not working as expected. It responds with different values;
with "%2B01:00" (+1:00 GMT) I've one value, without it, I've another one, and both of them do not correspond what I see on MDA chart at same time frame.
I even try to use unix timestamps, and same thing happens.
Both are Key Requests, and both are filtered at MDA by {Reques:Name}
Do you maybe have any ideas about what is happening?
Many Thanks
Daniel D.
Interesting, so the MDA chart isn't showing the data that the API result is showing.... id assume the time resolution might be the problem? can you verify the time resolution?