Forums

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

Want to fetch issue id based on label

akshay_solanki
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!
April 20, 2022

Hey Team 

 

we have multiple issues. in all the issue have different kind of label 
like stage-FE, stage-BE, prod-FE, prod-BE and all labels are associate in single board and in single project 

 

so i am looking for rest api from where i can get all issue id which have specific labels 

earlier response is very helpfull 

Thanks 

1 answer

0 votes
Oliver Siebenmarck _Polymetis Apps_
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 20, 2022

Hi @akshay_solanki ,

Welcome to the community!

So, if I get this right, you want a list of issue keys (DEV-1 etc.) of all the issues that have a specific label. I'm gonna recommend using Jira Expressions to get there.

The way to do this is to send a request to the expressions endpoint that includes a JQL query to select the issues you want. This could look like this:

labels in (stage-FE, stage-BE, prod-FE, prod-BE)

As you only want the issue keys, you also add a simple Jira Expression like this:

issues.map(i => i.key)

And that's it. The endpoint should return a list like this:

[
"DEV-200",
"PRJ-560",
"MAU-559"
]

If you only need to do this every now and then or want to play around with Expressions a bit more, I can also recommend our free Expression Tester app, which lets you run any expression quickly from your browser. 

Hope that helps,
 Oliver

Suggest an answer

Log in or Sign up to answer