How to attribute issue to epic via API

PawełK December 13, 2012

Hello,

we have Jira & Greenhopper licensed and need to export our projects via API to them. Exporting project and issues is ready and works good (via SOAP for project and REST for issues), but I've problem with attribute issue to epic in Greenhopper. I can't find any API documentation for Greenhopper.

Did anyone make that and can help me? Greenhopper API documentation will be also helpful.

Thanks,

Paweł

3 answers

1 accepted

3 votes
Answer accepted
Renjith Pillai
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.
December 28, 2012

Use the REST method /rest/greenhopper/1.0/epics/<EPIC ID>/add

Request Method:
PUT

Content: {"ignoreEpics":true,"issueKeys":["<Story ID>"]}

And for finding out what REST apis are present in GH, open the Chrome developer tab and check what are the requests going to the server while you perform an actual action in GreenHopper.

PawełK January 7, 2013

Thanks! I forgot to ask how can I create an epic via API? Finally I found REST API documentation, but can't find this.

Renjith Pillai
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.
January 7, 2013

Was that a question?

Creating Epics is like creating any other issue in REST. Is that what you looking for?

PawełK January 7, 2013

Yes, that was a question, but you're right - I thought, that greenhopper's epic is something else than epic issue. Thanks a lot for your answers - everything works good!

Jason Brison May 7, 2013

You can also use the Atlassian Developer Toolbox to list all the REST API's available.

0 votes
Shane Mc May 7, 2013

I would also like to know how to do this via an API. It doesn't look it is possible using JRJC but perhaps it is possible using the Greenhopper API (https://docs.atlassian.com/greenhopper/6.2/) - cannot find any guides on how to use this other than the javadoc however - anyone got any links?

0 votes
OmarA
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.
December 25, 2012

Hi Pawel,

If you mean that if you want to get the stores under the Epic (left side panel), you may look at this article which is explaining how to do this:

https://confluence.atlassian.com/display/GHKB/Retrieve+user+stories+under+the+Epic+via+REST+call

Please let us know if you need any further clarifications.

Cheers,

Omar

David Murgatroyd December 28, 2012

I think Paweel means he wants to add an issue to an epic via an API. I'd like to know that too.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events