I'm trying to search for the issues that we get out of a JQL query using CURL. I'm substituting the field name with a variable I fetch in the previous steps.
Variable is a migrated custom field eg."Field Name (migrated)"
curl --request POST --url 'https://<baseURL>.atlassian.net/rest/api/3/search' \
--header "Content-Type: application/json" \
--header 'Accept: application/json' \
--header "Authorization: Basic ${token}" \
--data "{\"jql\": \"\"${VAR}\" IS NOT EMPTY\"}"
Error :
{"errorMessages":["There was an error parsing JSON. Check that your request body is valid."]}
When I try this with single quoted for the data it works, but I need to use double quotes so that the Variable can be expanded, does anyone know if the API request needs any updating