REST API: Getting list of issues from Greenhopper

Martin Filteau
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 13, 2012

I'm writing a small Ruby script to generate a PDF report from queries I'm running on JIRA / Greenhopper.

How can I get the list of issues on a particular sprint?

I've downloaded the application.wadl file and I thought I had figured out how to do this...

GET http://jira.octasic.com:8080/rest/greenhopper/1.0/sprints/36

  1. {
  2. "sprints":
  3. [
  4. {
  5. "id": 9,
  6. "name": "Sprint 3",
  7. "closed": false
  8. }
  9. ],
  10. "rapidViewId": 36
  11. }

After that:

GET http://jira.octasic.com:8080/rest/greenhopper/1.0/sprint/9/issues

  1. {
  2. "errorMessages":
  3. [
  4. "The requested Rapid Board cannot be viewed because it either does not exist or you do not have permission to view it."
  5. ],
  6. "errors":
  7. {
  8. }
  9. }

I do have permission do view this rapidboard. Perhaps id is not the actual sprintId ?

2 answers

1 accepted

3 votes
Answer accepted
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 14, 2012

Hi Martin,

You might find the REST API browser (there's one installed on jira.atlassian.com for example) helpful when attempting this type of thing.

The part you're missing in your example is that you need to provide the rapidViewId as a parameter to the /sprint/{sprintId}/issues call. This URL will retrieve the issues in the most recent Scrum sprint by the GreenHopper team:

https://jira.atlassian.com/rest/greenhopper/1.0/sprint/53/issues?rapidViewId=96&expandIssues=false

You also might find it useful to use the GreenHopper source code while developing integrations. All commercial licensees (i.e. any license other than $10 starter licenses or free licenses) can access the source via their login to https://my.atlassian.com

Thanks,
Shaun

jamesgt December 9, 2012

Shaun, the link you provided looks broken now. Where latest doc of GH REST API can be found?

jamesgt February 6, 2013

Edwin, I recognize a 401 error (that now the link produces without login), at that time I received a 404.

Matt Doar March 22, 2013

That link is for posting to create a sprint I think

0 votes
Edwin Stol February 6, 2013

Tamas Gemes; the link of Shaun is fine, you just need to login :-)

jamesgt February 6, 2013

Edwin, I recognize a 401 error (that now the link produces without login), at that time I received a 404.

Edwin Stol February 6, 2013
Then consider my comment not-send :-)

Suggest an answer

Log in or Sign up to answer