Forums

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

With api jira, how do I get a list of project who use a specific Issue Type ?

Frédéric Battesti May 28, 2020

I need to get a list of projects that use a specific issue type 
How can I do, please

 

regards 

3 answers

1 accepted

0 votes
Answer accepted
Frédéric Battesti June 2, 2020

I foward you the support reply : 

 

for get a API call to list all the project that uses a specific issue type. You can do the same by accessing the below link:

/rest/api/2/issue/createmeta?issuetypeNames=mention the issue type here

 

it works

 

regards

oneagain
Contributor
October 20, 2021

Hello @Frédéric Battesti 

I was looking for the same question, so i tried your trick.

It works but not the way I wanted : it does not only list the projects using only this issue type (what I thought) but it lists all projects AND also the project using it

The only difference is for the project having it, the line issuetypes is like this 

"issuetypes":[{"self":"https://etc-etc...

while for the others the bracket is closed

"issuetypes":[]}...

There is no other way ?

0 votes
christophe_sauvage
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!
January 16, 2023

Hello,

I develop a Jira app that brings a new issue type.

My app has a configuration page accessible only by administrators which lists the Jira projects already configured to use my issue type. 

With Jira 8 REST API, it was possible to use the method GET /rest/api/2/issue/createmeta?issuetypeNames (as mentioned by @Frédéric Battesti ).

But this method has been removed of the API since Jira 9 : https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html

As shown in the previous link, it is now possible to use GET /rest/issue/createmeta/{projectIdOrKey}/issuetypes , but it is not a performant solution because we have to send one request for each project.

So I tried to use the method GET /rest/issuetypescheme?expand=schemes.issueTypes. It works but it is not faster because Jira takes a long time to respond to this single request (about 1 minute for 500 projects).

 

So my question is : with REST API of Jira 9, what is the more performant solution to get the list of projects using a specific issue type ?

 

Thanks !

0 votes
Jack Brickey
Community Champion
May 28, 2020

If you are an admin you can go into settings > issues> Issuetype and determine the Issuetype schemes which may give the full view but best to then cross reference with the Issuetype schemes which provide project usage of the aforementioned schemes.

Frédéric Battesti May 28, 2020

Thank you for your quick reply

I need to use the rest API to make a file that gives me this list.

A issue type  exists. It's in projects.
I have to make a file which gives me the list of projects.
Only the rest API could meet this need.

 

regards

Jack Brickey
Community Champion
May 28, 2020

Sorry I missed the api bit in the title.

Suggest an answer

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

Atlassian Community Events