21 Oct 2024 07:52 PM
Hi!, when using the following metricSelector:
21 Oct 2024 11:27 PM
there's some consideration you must take when coming to metric data points in API
1. use the same metric selector you've mentioned jmx.hikari.MaximumPoolSize:splitBy("dt.entity.host"):sum:sort(value(sum,descending)):limit(20) within the API with little transformation as mentioned in the following screenshot from the documentation https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-get-datapoints#parameters
2. make sure that you're using the same timeframe in API as you did in the data explorer, if you're using relative timeframe like `last 2 hours` so you can set it in the API parameters like this `?from=now-2h` and by default `to` query parameter is set to `now` or if you're using specific timeframe you can use it in this format `?from=1729549243&to=1729549243` (open this website will help you getting UNIX timestamps easily https://www.epochconverter.com/
3. make sure you're using the same resolution in your API parameters like `resolution=10m`
if there's miss understanding from my side just mention the format you're using and which API endpoint you're using v1 or v2 and I hope this helpful for you.
22 Oct 2024 12:19 PM
Thanks for the reply, I can't see any difference, the data returned is the same but the data explorer adds a new dimension in the response:
22 Oct 2024 02:15 PM
Hello @johannrenck
I believe it's related to the Dynatrace API Access limit as per the illustration below:
and 😊
The below example might be a simulation to the raised concern
Before the end
Finally Feel free to review:
Hoping it adds value.
KR,
Peter.
22 Oct 2024 04:26 PM
Thanks for your reply, I tested it with limit 1 not sure if it will be reaching the access limit in any of the criteria.