How to attribute issue to epic via API

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
Accepted answer

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.

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

Was that a question?

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

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!

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

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

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

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?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira Service Desk

Looking for anyone who has switched from Zendesk to Jira Service Desk

Hi Community! The Jira Service Desk marketing team is looking for customers who have successfully switched from Zendesk to Jira Service Desk!   We’d love to hear your thoughts on the pros and ...

21 views 0 1
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