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

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Fixed
    • None
    • Component/s: REST API

      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

       

            Assignee:
            Unassigned
            Reporter:
            Bruno
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: