How to get the Epic Key or id from a Story Issue in a REST API Search

Greg_Davis
Contributor
June 30, 2023

I feel like this must be the ultimate newb question but nothing comes up in my searches that is responsive.  

I am using the REST API Search to build a visual representation of the Epics and Stories from my Jira project.  

I am pulling in IssueType Story for my project and version and I want to be able to know the Epic parent ID.  Epic ID seems like it would be in the top 10 useful fields in an issue so I feel like am missing something. 

Is there an expansion I am missing or do I have to build this object graph with a blizzard of calls?

2 answers

1 accepted

3 votes
Answer accepted
Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2023

Hi, @Greg_Davis 

In REST API request you need to look at customfield, which is mapped to Epic Link.

For example in my test instance it's customfied_10112

image.pngimage.png

Greg_Davis
Contributor
July 1, 2023

Thank you Evgeny,  This is what I would expect... my data has tons of these custom fields but none hold either the key or ID of their epics.   Are you using the /Issue API or the /Search API?  Those are the two API's i've tried.   Maybe I am missing an expand. 

Like Sanjog Sigdel likes this
Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2023
Like Sanjog Sigdel likes this
Evgenii
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 1, 2023

Check, what field is mapped for Epic Link in your instance, and search for it in response body

Like Sanjog Sigdel likes this
Greg_Davis
Contributor
July 1, 2023

Thank you so much!   I checked my Jire web page source and found the custom field id number there, added the property and I am home free. 

Really appreciate the help

Like Evgenii likes this
1 vote
Benjamin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 30, 2023

Hi @Greg_Davis ,

 

If the story is linked, then the EPIC NAME/ID should show up on the story. Usually, this field is there by default. 

 

It really depends where you are in Jira to see the Epics. If you on a Scrum Board, the Epics are shown on the side panel along with Versions. The don't show up as list of issue on your backlog. 

If you want to build a visual of your epics and story, try using the dashboards. It's a great place to put together widgets to visualize your project. There are pie charts, matrices, and bar graphs, etc.

 

Hope this helps.

Greg_Davis
Contributor
June 30, 2023

Hi Benjamin,  I'm sorry... I left out a key component of my issue.. I am calling the Rest API and looking through the Json for a link to the epic.  I do see the link to the epic in the Jira UI.  

Sorry for the omission. 

Kind regards, 

Greg

Like John Funk likes this

Suggest an answer

Log in or Sign up to answer