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

API Request, disappearance of data


Hi everyone,

I have a question, did you know why my request didn't return any data after few hours after end of an error? Here startDate is equal to the Timestamp in the begin of a specific error and endDate is the end of this specific error, applicationID is the ID of application receive with endDate and startDate when we interrogate Problem API . If data have a long duration of the lifetime, why evening I can't get information of impact of a specific error which had takes place the morning of same date?

Request :

SELECT count(*) as count, as name, userAction.targetUrl as targetURL, applicationType, matchingConversionGoals , bounce, userAction.apdexCategory AS apdex

FROM userSession

WHERE totalErrorCount > 0 and userType = "REAL_USER"

AND userId = null

AND ((startTime <= " + startDate + " AND endTime >= " + endDate + ")

OR (startTime <= " + startDate + " AND endTime <= " + endDate + ")

OR (startTime <= " + endDate + " AND startTime >= " + startDate + " AND endTime >= " + endDate + ")

OR (startTime <= " + endDate + " AND startTime >= " + startDate + " AND endTime >= "+ startDate + " AND endTime <= "+ endDate +"))

AND userAction.internalApplicationId=\" " + applicationID + " \"

GROUP BY, userAction.targetUrl, applicationType, matchingConversionGoals, bounce, userAction.apdexCategory

ORDER BY count(*) desc



Bastien T.



Dynatrace Champion
Dynatrace Champion

Did you set the startTimestamp and endTimestamp appropriately to avoid the default of the current time minus 2 hours being used?


In my app you can choose an interval to check every errors that may have taken place during this time slot.
You choose one specific error afterwards. The app interrogates Dynatrace API to find startTime and endTime of this error. I use both of these values to set startTimestamp and endTimestamp variables.

My question is : Why when I interrogate Dynatrace API for a specific error with specific startTimestamp and endTimestamp I "lose" userSession impacted after a certain amount of time ? For example, I may have 500 userSession impacted at 10 am, 300 at 2pm and 0 after 6pm.
If I'm not wrong, in my previous example, at 2pm I should have a number of userSession impacted greater than or equals to 500 because I already received 500 at 10 am.



Bastien T.

Dynatrace Champion
Dynatrace Champion

I would try setting the startTimestamp to midnight of the current date and set the endTimestamp to "now" to see if that helps. I think your window might be too small.

Featured Posts