Examples of updating an issue using fields.
Example of assigning an issue to user “harry”
This simple edit
Request
curl -D- -u fred:fred -X PUT --data {see below} -H "Content-Type: application/json" http://kelpie9:8081/rest/api/2/issue/QA-31
example input data
{ "fields": { "assignee":{"name":"harry"} } }
Response
You should just receive a response with a status of “204 No Content”
Example of updating many fields at the same time
Here we update the assignee and also the summary, priority, and two custom fields.
Request
curl -D- -u fred:fred -X PUT --data {see below} -H "Content-Type: application/json" http://kelpie9:8081/rest/api/2/issue/QA-31
example input data
{ "fields": { "summary":"CLONE - Testing label stuff", "assignee":{"name":"harry"}, "priority":{"id":"2"}, "customfield_10010":["asdf","centre","champs","charge","confluence"], "customfield_10071":["purple pants"] } }
Response
You should just receive a response with a status of “204 No Content”
Examples of updating a field using operations.
The issues of a field may also be updated in more flexible ways using the SET, ADD and REMOVE operations. Not all fields support all operations, but as a general rule single value fields support SET, whereas multi-value fields support SET, ADD and REMOVE, where SET replaces the field contents while ADD and REMOVE add or remove one or more values from the the current list of values.