Is it possible to get a list of sprints for a particular project ? I know there is a way to find issues by a sprint, but haven't found any way to get all the sprints.
相关问题
- Set assignee field when creating an issue in JIRA
- How to serialize a jira issue object in Python?
- How can I fetch (via GET) all JIRA issues? Do I go
- JIRA: How to make a webhook fire for only a single
- Adding attachment to Jira's api
相关文章
- Public issues in JIRA
- TFS vs. JIRA/Bamboo/SVN [closed]
- Does the JIRA REST API require submitting a transi
- Updating Jira tickets from Jenkins workflow (jenki
- how to create a single annotation accept multiple
- How to get all work logs for a period of time from
- Create JIRA sub-tasks automatically when issue cre
- How to archive projects in Jira, so they would dis
There is no REST endpoint to do this, you can only query the sprints that are visible for a particular Rapid Board and you need to use the GreenHoppper plugin for this.
The endpoint for that is: https://yourjira.com/rest/greenhopper/1.0/sprints/{rapidBoardId}
You can enumerate the Rapid Boards at another REST endpoint: https://yourjira.com/rest/greenhopper/1.0/rapidviews/list
Read more here: https://answers.atlassian.com/questions/65920/how-can-i-list-all-sprints-from-greenhopper-using-the-rest-api
Have you looked at the sprint report? The dropdown will show you a list of all sprints for that board. Of course you can have multiple boards per project, so you might need to search all related boards.
In JQL it's not yet possible but you can use the new jira agile API. Here is the documentation for jira cloud and for jira server 7.2.3.
First, you need to find the board of your project. This REST endpoint to get the list of your boards is:
[jira-url]/rest/agile/1.0/board
Next you can get their project with:
[jira-url]/rest/agile/1.0/[board-id]/project
So in this manner you can find the board id of your project. At the end, you can get the sprints list of this board with:
[jira-url]/rest/agile/1.0/[board-id]/sprint
Based on this answer: answers.atlassian.com/questions/65920/answers/3599592, the best Web API to get the list of sprints is:
<rapidBoardId>
is different in each system, I just saw it in the address bar of my browser when I was surfing in JIRA, then I hard coded it into the code which is calling the API.[jira-url]/rest/greenhopper/1.0/sprint/picker
Delivers "allMatches" array containing active sprints including id and boardName.
It was useful to me when i was searching a list of active sprints in all projects to clean up not completed or not well named sprints :-)
I use the following rest call to find all the sprints:
https://yourjira.com/rest/greenhopper/1.0/integration/teamcalendars/sprint/list?jql=project+%3D+YOURPROJECTKEY
To find only the open sprint of the project I run this: https://yourjira.com/rest/greenhopper/1.0/integration/teamcalendars/sprint/list?jql=project+%3D+YOURPROJECTKEY+and+Sprint+not+in+closedSprints()