How to get the JSON response from the Greenhopper REST API in Gadget?

I am not able to get the response from the GreenHopper REST API for the url http://localhost:2990/jira/rest/greenhopper/1.0/sprints/1 through my Gadget application.

I able to get the following output when I try it from Browser, Below is the Output.

{"sprints":[{"id":1,"name":"Sprint 1","closed":false}],"rapidViewId":1}

My Code snippet to retrive the sprint details in Gadget is :

args: {

key: "sprints",

ajaxOptions: function () {

return {

url: "/rest/greenhopper/1.0/sprints/1",

};

}

}

Can anybody sugget me how to get the JSON Response from greenhopper REST API for a JIRA dashboard.

I am getting following Exception in Server:

[talledLocalContainer] at java.lang.Thread.run(Thread.java:662)

[talledLocalContainer] 2013-04-25 15:26:58,985 http-2990-11 ERROR admin 926x5323x1 dggnll 172.27.186.82 /rest/greenhopper/1.0/sprints/1

[common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service

[talledLocalContainer] javax.ws.rs.WebApplicationException

[talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.TerminatingRule.accept(TerminatingRule.java:66)

[talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)

1 answer

0 votes
Timothy Chin Community Champion Apr 30, 2013

Did you get this to work? My workaround was to make Java client to make the call.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,942 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot