Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the sprint infomation using the project key?

Sysaccount February 14, 2019

Hi,

 

I want to write a script using the rest API's to fetch all the sprint information (id, state, name, startDate, endDate, completeDate, originBoardId, goal) using the project key. Is there a way to do this? 

E.g.: The result would look something in an export like:

    Project Key | Id | State| Name | startdate| enddate | completedate | originboardid | goal |

1)      PMOP    |5 | ... | Sprint 1| 10/30/2017 | 10/19/2017|... | 100 | test |

2)      PMOP    |6 | ... | Sprint 2| 10/30/2017 | 10/19/2017|... | 200 | test1 |

3)    IAH    |7 | ... | Sprint 10| 10/30/2017 | 10/19/2017|... | 300 | test2 |

1 answer

1 accepted

1 vote
Answer accepted
Claudiu Lionte
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2019

Hi,

In Jira, sprints are not connected to a project, but to a board. This is because a sprint can contain issues from different projects.

In order to get information about all the sprints connected to a board, you need to send a GET request to 

/rest/agile/1.0/board/{boardId}/sprint

Take a look at the REST API documentation article below for more information about Jira Software - related API calls. This documentation is for Jira Software Cloud, but it also applies to Server:

https://developer.atlassian.com/cloud/jira/software/rest/#api-rest-agile-1-0-board-boardId-sprint-get

Claudiu

Suggest an answer

Log in or Sign up to answer