Get all sprints

aasgar November 28, 2020

Hello,

Has any one had success with GET /rest/agile/1.0/board/{boardId}/sprint ? I have had success with board/{board_id}/sprint?state=active and board/{board_id}/sprint?state=closed. Instead of making 2 calls, I would like make one call to get all the sprints of a board.

Appreciate any help.

1 answer

2 votes
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 28, 2020

Hi @aasgar I had success even with your first query. But also states values can be separated with comma so you can use more of them:

 board/{board_id}/sprint?state=active,closed
aasgar December 1, 2020

Thanks. Were you successful with the Get All sprints from a board for a given board id on Jira cloud? I seem to get an error ( 400- Bad request) when I use GET /rest/agile/1.0/board/{boardId}/sprint.

Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 1, 2020

Hi @aasgar following GETs are working for me:

  • /rest/agile/1.0/board/2/sprint?state=active,closed
  • /rest/agile/1.0/board/2/sprint

where 2 is ID of the board.

aasgar December 1, 2020

Hi Martin,

Like I mentioned before 

  • /rest/agile/1.0/board/2/sprint?state=active,closed works for me. But /rest/agile/1.0/board/2/sprint does not work. 
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 3, 2020

Hi @aasgar could you share your exact requests? I mean the whole queries?

aasgar December 5, 2020

Hi Martin,

From PowerBI, I use the Web data source and give the url

  • https://<jira url>/rest/agile/1.0/board/<board_id>/sprint?state=active,closed

I get all the active and closed sprints for that board.

However, if I use the Web data source and give this url

  • https://<jira url>/rest/agile/1.0/board/<board_id>/sprint , I get an error. I expected this to return all sprints from the board that I have specified.
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2020

hi @aasgar , what if you try the "query" only in your browser? Does it work? There might be some problem on PowerBI (it can add something to the request and you don't know it).

aasgar December 8, 2020

Hi Martin,

The query doesn't work in the browser either. But I have worked around it by using 

  • https://<jira url>/rest/agile/1.0/board/<board_id>/sprint?state=active,closed . 
Martin Bayer _MoroSystems_ s_r_o__
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 8, 2020

@aasgar ok, we can probably live with it.. but it is weird that it is working for me and not working for you:). Can you accept the answer pls? Someone can use this workaround in the future....

aasgar December 9, 2020

Yes, it is indeed strange that it works for you. Anyway, the workaround is great as well as it works. The workaround is not an answer though, but we could close this thread. Thanks Martin.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events