Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,845
Community Members
 
Community Events
168
Community Groups

JIRA API - get all projects including components

Edited

Hello,

I am working on JIRA Api 2 and trying to get all projects including components using this /rest/api/2/project.

When I get the single project using /rest/api/2/project/{projectIdOrKey}, I also get the components.

My question is how to get multiple projects including components.

Does anyone get the same question. Can you give me a hint.

Thank you

 

1 answer

0 votes
Andrew Rising Star Dec 15, 2019

Hi,

I'm not sure it is possible. In scheme for 'get all project' https://docs.atlassian.com/software/jira/docs/api/REST/8.4.3/ exist parameter 'expand'. But looks like it not work for 'components'. 

In my instance response show only 4 possible values for 'expand':

/rest/api/2/project?expand=lead

"expand":"description,lead,url,projectKeys"

I'm afraid that mean not possible get all projects with components. Only using loop foreach after get all projects.

B.R. 

Thank you @Andrew . I did try the expand query and get the same result.

So In my case what is the best solution for getting projects and its' components.

May I have to call /rest/api/2/project/{projectIdOrKey} many times or I have to use the /rest/api/2/search?jql to get all the issues then group the data.

@Andrew what do you think

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events