I am looking for a rest API to get all the sprints with their respective start and end dates. I can get the list of sprints using the API
rest/greenhopper/1.0/sprintquery/boardId?includeFutureSprints=true&includeHistoricSprints=false
and the sprint information using
rest/agile/1.0/sprint/sprintId
However, it will require me to get call the 2nd API for each sprint. Is there an API that provide the list of sprints along with their information such as start and end date.
If you're on JIRA 7 using JIRA Software, you can use: GET /rest/agile/1.0/board/{boardId}/sprint
This will return results that include startDate and endDate, e.g.:
{
"maxResults": 2,
"startAt": 1,
"total": 5,
"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",
"originBoardId": 5
},
{
"id": 72,
"self": "http://www.example.com/jira/rest/agile/1.0/sprint/73",
"state": "future",
"name": "sprint 2"
}]
}