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.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PS: You can find the property via
<JIRA BASE URL>/secure/admin/AdvancedApplicationProperties.jspa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid not :/ At least not that I know of...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.