Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get all sprints in project using JIRA REST API

Is there anything something like "http://www.example.com/jira/rest/agile/1.0/sprint?project=XYZ", to retrieve all the sprints in a project.

JIRA platform api can retrieve projects info and JIRA software API can retrieve sprints for a given board. But i need sprints for any given project (combination) or atleast boards for a given project so that i can retrieve sprints in those boards later

like image 829
lch Avatar asked Jun 14 '16 20:06

lch


People also ask

How do I see all open sprints in Jira?

Open the board and go to the Backlog view to see a list of all the open Sprints and the issues in the Sprints. You need to use the Backlog view since the Active Sprints view appears to merge all the issues into one Sprint.

How do I view multiple sprints in Jira?

From the global navigation, select Settings ( ) > Products. Under Jira Software configuration, select the toggle for Parallel sprints.

How do I get sprint data from Jira?

Navigate to a Jira project. Open "Reports" on the left-side menu. Select the sprint report from the agile reports.


1 Answers

You can do it but with two resources:

  • First you can get all the scrum boards of the project with this:

https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getAllBoards

  • Use the query parameters projectKeyOrId and type to filter them.

  • Iterate all the elements and use the url below with the id of each board to get its sprints:

https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/sprint-getAllSprints

like image 150
Carlos Avatar answered Oct 02 '22 07:10

Carlos