Good Day,
I am attempting to run a curl command to return the contents of a filter. This is currently working with another Jira filter, with the syntax below.
curl -D- -u jenkins:* -X POST -d "{\"jql\": \"project=mmb AND status!='Deployed to Production' AND status!='Approved for Production' AND status != Complete AND status != Cancelled AND 'Deployment Information' is not EMPTY AND 'MMB-Environment(s)' = TST1\",\"fields\":[\"key\"]}" -H "Content-Type: application/json" http://jira.*.com:8080/rest/api/2/search
What I would like to do is modify this curl request to send a different filter, but i'm sure i'm missing something with my syntax. I've been playing around with it getting various different errors. The documenation is only helping so much. Here is what I am attempting
curl -D- -u jenkins:* -X POST -d "{\"jql\": \""Remedy CRQ " = "791083"",\"fields\":[\"key\"]}" -H "Content-Type: application/json" http://jira.*.com:8080/rest/api/2/search
This field called Remedy CRQ is a number field. How do i properly format this curl request to get a response? Any advice or assistance is appreciated! Thank you
I notice that you have a space after CRQ before the closing " in your JQL
I'm also not sure about your embedded double quotes in the string. Maybe try changing those to single quotes, i.e.
curl -D- -u jenkins:* -X POST -d "{\"jql\": \"'Remedy CRQ' = '791083'\",\"fields\":[\"key\"]}" -H "Content-Type: application/json" http://jira.*.com:8080/rest/api/2/search
Thank you Payne, It was the single quotes that did it. (I needed that space after CRQ, maybe that field was setup with a space on accident)
Appreciate the quick response!
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.