How to access Green hopper data via REST ?

Ramitha Jayasekara April 2, 2013

Hello,

I am trying to develop custom dash bord using java. To do this i need to pull the data from Jira green hopper. could you please let me know how to access the jira green hopper data via REST. it is really great if some one can provied link to sample code or tutorial to follow.

i am totally new to jira development and small examples will help lot to me.

Thanks and regards,

Suraj

4 answers

1 accepted

0 votes
Answer accepted
Mikkel Kragelund Nielsen
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.
April 2, 2013
Ramitha Jayasekara April 2, 2013

Hi mikkel,

Thanks a lot for sharing this URL. This will helps lot to prepaire my REST queires. btw do you have any code snipet for Green hopper REST client that i can used to integreat with my java application.

Aakash Chauhan January 25, 2020

This doesn't work anymore

1 vote
Konstantin Fadeev October 16, 2013

Hi Thomas,

try https://beate.sproing.at/jira/rest/greenhopper/1.0/sprintquery/3

0 votes
Paul Greig
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 2, 2013
Hi Suraj,

To access the GreenHopper data using REST the following commands are useful:

1. Run your example rest command to get your RapidView ID:

curl -D- -u <user>:<pass> -X GET -H "Content-Type: application/json" https://<instance>/rest/greenhopper/1.0/rapidview

2. Run the following to get your list of Sprints ID's from the previous rapid view:

curl -D- -u <user>:<pass> -X GET -H "Content-Type: application/json" https://<instance>/rest/greenhopper/1.0/sprints/<RapidViewID>

3. Using the RapidView ID and Sprint ID you can run the following to get a list of your issues:

curl -D- -u <user>:<pass> -X GET -H "Content-Type: application/json"  https://<instance>/rest/greenhopper/1.0/rapid/charts/sprintreport?rapidViewId=<RapidViewID>&sprintId=<SprintID>

Cheers,

Paul

Ramitha Jayasekara April 2, 2013

Hi Paul,

Thanks a lot for above commands. I am struggeling to find data for below senarios. would you be help me to generate quires for below senarios

1) Find all projects for current sprint

2) Find all issues associated with current sprint

3) Find all issues associated with given sprint

4) FInd all versions for given project

Is there any type of quires to fetch these information?

Appriciate you support here

Thanks and Regards,

Suraj

Thomas Kowar September 3, 2013

Hi Paul,

the second one does not work for me (1 & 3 do work) - has der anything changed? I'm always getting a

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<status>
<status-code>404</status-code>
<message>
null for uri: https://beate.sproing.at/jira/rest/greenhopper/1.0/sprints/3
</message>
</status>

Do you know what the problem is?

regards, Thomas

Jerry Pattenaude August 29, 2014

For anyone else that gets here

sprints/{rapidviewid}

is now

sprintquery/{rapidviewid}

0 votes
Mikkel Kragelund Nielsen
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.
April 2, 2013

No sorry.

FYI:
I found that using a already created client (Java REST Jira client, in my case) had some disadvantages. So i ended up just using a REST libiray and implementing my own custom "client".

This gives much better control over the amount of calls. Jira's handling of REST calls, means that a new session is created for every call. So if the client isen't carefull, it creates A LOT of sessions. And might end up crashing JIRA, in a blazing "session owerflow" fire.

Ramitha Jayasekara April 2, 2013

Thanks a lot for infomation Mikkel. This will helps me when developing my own client.

Suggest an answer

Log in or Sign up to answer