Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve list of all JIRA numbers and sub-tasks for a particular assignee using JIRA API?

Shashank
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!
March 1, 2021

Hi,

In my app, once I enter a particular assignee, I should get list of all Epic JIRA numbers and sub-tasks under it. How do I query it using JIRA rest api? Please help me out.

 

1 answer

0 votes
Warren
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.
March 1, 2021

Hi @Shashank 

I'm not quite sure which items you're expecting to be assigned to the user, I'm assuming Epics here, but you can move the assignee bit around.

I would use the API call /rest/api/3/search (shown here in the documentation) and then pass in the correct JQL such as 

/rest/api/3/search?jql=project=ABC and assignee=Fred and type=Epic

Replace ABC Fred with your project and assignee. This is the list of all epics assigned to the user.

Iterate through all the epics, extract the key and do another API call for each one, finding the subtasks, by

/rest/api/3/search?jql=parent=ABC-123

ABC-123 is the Epic key for each epic as you iterate through them all.

Suggest an answer

Log in or Sign up to answer