I am using Jira cloud and thus I couldn't get the REST API Browser add on to develop my query.
I had created another question, but it was flagged as SPAM because I tried to insert the original answer I found here to bestow credit where credit is due.
I have found on google the following very nice jql that returns all the epics from a given project.
/jira/rest/api/2/search?jql=project%3D%22Project%20Name%22%20AND%20issuetype%3D%22Epic%22&fields=summary,duedate,priority,issuetype,key,timeoriginalestimate,customfield_11000,customfield_10100,customfield_10002,customfield_10014,assignee,components,fixVersions,versions,resolution,customfield_10011,labels,reporter,status,customfield_10015,time estimate
I'm doing a trial and error approach to get something like the JSON structure bellow, my current iteration is:
/search?jql=project%3D%22<project-name>%22%20AND%20issuetype%3D%22Epic%22&fields=summary,customfield_11000,customfield_10100,customfield_10014
{[
epics: [
epic: [
name: epicName,
epicId: epicID,
url: epicURL,
sprints: [
sprint: [
name: sprintName,
sprintId: sprintID,
url: sprintURL.
stories: [
story: [
name: storyName,
storyId: storyID,
url: storyURL,
issues : [
id: issueId,
url: issueUrl,
type: issueType,
name: issueName,
status: issueStatus
]
]
]
]
]
]}
Thanks in advance
Hello,
Rest api method returns JSON in the format which was designed to be returned. You can not make a Rest Api method return a different JSON
OK, Thanks for the input!
So I would need to have one JQL search for the epics.
Then, for each epic get all the sprints.
Then, for each sprint get all the stories.
And, finally, for each story get all the issues.
Is that it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can actually get epics, stories and issues in one Rest Api Call to /jira/rest/api/2/search. Then you can work on the received json and get all data you need. Sprint is just a cutsom field. Epic Link is also a custom field. Stories connected to issues by links. You can get all the information from the return JSON and process it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.