How do I include an EpicID or EpicName in my Jira API field list

Peter Cleveland October 31, 2018

I am making a call for a list of issues in a particular sprint and I would like to include the epic name or id. I have included an example below:

var m_BaseUrl = "https://mysite.atlassian.net/rest/api/latest/search?jql=sprint=588&fields=key,summary";

What fields do I use to get the epic? I have tried epic, and searching for a customField but I am at a loss.

Can someone point me in the right direction before I just iterate through the sprint list and look up the epic?

 

Thanks

 

Peter

1 answer

1 accepted

0 votes
Answer accepted
Peter Cleveland October 31, 2018

I found the custom field for my instance after searching the community a little harder. Thanks

Karey Graham
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2019

Hello @Peter Cleveland , is it possible you could provide a link detailing how you were able to retrieve the epic ID? Thank you!

Peter Cleveland January 28, 2019

I don't have a link and it has been a while. But at the high level I learned that when you create your first epic in jira, the system automatically grabs a custom field to story the epic story number in any one issuetype.  So i used the api to grab all of the json data for a couple of stories that had epics and searched the data to find the customfield that held the epics for my instance of JIRA. In my case it was customfield_10009.

I hope that helps you to get it configured.  Example api call....

 

https://yoursitename.atlassian.net/rest/api/latest/search?jql=sprint=" + args[2] + "&fields=key,summary,customfield_10005,customfield_10009&maxResults=150

 

Peter

Mangesh Deshpande
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 24, 2020

Is there any way to get an Epic Description, I am able to fetch Epic ID from custom field but not finding it's description any idea from where and how to get it?

Sudhakar Jothilingam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 19, 2021

best way is to pull fields first before sending your payload, as the project type varies, the property name also varies

 

please use below url for finding required field details

https://community.atlassian.com/t5/Jira-Software-questions/How-do-determine-the-custom-field-number-for-epic-name/qaq-p/1003546

Suggest an answer

Log in or Sign up to answer