HI,
I have faced the below problem,
The project have '3500' issues, i am using REST API to retrieved the first 1000 issues in project using 'maxResult=1000'
When i set the 'maxResult=1500' in REST API, it retrieved only 1000 issues. How can i retrieve more than 1000 record issues in "On demand JIRA" using REST API.
Please share the steps or REST API query?
Thanks.
Community moderators have prevented the ability to post new answers.
The configuration to have more than 1000 results is easily configurable via backend configuration in a properties file (jira-config.properties file, to be exact)
In OnDemand (however), it's not possible to adjust this property and it's a best practice in OnDemand to do so (can cause security issues if used improperly). There is a way to go around this though; which is to query 1000 results per POST request (e.g: 3500 issues = 4 POSTS requests).
So, your initial would be like this:
{"jql": "project = PROJ ORDER BY key ASC","startAt":0,"maxResults":1000,"fields":["id","key","summary","status.id","issuetype","timeoriginalestimate","timeestimate"]}
And the second post would be:
{"jql": "project = PROJ ORDER BY key ASC","startAt":1001,"maxResults":499,"fields":["id","key","summary","status.id","issuetype","timeoriginalestimate","timeestimate"]}
The difference here is the startAt parameter, which controls the starting point of the search.
You can read more in this OnDemand KB: Changing maxResults Parameter for JIRA REST API
HI Justin Alex,
Thanks for replay. Please give the suggestion for below scenarios
1. If i not set the "maxResult" value in REST API, than How can i predict JQL query result count in REST API?
- In this scenario the JQL query actual have more 1000 results, but in "On demand JIRA" anything else it return maximum 1000 results.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Heya @srinivasan radhakrishnan,
If i not set the "maxResult" value in REST API, than How can i predict JQL query result count in REST API?
Indeed, it's hard to estimate how many results a particular JQL would return though. I believe that the best approach around this would be to gather the results, and notice how many has been returned. If it's 1000, then you can adjust the startAt and maxResults values accordingly to check for more results.
In this scenario the JQL query actual have more 1000 results, but in "On demand JIRA" anything else it return maximum 1000 results.
Have you tried to use the startAt and maxResults in OnDemand? I believe it should return the results if you use a separate POST REST call. I used the followiing in Atlassian's Bug Tracker:
{"jql": "project = JRA ORDER BY key ASC","startAt":0,"maxResults":1000,"fields":["id","key","summary"]}
This one returns me issues from JRA-1 to JRA-1185.
{"jql": "project = JRA ORDER BY key ASC","startAt":1001,"maxResults":2000,"fields":["id","key","summary"]}
This one returns JRA-1187 to JRA-2272.
I think it should work for OnDemand as well, since the REST API architecture is the same across JIRA instances.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To be precise (I actually couldnt find the information easily :D), this is what needs to be in your jira-application.properties file (if you have your own hosted JIRA):
## # The maximum number of results to issue navigator will request from a query - set this to zero or negative to be unrestricted (note that the server may forbid this, see below) # jira.search.views.default.max = 0 # Limits the number of issues that may be edited via a bulk operation in one go. This may be useful if you are experiencing performance issues due to a large number of concurrent edits of # large number of issues. Please note that this should NOT be used to disable bulk edit operations. Use the Global 'Bulk Change' permission accessible via the Admin interface in JIRA to # do this. If a user tries to edit more than the provided number of issues here, an error will be displayed. Set the count to a negative number (-1) or simply comment out this property for # unlimited number of issues. jira.bulk.edit.limit.issue.count = -1 ## # Whether search results are capped to a hard limit, otherwise return a 403 (Forbidden) to the client. # # Set this to negative (-1) or empty for unlimited results. # # NOTE: this SHOULD BE EQUALS OR GREATER THAN than jira.search.views.default.max above, otherwise all issue navigator links will fail with a 403 # jira.search.views.max.limit = -1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As to be exact, this is wha tneeds to be in your jira-application.properties file (if you are not on OnDemand):
##
# The maximum number of results to issue navigator will request from a query - set this to zero or negative to be unrestricted (note that the server may forbid this, see below)
#
jira.search.views.default.max = 0
# Limits the number of issues that may be edited via a bulk operation in one go. This may be useful if you are experiencing performance issues due to a large number of concurrent edits of
# large number of issues. Please note that this should NOT be used to disable bulk edit operations. Use the Global 'Bulk Change' permission accessible via the Admin interface in JIRA to
# do this. If a user tries to edit more than the provided number of issues here, an error will be displayed. Set the count to a negative number (-1) or simply comment out this property for
# unlimited number of issues.
jira.bulk.edit.limit.issue.count = -1
##
# Whether search results are capped to a hard limit, otherwise return a 403 (Forbidden) to the client.
#
# Set this to negative (-1) or empty for unlimited results.
#
# NOTE: this SHOULD BE EQUALS OR GREATER THAN than jira.search.views.default.max above, otherwise all issue navigator links will fail with a 403
#
jira.search.views.max.limit = -1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi~ can I have example of vba coding on how to exceed my maxResult which is only 50 issues per extraction. I want to extract my issues greater than 50 into excel worksheet
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.