Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-15503

maxResults parameter under /rest/agile/1.0/ REST API does not accept values greater than 50

      Summary

      When calling the REST API endpoints starting with rest/agile/1.0/board the value set for the parameter maxResults is not taken into account if it is bigger than '50' (it always return 50). The parameter startAt works fine instead.

      Environment

      Jira Server and Data Center

      Steps to Reproduce

      1- Call any agile/1.0/board endpoint passing a value for maxResults that is lower than 50
      2- See that this works fine.
      <BASE-URL>/rest/agile/1.0/board/ID/sprint?startAt=20&maxResults=20

      {
        "maxResults": 20,
        "startAt": 20,
        "isLast": false,
        "values": [ .......
      

      3- Call the same endpoint passing a value for maxResults that is bigger than 50. E.g.
      <BASE-URL>/rest/agile/1.0/board/1/sprint?startAt=20&maxResults=70

      Expected Results

      The maxResults value in the REST response is correctly set to the desired value

      Actual Results

      maxResult is always set to 50

        "maxResults": 50,
        "startAt": 20,
        "isLast": true,
        "values": [.....
      

      Notes

      The same issue reproduces calling:

      • /rest/agile/1.0/board
      • /rest/agile/1.0/board/ID/project
      • /rest/agile/1.0/board/ID/epic
      • /rest/agile/1.0/board/ID/sprint

      Workaround

      Use the "startAt" parameter to get all the results

            [JSWSERVER-15503] maxResults parameter under /rest/agile/1.0/ REST API does not accept values greater than 50

            Matt Doar added a comment - - edited

            I'm not getting the expected results using startAt in Jira 8.20.10

            There is also more info at
            https://community.developer.atlassian.com/t/get-all-sprints-api-suggestion/62966

            Matt Doar added a comment - - edited I'm not getting the expected results using startAt in Jira 8.20.10 There is also more info at https://community.developer.atlassian.com/t/get-all-sprints-api-suggestion/62966

            Eran Flom added a comment -

            Since there is no way to know how many results there are - it is very hard to plan a pagination based solution.

            Eran Flom added a comment - Since there is no way to know how many results there are - it is very hard to plan a pagination based solution.

              Unassigned Unassigned
              dbonotto Dario B
              Affected customers:
              22 This affects my team
              Watchers:
              23 Start watching this issue

                Created:
                Updated: