It seems that paging and startAt for /rest/api/2/user/search is broken.
We have more than 1000 Jira users. It is however impossible to get past the 1000th user when querying the REST API.
The documents correctly say that maxResults is limited to 1000 records. Fine; so use startAt to get the second page and beyond, right?
However, if I try the following:
/rest/api/2/user/search?username=.&maxResults=1000&startAt=1000
...I get 0 results. If I try:
/rest/api/2/user/search?username=.&maxResults=1000&startAt=990
...I get 10 results.
Basically, even though I have more than 1000 users, the API results are always cut off at the 1000th.
I've seen this question raised before, but no answer was forthcoming, so I thought I'd raise it again...
(Jira version is 7.3.1)
This isn't a bug. The limit really is 1000 no matter where you start at.
If you're on Server, there's a way to defeat the 1000 record maximum. https://confluence.atlassian.com/adminjiraserver076/limiting-the-number-of-issues-returned-from-a-search-view-such-as-an-rss-feed-941596303.html
Make sure you lock this down to a specific group (just your api account probably) as mentioned in the doc. Overriding the limit and frequent use of 1000+ record queries will be a performance hit while running.
Thanks Josh.
So you're saying that there's no way to get the 1001st record, unless you configure the max limits in the config file?
(However, we are on Server, so I'll look into getting that changed...)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pretty sure that overriding this is the only way. I have an "unlimited-search" group in my jira local directory, and the accounts I do API work with are in it.
-Josh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm just in the middle of creating a group called "unlimited-search"!
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.