Hi Community,
I need to fetch a list of all the users who use JIRA..basically the list that is present in the user management section. I am using the below api..
http://domain-name/jira/rest/api/2/user/search?startAt=0&maxResults=1000&username=.
or
http://domain-name/jira/rest/api/latest/user/search?startAt=0&maxResults=1000&username=.
but the issue is..this api lists only 1000 users by default even if the list contains more than 1000 users (2000 in my case). When I change the startAt and maxResults value as 1000 and 1000 respectively, i.e
http://domain-name/jira/rest/api/2/user/search?startAt=1000&maxResults=1000&username=.
it shows an empty list ..which clearly indicates that the api displays only 1000 results by default even if we loop through the result to get the entire list.
Is there any way through which I can fetch the entire list of users's details? any leads would be highly appreciated.
You can try this end point:
http://localhost:2990/jira/rest/user-management/1.0/users
As mentioned by one of the users here, it does work with Jira Server v8.5. I haven't personally tried it for Jira.
You need to specify an argument such as the username. E.g the value 'a'. Iterate through the rest of the letters in the alphabet and concat all of the users to get the entire list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if thats the case..I have 2000 users and Its not a good idea to fetch 2000 users individually as wildcards doesn't work for username argument here..so..I cant fetch all the users whose username starts with "a"..and do the same for rest of the alphabets. Can you suggest any other possible way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It actually uses autocomplete so if you enter a, it will get all usernames that start with an a.
Other than this, it doesn't look like there is another way. https://jira.atlassian.com/browse/JRACLOUD-29069 shows that this is an issue in a lot of environments. You could try using one of the other suggested wildcards detailed in the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried to do this
http://domain-name/jira/rest/api/latest/user/search?startAt=0&maxResults=1000&username=a
it again shows 1000 results and also whose usernames doesn't start with a.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.