Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving users through API is limited to 1000 records even when using startAt and maxResults

bromoserwfm April 4, 2018

I'm trying to pull all users from Jira (Server 7.4.1) to apply new SSO-friendly usernames and make their names match our Active Directory entries. I know that the API is limited to 1k records, so I intended to use startAt to build my userlist. However, I'm finding that it doesn't function as I expect.

I'm making the following call to get ALL users: 

https://<url>/rest/api/latest/user/search?username=@&maxResults=1000&startAt=0&includeInactive=true

That call returns 1000 users, as I expect (I'm using the @ sign as a way to pull all users since everyone has an email address).

However, if I try to pull the next 1000, I get 0 records:

https://<url>/rest/api/latest/user/search?username=@&maxResults=1000&startAt=1000&includeInactive=true

 I'm starting to fear that the somehow it's first executing the filter on username before the startAt, so I'm always being truncated to 1000 users.

 

Why does the 2nd call fail? I have around 1,700 users so there should certainly be more to pull than the first batch of 1k.

1 answer

1 accepted

0 votes
Answer accepted
bromoserwfm April 5, 2018

Apparently this is a bug that Atlassian has known about for at least a year.

JRASERVER-65089

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events