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

This widget could not be displayed.

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

This widget could not be displayed.

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 Apr 22, 2018 in Jira Software

How-to setup a secured Jira Software 7.9.0 on Ubuntu 16.04.4 in less than 30 minutes

...PermissionsStartOnly=true User=www-data Group=www-data ExecStart=/opt/jira/bin/startup.sh ExecStop=/opt/jira/bin/shutdown.sh TimeoutStartSec=120 TimeoutStopSec=600 PrivateTmp=true [Install] WantedBy...

1,518 views 10 12
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