Why my REST API query does not return epics?

Ana Ruiz October 8, 2015

I have the following REST API call to retrieve epics and for some reason I get stories and bugs and a mix of issue except epics.

 

https://myjira.atlassian.net/rest/api/latest/search?jql=project=DEV&startAt=1&maxResults=1000&issuetype=6

 

Has anyone encountered this before? Is issuetype=6 not for Epics? Thank you in advance!

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Jeff Louwerse
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 9, 2015

You rest call / JQL is not correct.  

 

/rest/api/2/search?jql=project+%3D+DEV+and+issuetype+%3D+Epic&startAt=1&maxResults=1000

or

/rest/api/2/search?jql=project=ZAA and issuetype=Epic&startAt=1&maxResults=1000
Ana Ruiz October 12, 2015

Thank you Jeff! My query is now returning Epics and Bugs. The bugs are not related or linked to the Epics in any way. Why is that? I need my query to only return Epics.

Jeff Louwerse
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 12, 2015

my best guess would be that your bugs have an Epic Name associated to them and that Jira is smart enough to realize these are considered Epics? I can't test this theory on my system though as I am running an older version of Jira Agile that does not support this. I would suggest working out your JQL query in the Issue Navigator, possibly with "and issuetype != Bug" and when you get what you want, copy that to your REST call.

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 8, 2015

You are filtering by "issuetype=6". Is "6" id of epic issue type?

Ana Ruiz October 12, 2015

Yes, Volodymyr. issuetype=6 means Epics.

TAGS
AUG Leaders

Atlassian Community Events