Paging is broken for user/search queries

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)

1 answer

0 vote
Josh Steckler Community Champion Jan 25, 2018

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...)

Josh Steckler Community Champion Jan 25, 2018

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

I'm just in the middle of creating a group called "unlimited-search"!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,296 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot