I wanted to extract an epic name for the issue , and this prompted me for a few days. The key was to understand that epic is only the parent problem, and the epic name is the summary field of the parent issue .
So:
Step 1
Find the custom field where the epic is stored using the editmeta query:
https: // [your-jira-hostname] / jira / rest / api / 2 / issue / [issue-number] / editmeta
This will give something like below that shows the custom Id field we need
{ "fields": { <SNIP> "customfield_12360": { "required": false, "schema": { "type": "any", "custom": "com.pyxis.greenhopper.jira:gh-epic-link", "customId": 12360 }, "name": "Epic Link", "operations": [ "set" ] } <SNIP> } }
Step 2
Request your problem by pulling the value of a custom field
https: // [your-jira-hostname] / jira / rest / api / 2 / issue / [issue-number]? fields = customfield_12360, summary
if our problem is JIRA-34 let's say it will give something like
{ "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations", "id": "39080", "key": "JIRA-34", "fields": { "summary": "Write heavily upvoted answers for stack overflow", "customfield_12360": "JIRA-33" } }
Step 3
Now we know the problem number of our epic JIRA-33 , so now request an epic ...
https: // [your-jira-hostname] / jira / rest / api / 2 / issue / JIRA-33? fields = summary
{ "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations", "id": "39080", "key": "JIRA-33", "fields": { "summary": "Improve StackOverflow reptuation" } }
The epic name for JIRA-34 : "Improve Stack Overflow Overreservation"
Done.