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

Jira Agile REST API to return the "Total" number of boards and sprints

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • None
    • REST API
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Issue Summary

      As Jira administrator I want to see the Total number of boards/sprints when using Jira Agile REST API endpoints under /rest/agile/1.0/*

      This helps to better work on pagination using both "startAt" and "maxResults" parameters.

      Steps to Reproduce

      On Jira Server/Data Center use one the Agile REST API endpoints below:

      <BASE-URL>/rest/agile/1.0/board
      <BASE-URL>/rest/agile/1.0/board/{boardID}/sprint

      Expected Results

      Application/Json response to include the "Total:" number of board/sprints

      {
          "maxResults": 2,
          "startAt": 1,
          "total": 5,        << ----- This number
          "isLast": false,
          "values": [
              {
                  "id": 37,
                  "self": "http://www.example.com/jira/rest/agile/1.0/sprint/23",
                  "state": "closed",
                  "name": "sprint 1",
                  "startDate": "2015-04-11T15:22:00.000+10:00",
                  "endDate": "2015-04-20T01:22:00.000+10:00",
                  "completeDate": "2015-04-20T11:04:00.000+10:00",
                  "activatedDate": "2015-04-11T15:22:00.000+10:00",
                  "originBoardId": 5,
                  "goal": "I'm making a note here: HUGE SUCCESS."
              },
              {
                  "id": 72,
                  "self": "http://www.example.com/jira/rest/agile/1.0/sprint/73",
                  "state": "future",
                  "name": "sprint 2"
              }
          ]
      } 

      Actual Results

      Application/Json response does not return the "Total:" information:

      {
          "maxResults": 2,
          "startAt": 1,
          "isLast": false,
          "values": [
              {
                  "id": 37,
                  "self": "http://www.example.com/jira/rest/agile/1.0/sprint/23",
                  "state": "closed",
                  "name": "sprint 1",
                  "startDate": "2015-04-11T15:22:00.000+10:00",
                  "endDate": "2015-04-20T01:22:00.000+10:00",
                  "completeDate": "2015-04-20T11:04:00.000+10:00",
                  "activatedDate": "2015-04-11T15:22:00.000+10:00",
                  "originBoardId": 5,
                  "goal": "I'm making a note here: HUGE SUCCESS."
              },
              {
                  "id": 72,
                  "self": "http://www.example.com/jira/rest/agile/1.0/sprint/73",
                  "state": "future",
                  "name": "sprint 2"
              }
          ]
      } 

      Workaround

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

       

          Form Name

            [JSWSERVER-21082] Jira Agile REST API to return the "Total" number of boards and sprints

            The total number of sprints should be included in the API response now.

            Krzysztof Kercz added a comment - The total number of sprints should be included in the API response now.

              Unassigned Unassigned
              bsilva@atlassian.com Bruno
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: