Jira API to get details of all Sub-tasks

Mayur Gaikwad_Tech PMO 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

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leaders.
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

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events