07 May 2019 01:12 PM
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.
07 May 2019 01:45 PM
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.
07 May 2019 02:39 PM
But DQL doesn't support functions like CONTAINS, LIKE, STARTSWITH etc. so that I would have iterated using the first names.
07 May 2019 02:43 PM
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 🙂
07 May 2019 02:51 PM
With version 1.159 we increased this limit to 5000.
09 May 2019 08:49 AM
Hi Dominik,
Thanks for your response.
We are using version 1.164
21 May 2021 10:20 AM
Has this limit changed now?