I have created and saved a filter and got the filter ID. The JQL query I used as below.
"Time to first response" <= remaining(30m) AND "Time to first response" != breached() AND issuetype = Incident AND project =xxxx
Is it possible to get the saved filter details as a JSON format using CURL and API token?
I tried with below query. But, it's not working.
curl --request GET --url https://site-url/issues/?filter=44229 --user 'API token' --header 'Accept: application/json'
Hi,
You can use Search REST API to do the trick
Note that REST API calls for JQL is paginated and does not return all issues with al single call.
This will work on Jira Server:
curl -X GET -u "user:password" -H "Content-type: application/json" -H "Accept: application/json" http://localhost:8080/rest/api/2/search?maxResults=1000&expand=all&jql='filter=44229' -k -vvv
See:
The maximum number of issues to return (defaults to 50). The maximum allowable value is dictated by the JIRA property 'jira.search.views.default.max'. If you specify a value that is higher than this number, your search results will be truncated.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That would be really great!
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jack,
Sorry for the late reply. I have tried the curl command and it's producing the JSON data. But the problem is, I have mentioned the specific project name and organization in that filter. But, when I checking the JSON data, it's also included other project data too. Do you have any idea why this is happening?
Please note that when I run this filter from JIRA UI, I'm getting the correct answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.