Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

greenhopper rest api, listing all issues in a sprint

John Wilkinson February 5, 2013

Hi I am trying to use the rest api to get all the issues within a sprint.

I have got the sprint id from:

server:8080/rest/greenhopper/1.0/sprints/1

which returned {"id":4,"name":"Sprint 120132","closed":false}

using the sprint id as 4 I tried:

server:8080/rest/greenhopper/1.0/sprint/4/issues/list

But this is not correct.

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

13 votes
Answer accepted
OmarA
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.
February 23, 2013

Hi,

First you need to get the rapidview ID for that sprint, here are the steps:

  1. Run /rest/greenhopper/1.0/rapidview to get list of rapid views with the IDs.
  2. After you get the rapid view ID, you will need to get list of sprints in that rapid view by running /rest/greenhopper/1.0/sprints/{rapidViewId}
  3. After obtaining the Sprint ID, you can run /rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId={rapidViewId}&sprintId={sprintID} to get list of issues for that sprint.

Hope it helps !

Omar

Matt Doar March 22, 2013

The sprintreport resource is the best I've found for this. However be aware that the lists of issues are in subsets: puntedIssues, completedIssues, etc

Gennady Chmelev April 2, 2013

Hi. help me, please.

How to get a 'Issues Not Completed' in the sprints?

Miles Tillinger May 23, 2013

Are there Greenhopper REST API docs somewhere?

Phillip Ponzer [Cprime]
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.
June 27, 2013

In the returned JSON that the sprintreport returns, there's an "incompletedIssues" array, that should be helpful.

Also, for the Greenhopper REST API, this is the best resource I could find:

https://jira.atlassian.com/plugins/servlet/restbrowser#/com-pyxis-greenhopper-jira-greenhopper-rest-filter

Andrew Sandefer April 27, 2015

Omar, I was unable to get your route for sprints by rapid board to work. I checked the documentation and the route is actually rest/greenhopper/1.0/sprintquery/:myRapidBoardId where the segment value "sprintquery" differs from "sprints". Could be a version thing but at any rate in case anyone else is struggling with this hopefully my comment will help.

kaiyuzh July 31, 2015

Hi, @Andrew Sandefer, which documentation did you check? And @Omar, where do you get those knowledge about the greenhopper API from? I googled a lot and did not find a good documentation for using greenhopper rest api. Can you point me to somewhere?

Andrew Sandefer August 1, 2015

@Kaiyu Zheng - go to https://jira.atlassian.com/plugins/servlet/restbrowser#/ and take a look at the API Browser. There are also several getting started articles as well that can be found at https://developer.atlassian.com/jiradev/ Thanks and good luck! Andy

kaiyuzh August 3, 2015

Hi Andy, Thanks! I looked around in the api browser, but didn't find rules like rapid/charts/sprintreport?rapidViewId={rapidViewId}&sprintId={sprintID}. Can you, as an example, point me to where this rule is found? I really appreciate it

kaiyuzh August 3, 2015

@Andrew Sandefer

kaiyuzh August 3, 2015

Thanks. I get it. I have to uncheckt the "Show only Public APIs"

rameshautorabit December 23, 2015

@Kaiyu Zheng Could you Please help me to get the all the sprints. I follwed the above steps i am able to get rapidviews. but with that is i am not getting the all the sprints. below is my output. rapid views::{"views":[{"id":1,"name":"Sample Scrum Project","canEdit":true,"sprintSupportEnabled":true,"showDaysInColumn":false},{"id":2,"name":"test","canEdit":true,"sprintSupportEnabled":true,"showDaysInColumn":false}]} All sprints::{"message":"null for uri: http://172.16.0.32:8080/rest/greenhopper/1.0/sprints/2","status-code":404}

6 votes
Dave Pacifico May 15, 2013

I've found that the easiest view of this is straight from the JIRA issues endpoint:

/rest/api/latest/search?jql=sprint%3D<SPRINT_ID>&fields=<FIELDS YOU WANT>&maxResults=<SOME REASONABLE LIMIT>

2 votes
Michele Caramello November 25, 2013

Just for reference, this is the actual Greenhopper / JIRA agile API list: https://jira.atlassian.com/plugins/servlet/restbrowser#/search/greenhopper

I did not find a refence, meaning one with description of what each API does.

0 votes
Phillip Ponzer [Cprime]
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.
June 27, 2013

As far as I know, sprints are not project-specific as they can span multiple projects.

0 votes
Laszlo Kremer
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.
February 25, 2013

Aren't the sprints project related objects? They should be retrievable via projectkey.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events