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.
Cheers,
Peter
Hi @Peter Van de Voorde ,
Thank you for taking the time to respond to my query.
Haha, it looks like I need to explore other methods. I'll take your suggestions.Thanks again for your help.
Cheers,
Vlim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.