REST API: Getting list of issues from Greenhopper

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

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

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

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

That link is for posting to create a sprint I think

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

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

Then consider my comment not-send :-)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 05, 2018 in Jira Software

Jack Graves: Real Ale enthusiast with a knack for Jira Software implementation

@Jack Graves [AC] first caught our eye with his incredible breakdown of what, in his opinion, can make or break a Jira software implementation. (Read his thoughts on this thread)! In this follow...

96,842 views 4 14
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you