Is there a way to tell an issue is an Epic via the API

I am getting the list of issues using the search API. I have the list of issues with  the epics inside it, by I need to identify them. In my jira instance the issues that are epics has this issuetype field:
  1. avatarId10867
  2. description"gh.issue.epic.desc"
  3. iconUrl"https://comalatechdev.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10867&avatarType=issuetype"
  4. id"7"
  5. name"Epic"
  6. self"https://comalatechdev.atlassian.net/rest/api/2/issuetype/7"
  7. subtaskfalse
The problem is that I don't know if an epic has the same in all jira instances, since I have tried changing the language and the same fields now are:
  1. avatarId10867
  2. description"Creado por JIRA Software - no editar ni eliminar. Tipo de incidencia para una historia del usuario grande que debe desglosarse."
  3. iconUrl"https://comalatechdev.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10867&avatarType=issuetype"
  4. id"7"
  5. name"Épica"
  6. self"https://comalatechdev.atlassian.net/rest/api/2/issuetype/7"
  7. subtaskfalse
As you see the constants are id, self, iconUrl and subtask. My question is: in all jira instances the issuetype with id 7 is epic? If not, how can I check if an issue is an epic?
Thank you in advance.

1 answer

0 votes

You can get all of the issue types: https://docs.atlassian.com/jira/REST/cloud/#api/2/issuetype-getIssueAllTypes

You can also get all of the epics for a board: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board/{boardId}/epic-getEpics

You can also use anything from the /epic API: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/epic

I hope that helps achieve your use case. Please let me know if it does not.

Thanks Robert for the suggestions.

I'm not sure any of these can really help my use case. I have an issue ID and I'm trying to identify if that issue is an Epic or something else. Just having the list of issuetypes won't help as you can't tell which one is the Epic one as far as I can tell other than by Name which can change in different languages.

If it is an issue I do want to gather the contained stories so the GET /rest/agile/1.0/epic/{epicIdOrKey}/issue  call would be helpful once I know if its an epic. 

You can use GET /rest/agile/1.0/epic/{epicIdOrKey}. If the issue is an epic, then a success response will be returned, otherwise 404.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 6 hours ago in Jira Ops

Jira Ops Early Access Program Update #5: Three new ways to get a live Jira Ops demo!

Welcome to your weekly Jira Ops Early Access program update, where we’re sharing news and updates on Jira Ops progress as we work toward our 1.0 release. If you ever want to drop us feedback or ideas...

18 views 0 1
Read article

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