Hi,
I am having a jira server of version 7.3.3 and there are 13008 users in it. I am fetching the users using the rest api "/rest/api/latest/user/search?username=." in paginated format fetching 200 records at a time.
After getting 1000 records, jira is not returning any records further. So can you tell me why jira does not return more than 1000 users? And how can I retrieve all my users using jira rest api?
Thanks
You can use a workaround below:
1. Get all users
host-name/rest/api/2/user/search?startAt=0&maxResults=1000&username=a
host-name/rest/api/2/user/search?startAt=0&maxResults=1000&username=b
host-name/rest/api/2/user/search?startAt=0&maxResults=1000&username=c
...
host-name/rest/api/2/user/search?startAt=0&maxResults=1000&username=z
2. Filter only unique users
Even if I use the above rest api and my system has more than 1000 users starting with the character "a", as soon as my startAt parameter reaches to 1000, I do not get further users from Jira.
My rest api where I try to fetch more than 1000 users starting with character "a" the rest api looks something like this "/rest/api/latest/user/search?startAt=1000&maxResults=200&username=a". This return me an empty list.
My Jira server has 1115 Jira users starting with "a".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The very fact that this answer is probably the only correct answer gives me cancer.
I thought I would be slick and try rest/api/2/user/search?username=.&includeInactive=false&maxResults=1000&startAt=999
Yeah, that returns one user.
O.
M.
G.
I mean, I guess I can see where they are more GUI oriented... but wow. All of their other startAt works as intended...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.