Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

REST API - how can I change startAt or start-index

Todd Ellner October 1, 2015

Many REST API requests will only return a certain number of results, typically 25. I need to see all of them. The maximum results parameter cannot be reset, but the response includes a parameter called either startAt or start-index which is set to 0 by default. How do I set this in my URL string to, say, 0, 25, 50 etc. to see the first, second and third set of 25 results?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2015

Checkout these 2 parameters:

startAt

int

the index of the first issue to return (0-based)

maxResults

int

the maximum number of issues to return (defaults to 50). The maximum allowable value is dictated by the JIRA property 'jira.search.views.default.max'. If you specify a value that is higher than this number, your search results will be truncated.

gabriele vidali February 3, 2016

Is it possible to obtain a similar result when using the cloud env?

Something like:

https://mydomain.atlassian.net/admin/users?activeFilter=active&start-index=10&maxResults=899

 

Thanks

Saravana Kumar August 9, 2018

Hi @Jobin Kuruvilla [Adaptavist]

 

i am using following code,

UserSearchService userSearchService = ComponentAccessor.getComponent(UserSearchService.class);
UserSearchParams userSearchParams = (new UserSearchParams.Builder()).allowEmptyQuery(true).includeActive(true).includeInactive(true).maxResults(200).build();

 

is there any way to set startAt in this code. Basically am trying to display the user list i need to set pagination for this table.

 

Thank you,

1 vote
Todd Ellner October 1, 2015

Yep. And for bamboo it's start-index and for stash it's start.

I'm running aground trying to figure out how to craft the URL to correctly set the parameter 

TAGS
AUG Leaders

Atlassian Community Events