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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get more than 50 results from Jira rest API?

Hi, I am trying to retrieve data using JIRA API (/jira/rest/agile/1.0/board) from Java. This API retrieves all the boards (scrum + kanban) in a json response as expected but the problem i am facing is it's only retrieving 50 results which is by default i believe.

Now how do i override this value and get more than 50 results? infact all the results.

I have tried to use maxResult attribute like /jira/rest/agile/1.0/board?maxResults=100 but no success. it still retrieves 50 results.

Can someone help on this. Any help is appreciated.

2 answers

0 votes

Hi @Shashank Agrawal 

This is a value that can be set in de advanced configuration for Jira. You should search for 'jira.search.views.default.max'.

It is possible however that your query works by setting maxResults to -1 but I'm not sure. Give it a go I'd say, and if that doesn't work, change the value as described above.

Kind regards
Jorden

PS: You can find the property via

<JIRA BASE URL>/secure/admin/AdvancedApplicationProperties.jspa

@Jorden Van Bogaert I don't want to change the property file and maxResults=-1 didn't work either.

Is there any other way to achieve this?

Hi @Shashank Agrawal 

I'm afraid not :/ At least not that I know of...

@Jorden Van Bogaert  So if we change the property file and say I modified the value to 500, will that affect the JIRA GUI as well? I mean will it display 500 results on the same page?

Please note I am retrieving the data using rest API's using Java and If i modify the property file with another value will that affect the Jira GUI as well in terms of displaying results?

Hi @Shashank Agrawal 

It only impacts results for exporting so not the view in Jira. However, it may be better to adjust "jira.search.views.max.limit" and then use the maxResults parameter rather than changing the default value.

Kind regards

Jorden

I was searching for this very question with the Confluence REST API, and came upon this question about Jira.  Although I don't know the Jira API, I discovered something through trial and error, that may be relevant to both Confluence and Jira.

There is a hard limit of 100 results, that is (as far as I know) undocumented.  You can lower the limit parameter (or maxResults in your case) to get fewer results, but setting it higher never gets you more than 100 results.  You have to use pagination to get more results ... keep repeating the search call, incrementing the start parameter by 100 each time.

Furthermore, this limit is reduced to 50 if you are requesting the body in your search results (using the expand parameter).

These hard limits may be configurable in Confluence or Jira, but I haven't explored that.

Hope that helps a little bit.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you