We're trying to get the API for creating an issue working. It didn't have any issues previously, but the same error is popping up in two different processes and we're not sure where the parsing problem is coming from.
This is the curl call we're using (slightly censored)
curl --silent -D- -u "${USERNAME}" -X POST -d @- -H "Content-Type: application/json" -H 'Accept: application/json' https://INSERT_COMPANY_HERE.atlassian.net/rest/api/3/issue < /dev/stdinWe're using the dev/stdin because we want to use this across multiple projects and it's simpler to build a payload in another file than keep track of all the variables needed and insert them here. This is the payload that brought this issue to our attention, claiming that it can't parse the json
{
"fields": {
"project":
{
"key": "DS"
},
"summary": "FILLER TEXT ${file}",
"issuetype": {
"name": "FILLER TEXT"
},
"description": {
"content": [
{
"content": [
{
"text": "${file} in ${FILEPATH} FILLER TEXT ${validate}. Please investigate further.",
"type": "text"
}
],
"type": "paragraph"
}
],
"type": "doc",
"version": 1
},
"customfield_10202" : "9566",
}
} None of the variables here can be removed, since we need them for troubleshooting purposes when the issue is created. Adding single quotes around the payload make the variables literal, which is obviously an issue.