How can I list all sprints from greenhopper using the REST api???

Paul Blakeley June 28, 2012

Hi,

I need to use the REST api to query greenhopper to get a list of all sprints. I would much appreciate it if someone please post or point me to an example.

7 answers

7 votes
Michele Caramello November 25, 2013
curl -u <username>:<password> -X GET -H "Content-Type: application/json" 'https://<site>/rest/greenhopper/1.0/sprintquery/<rapidBoardId>?includeFutureSprints=true&includeHistoricSprints=false'

did the job for me.

As Shaun said, you need to find out the 'rapidBoardId' with a GET request to https://<url>/rest/greenhopper/1.0/rapidviews/list:

curl -u &lt;username&gt;:&lt;password&gt; -X GET -H "Content-Type: application/json" 'https://&lt;site&gt;/rest/greenhopper/1.0/rapidviews/list'

See also the convenient browser:

https://jira.atlassian.com/plugins/servlet/restbrowser#/resource/greenhopper-1-0-sprintquery-rapidviewid

4 votes
sclowes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 1, 2012

There is no REST endpoint to do this, you can only query the sprints that are visibile for a particular Rapid Board.

The endpoint for that is: https://<url>/rest/greenhopper/1.0/sprints/{rapidBoardId}

You can enumerate the Rapid Boards at another REST endpoint: https://<url>/rest/greenhopper/1.0/rapidviews/list

Thanks,
Shaun

0 votes
C R August 10, 2016

You can create an export from table AO_60DB71_SPRINT where ID is the Sprint ID, RAPID_VIEW_ID the Scrum Board ID and NAME the Sprint Name

0 votes
Talk About August 28, 2013

Thanks anyways.

0 votes
Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 28, 2013

I don't have further details at this point.

0 votes
Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 17, 2013

Planned sprints will be able to be queried in the same way in a release coming very soon.

Talk About August 19, 2013

This are very good news. Can you explain this a little bit further? Will the planned sprints be listed in the regular sprint list queried by

sprints/{rapidViewId}

or will there be another rest url to get them?

Rita LEBBOS June 25, 2015

It seems this was forgotten? :(

0 votes
Talk About August 16, 2013

I would like to pick up that topic. The mentioned endpoint https://<url>/rest/greenhopper/1.0/sprints/{rapidBoardId} unfortunately does not include sprints that are not yet started, only the completed and running ones. Is there another way to get also the sprints that are only planned?

Thanks!

Suggest an answer

Log in or Sign up to answer