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

Dynatrace API Metric v2 - 2-hour auto-resolution

Cal-Smith
Newcomer

Hi, I am attempting to export data from Dynatrace using the API Metrics v2. I have constructed a call using the correct endpoint from our managed environment and the relevant builtin:* metric from the Data Explorer (as displayed in a dashboard tile). Despite specifying a timeframe via the writtenSince/writtenUntil parameters, the API consistently returns data limited to a 2-hour window for any given day. I have tried different parameters including 'from', 'time shift'; any explorative ways to expand the timeframe. The limit is default set to "*:limit(20)" which I have also tried expanding to return more results, but to no avail.

I am looking for guidance on how to expand this window to retrieve historic data. My goal is to store both historical and current data to analyse key user actions and present this information in a PowerBI report for business visibility. This report exists displaying 12 months worth of data on a month-by-month so we can easily understand where key requests are under-performing.

e.g. https://rya567.dynatrace-managed.com/e/**EnvironmentID**/api/v2/metrics/query?fields=unit,aggregatio....

Perhaps there is limitations within Dynatrace or the API itself, but this I am unsure on.

I get this is appears to be a particularly unique query, but any and all help would be appreciated!

1 REPLY 1

RohitBisht
Dynatrace Mentor
Dynatrace Mentor

Hi @Cal-Smith ,
have you tried a relative timeframe like from: now-4h
Also, it can be due to datapoints limitation default = 120 data points. I will suggest to try the resolution  "resolution=10m" or "resolution=1h" to see if you can go beyond that.
https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-get-datapoints#parameters

RB

Featured Posts