You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm currently working on a feature in my Flask application where I need to fetch all sprints for a specific project in Jira. I noticed that the way to achieve this is to get all the boards for the project and then fetch the sprints for each board. However, this approach seems inefficient as it results in multiple requests which could slow down my application.
I found an endpoint '/rest/greenhopper/1.0/sprint/picker' that seems to return all the sprints, but when I tried to use it, I got an 'OAuth 2.0 is not enabled for this method' error.
Is there any official or supported API that allows fetching all sprints for a project in one go? Or could you provide any guidance on how to use the '/rest/greenhopper/1.0/sprint/picker' endpoint correctly? Your assistance would be greatly appreciated.
Hi @Vlim ,
Welcome to the Atlassian Community.
The greenhopper endpoints have been deprecated a long time ago and might not return the correct information even if you can get it to work (probably with Basic Auth).
I totally understand that having to call the Jira REST API multiple times is not the most efficient way of doing this. But most Jira projects will only have a single board with a bunch of sprints, so getting all sprints of that single board equals getting all sprints of the project.
Also keep in mind that sprints are connected to boards, not projects. You can have boards that have issues from multiple different Jira projects, so there might not be as clear a connection between Projects and Sprints as you would think. But there is a clear connection between boards and sprints as a sprint can only ever be part of a single board.
I would recommend using this endpoint to get all sprints related to the board: https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-rest-agile-1-0-board-boardid-sprint-get
If it's really slowing down your application you could alway try a multi threaded parallel approach to get all the information from Jira.