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

Using starttimestamp and endtimestamp in API

cbruhn2
Participant

When I use the starttimestamp and endstimestamp in a call to API like in

n&startTimestamp=1522540974000&endTimestamp=1524528174000&aggregationType=median&queryMode=series

I just get

result
dataPoints
timeseriesId"com.dynatrace.builtin:appmethod.useractionduration"
unit"MicroSecond (µs)"
entities:
resolutionInMillisUTC 1987210000
aggregationType"MEDIAN"

And no datapoinst because the resolution is jus the difference between end and starttime.

Is this a bug ?

When I use relativetime

n&relativeTime=month&aggregationType=median&

i get datapoints but with a resolution of 6 hours. (Thats a long time resolution and only 4 measurement per day)

I have voted for the RFE to be able to specify resolution in the API call

3 REPLIES 3

pahofmann
Champion

That is strange, which version are you on? SaaS or Managed?

I tried it with the same timestamp in my environment an it works fine, the resoltion I get is: 14400000

xxx.dynatrace-managed.com/e/xxx/api/v1/timeseries?startTimestamp=1522540974000&endTimestamp=1524528174000&timeseriesId=com.dynatrace.builtin:appmethod.useractionduration&queryMode=series&aggregationType=MEDIAN

p.s. Great to hear you have voted for our RFE 😉

cbruhn2
Participant

Hi Patrick,

thank you for a very fine answer. I looked into it
in greater details, and it seems there actually was no datapoints in the
given timeperiod, so dynatrace was rigth.

Thats probably also why dynatrace use resolution as the difference between start and end time.

Makes sense.

Thanks again for your investigation and resolving of my issue.

Carl

Glad I could help, good to know that the resolution is equal to timeframe when there are no datapoints, could have fallen into this myself 🙂