I want to use JIRA Cloud REST API put fixversion to many issues.
I read JIRA Cloud REST API doc and used code litke this
curl -X PUT --data "{ \"update\": { \"fixVersion\": [ { \"add\": \"0.0.3\" } ] } }" https://$USERNAEM:$PASSWORD@$net/rest/api/2/issue/$issueid % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 54 0 0 100 54 0 52 0:00:01 0:00:01 --:--:-- 53
but nothing happened

I get info form /{issueIdOrKey}/editmeta
"fixVersions": {
"required": false,
"schema": {
"type": "array",
"items": "version",
"system": "fixVersions"
},
"name": "Fix Version\/s",
"key": "fixVersions",
"operations": [
"set",
"add",
"remove"
],
"allowedValues": [
{
"self": "https:\/\/eastek-ezcam.atlassian.net\/rest\/api\/2\/version\/18300",
"id": "18300",
"name": "0.0.0",
"archived": false,
"released": false,
"projectId": 11000
},
{
"self": "https:\/\/eastek-ezcam.atlassian.net\/rest\/api\/2\/version\/18301",
"id": "18301",
"name": "0.0.1",
"archived": false,
"released": false,
"projectId": 11000
}
]
}, Is '"required": false' the reason I failed ?
How do I let "required": true ?
-------------------------------Update(8/28)------------------------------
I added '-H "Content-Type: application/json"'
#!/bin/sh
curl -u $USERNAEM:$PASSWORD -X PUT -H "Content-Type: application/json" --data '{"update": {"fixVersions": [{"add": [{ "name": "0.0.2"}]}]}}' $URL
and got error message
{"errorMessages":[],"errors":{"fixVersions":"Could not find valid 'id' or 'name' in version object."}}