The default return of a search call to my Jira Cloud always returns a paginated response with a maxResult of 50. Since I'm developing a call to be treated by a javascript function, I'd like change it to 1000 or 10000 so I can ensure I get all the results with no truncated data.
My call is:
/rest/api/2/search?jql=project%3D%22<project-name>%22&fields%3D...
The return is
"expand": "schema,names",
"startAt": 0,
"maxResults": 50,
"total": 237,
"issues": [
Is there a parameter I can pass so the returned maxResults is at least equal to the total.
Can it be done? How?
Hi Gustavo,
In the past you used to be able to send the maxResults parameter in the API call and change the number of requests you get back but I have not been able to do this in some time.
Recently a knowledge base article came out titled Changing maxResults parameter for Jira Cloud REST API that may be of assistance:
Resolution
Refer to maxResults limit for the given API that is provided in the returned JSON object, and rely on pagination to retrieve the desired number of results in chunks. Since maxResults limits may change over time and vary for different API resources, we recommend that REST API clients programmatically confirm maxResults value when making the request.
Example:
{"jql": "project = PROJ ORDER BY key ASC","startAt":0,"maxResults":50,"fields":["id","key","summary","status.id","issuetype","timeoriginalestimate","timeestimate"]} {"jql": "project = PROJ ORDER BY key ASC","startAt":50,"maxResults":50,"fields":["id","key","summary","status.id","issuetype","timeoriginalestimate","timeestimate"]}
Other Info
According to the Atlassian REST API policy, the default and maximum sizes of paged data are not considered part of the API and may change without notice.
maxResults limits set for any individual Jira Cloud REST API may not be applicable to other API endpoints and are not guaranteed to remain unchanged.
Cheers,
Branden
You may also want to scroll through this from a few months ago
https://community.atlassian.com/t5/Jira-discussions/Jira-max-results-is-100/m-p/642338#M1137
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would also recommend just reading the Status Update in the description of https://jira.atlassian.com/browse/JRACLOUD-67570
Jira Cloud Product Manager, Eve, explains why this change was made and what steps can be taken in order to work around this change in behavior to the REST API.
Previously there was a 1000 record limit, but this has been reduced to 100. To work around this we recommend the use of pagination as described in the KB article Branden cited.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Folks,
Additionally to the information above, we created a feature request to properly increase the limit for the MaxResults parameter in REST API:
JIRA Cloud REST API increase the limit for maxResults
Feel free to vote and watch the suggestion to increase its priority and also receive notifications about any updates.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good Morning
i am using postman to retrieve my issues for one of the project but since maxResult is set to 100 so i am not able to retrieve all my issues. Currently i have 12k + issues which i want to retrieve it to perform some operations.
Kindly suggest me best approach in order to fix it.
And your above given link is not opening. i tried but unfortunately its giving error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kamran786
The only way that I can think of for you to get 12k+ issues is to run the API from some code (i.e. mimic what Postman is doing but via code). It is obviously not practical to run the API in Postman 120+ times, changing the startAt parameter each time.
The link above had an extra http in front of it, try this instead
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your suggestion.
One more thing want to check is there any way i can pull all the issues into an excel sheet.
1. Without using any plugin
2. If plugin needs to be used then which one will be more effective and powerful.
3. And does the plugin requires any additional amount and can i be free.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kamran786
There is a way to export 1000 issues at a time to Excel CSV, so it would mean exporting 12+ sets of data, which is far better than 120+ in Postman.
Follow the steps on this page to export them all
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.