-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
3.1.4
-
10
-
Severity 3 - Minor
-
1
-
Summary
Entering the limit parameter in the REST API does not change the limit of results returned.
limit int The maximum number of items to return per page. Default: 50. See the Pagination section at the top of this document for more details.
Environment
JIRA Service Desk REST API
Steps to Reproduce
- Create a GET request for Customer Requests
<baseURL>/rest/servicedeskapi/request
- Observe the "limit" from the result
- Change the limit to a higher value and re-send the GET request
<baseURL>/rest/servicedeskapi/request?limit=999
- Observe the "limit" from the result
Expected Results
Changed limit does not affect the results returned. It may be higher than the default value 50
Actual Results
Changed limit affects the results returned
Notes
JIRA Service Desk REST API is still an experimental release as per this comment
Workaround
No workaround as of now
- is related to
-
JSDSERVER-4187 Inconsistent JIRA Service Desk REST API Pagination
-
- Closed
-
- links to
- mentioned in
-
Page Failed to load
- was cloned as
-
SDECO-447 Failed to load
cbed8916b89e
I went around this programmatically.
Here is an example in Python, easy to get the idea.
get the page of 100 items and keep paginating until the page comes empty
jira = JIRA(
basic_auth=(username,password),
options= {
'server' : server,
'fields' : "comment",
'expand' : 'changelog'
)
# define a query
jql = 'category = Support and updated > startofday(-1d)'

block_size = 100
block_num = 0
i = 0
tickets_list = []
while True:
start_idx = block_num * block_size
if block_num == 0:
issues = jira.search_issues(jql, start_idx, block_size)
else:
more_issues = jira.search_issues(jql, start_idx, block_size)
if len(more_issues)>0:
for x in more_issues:
issues.append
else:
break
if len(issues) == 0:
# Retrieve issues until there are no more to come
break
block_num += 1