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

      1. Create a GET request for Customer Requests
        <baseURL>/rest/servicedeskapi/request
        
      2. Observe the "limit" from the result
      3. Change the limit to a higher value and re-send the GET request
      4. <baseURL>/rest/servicedeskapi/request?limit=999
        
      5. 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

          Form Name

            [JSDSERVER-4186] REST API 'limit' parameter has no effect

            SET Analytics Bot made changes -
            Support reference count Original: 9 New: 10

            Dawid Krysiak added a comment - - edited

            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

             

            1. define a client

               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

             

             

            Dawid Krysiak added a comment - - edited 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   define a client    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    

            This issue needs to be duplicated for JSD Cloud. The limit is not working there either. I used the following REST API Call:

            base_url/rest/servicedeskapi/servicedesk/serviceDeskIdentifier/customer?limit=1000

            Schal, Thomas added a comment - This issue needs to be duplicated for JSD Cloud. The limit is not working there either. I used the following REST API Call: base_url /rest/servicedeskapi/servicedesk/ serviceDeskIdentifier /customer?limit=1000
            SET Analytics Bot made changes -
            Support reference count Original: 12 New: 9
            Marc Dacanay made changes -
            Labels Original: affects-server cqt New: affects-server cqt ril
            Marc Dacanay made changes -
            Remote Link New: This issue links to "Internal ticket (Web Link)" [ 954950 ]
            SET Analytics Bot made changes -
            UIS Original: 0 New: 1
            SET Analytics Bot made changes -
            UIS Original: 1 New: 0
            SET Analytics Bot made changes -
            UIS Original: 0 New: 1
            SET Analytics Bot made changes -
            UIS Original: 1 New: 0

              Unassigned Unassigned
              cchan Chung Park Chan
              Affected customers:
              11 This affects my team
              Watchers:
              12 Start watching this issue

                Created:
                Updated: