Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

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""
  4. id"7"
  5. name"Epic"
  6. self""
  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""
  4. id"7"
  5. name"Épica"
  6. self""
  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

You can get all of the issue types:

You can also get all of the epics for a board:{boardId}/epic-getEpics

You can also use anything from the /epic API:

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.

@Krzysztof Kercz I am facing a similar problem, and apparently the getEpic endpoint does not work your NextGen projects.
How do I find out if an issue is an epic in a nextGen project?

I don't think there is any straightforward way. Feel free to create a feature request in the [ACJIRA]( project for this.

Okay thank you. I have create the following issue:

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events