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

Is it possible to fetch all UserSession/UserAction data in the specific duration via UserSessions API?



I'm trying to get UserSession data and UserAction data with UserSessions API.

However not all UserSession/UserAction data in the specific duration can be fetched.

For example, when I want to fetch last one hour UserSession data via UserSessions API, the following URI can be used:


This leads to the response that contains only 50 datapoints because of the limitation of them, which is defined as "LIMIT", that is optional query parameter, and its default value is "50".


After trying several times, I eventually noticed that the limitation of "LIMIT" value is 5000.



"error": {
"code": 404,
"message": "The maximum limit of retrieved documents is 5000, but you requested 100000"

If the number of UserSession is more than 5000 for an hour, is it impossible to fetch all UserSession data for an hour with 'relativeTime' hour?

(I'm not sure if I can tell you what I want to say..)


Kohei Saito



Dynatrace Champion
Dynatrace Champion

Hi, you are right - you can't fetch more than 5000 rows at this point in time. So in order to get all user sessions, you can either use smaller time frame chunks or use our user session export stream. The user session API was not build for doing data export's the main goal is to include get data segments for specific criteria.
If you want to have all data - the user session export stream is the way to go. But nevertheless we will perhaps extend the limit of 5000 in future.



Hi Alex,

thank you for your polite answer.

As I thought, it is impossible to fetch all user sessions via current API.

This time, I'd like to have all of them via not streaming to ElasticSearch but API.

However, as you said, it seem to be better to export stream now...

If possible, I want you to extend this limit in future, because we are planning to utilize your Dynatrace API and integrate with other software services.

Thank you very much,


Featured Posts