Forums

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

Solved: JIRA REST API - how do I get columns from a filter

Zakaria October 22, 2018

Hello ! 

so i am trying to get all the columns inside a filter using GET method but i dont know why its  not working :

for example i  want to get all the jira requests that are finished the filter id is : -5  so i am using :

"myhostnameUrl"/jira/rest/api/3/filter/-5/columns

my view URL is something like : http://"myhostnameUrl"/browse/DSUP?filter=-5  

what am i doing wrong ?

Thanks !

2 answers

2 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
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.
October 22, 2018

Filters do not have negative numbers for their ids, so -5 looks wrong to me.  I'd take a closer look at your url, and get the actual filter id (it's most likely to be a 5 digit positive number)

Zakaria October 23, 2018

thanks for you answer

this is the link i have on my browser :

https://MyhostName/jira/issues/?filter=-5

and my request is something like this :

https://jira-int/jira/rest/api/3/issue/filter/-5

 

the -5 filter is the a default filter to give you all the open requests i dont know what is the problem i am sure there is something i dont understand

Zakaria October 23, 2018

i created another filter tried this https://jira-int/jira/rest/api/2/filter/121530/ and its working like magic now but  https://jira-int/jira/rest/api/2/filter/121530/columns

is not working do you have any idea ? should i put the exact column i want or how ?

0 votes
Answer accepted
Zakaria October 23, 2018

done fixed it for any one out there looking for an answer

the right command is :

https://"yourhostname"/jira/rest/api/2/filter/"the id of your filter "/

to get columns you must set your filter to listview  and then :

https://"yourhostname"/jira/rest/api/2/filter/"the id of your filter "/columns

hope it helped someone out there

Suggest an answer

Log in or Sign up to answer