14 Feb 2019 07:20 PM - last edited on 27 Apr 2021 03:52 PM by MaciejNeumann
Hello,
I am currently working with a client to make an API call to return all user sessions for their application in a given time window. For an example, I wanted to return the start time for each user session during the time window. However, the result seems to be limited to 50 rows. This is less than the actual number of sessions in that time window (there were 217 sessions for this application during that time). From checking the USQL documentation, the result limit for a USQL query should be 5000, and I verified that the extrapolationLevel value is 1 in the result, so I'm unsure what the cause could be. Does anyone know how to fix this or what the problem could be?
The USQL query is as follows (note that Application Name is replaced by the web application's name):
SELECT startTime FROM usersession WHERE useraction.application = "Application Name"
Solved! Go to Solution.
14 Feb 2019 08:51 PM
I believe I've found the solution. I tried to add LIMIT 5000 at the end of my query and I got the correct amount of results as long as my limit was larger than the number of results. I haven't found documentation of this anywhere on Dynatrace's API documentation, can anyone confirm this is correct? Why would there be an implicit LIMIT 50 on every query result unless a different limit is set?
14 Feb 2019 10:41 PM
You are correct, add LIMIT 5000 to the end of your query or it will apply an implicit LIMIT 50.