The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Jira API to get details of all Sub-tasks

Mayur Gaikwad/Tech PMO
Contributor
April 29, 2024

Hi,

Are there any Jira APIs to get details of all sub-tasks in a project

I tried using JQL to fetch these details which i can see all sub-tasks are coming but when using it as a parameters in below URL, many sub-tasks are getting missed.

https://balic.atlassian.net/rest/api/2/search?jql

 

This is URL im using wherein i can see many sub-tasks are getting missed

https://balic.atlassian.net/rest/api/2/search?jql=%20project%20=%20OPS%20AND%20issuetype%20=%20%22Development%20Task%22%20order%20by%20created%20DESC

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Aron Gombas _Midori_
Community Champion
April 30, 2024

You are using the correct end-point, but please note that the response is paginated!

For example, if there are 10,000 sub-tasks on your issue, it will not return them as a single JSON response because that wouldn't scale. Instead, it returns the first batch of N issues, then gives you another link to return the second batch, and so on. You have to walk through all pages to get the full result.

See: https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination

0 votes
Sebastian Krzewiński
Community Champion
April 30, 2024

Hi @Mayur Gaikwad/Tech PMO 

 

Please check this doc about searching via rest api. Maybe this will help you to fix that - https://developer.atlassian.com/server/jira/platform/jira-rest-api-example-query-issues-6291606/

 

Another question - As I understand "Development Task" is your sub-task type right?

 

Regards,

Seba

0 votes
Salzi
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 Champions.
April 30, 2024

Hi @Mayur Gaikwad/Tech PMO

try the following JQL:

 

project = ProjectName and issuetype IN subTaskIssueTypes()

 

this displays all issues that are of type "subtask" in the project

 

 

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events