We are using the following query to get names of all the users:
SELECT distinct(userid) FROM usersession where useraction.application='<ApplicationName>' GROUP BY userid
However only 1000 users are retrieved.
Is there a way to retrieve all the users at once or if not possible are there means to retrieve all users in small batches and iterating until the last user is fetched?
PS: Tried using LIMIT at the end of the query.
Using Limit 10 or Limit 100 or Limit 500 works and only that many users are fetched
Using LIMIT 1000 or more doesnt work.
There is a limit of 1000 users(rows) in the json response
Solved! Go to Solution.
The API has certain limitations built in to protect the Dynatrace Cluster from experiencing any performance degradation from requests that are too large.
To get around this, my suggestion would be to use regex to pull users who's user id start with a particular character, then do this iteratively for each character that is allowed by the app (a-z, 0-9).
This should break the response up into smaller chunks.
Another option would be to add more specific criteria to your API call if there is a certain type of user or activity that you are looking for.
If neither of these suggestions work for you, feel free to submit an RFE to allow for a larger amount of rows to be returned.
Okay the below query helps.
SELECT distinct(userid) FROM usersession where useraction.application='OMK' and userid startswith 'A' GROUP BY userid limit 1000
Used limit 1000 to get more than 50 rows.
Thanks for your answer 🙂