Welcome to the Jazz Community Forum
OSLC/REST API: How to change the state AND resolution of a work item?

However this doesn't work for the action "Resolve" because it needs an extra field describing the Resolution (like "Invalid", "Fixed" etc.). I found that the list of possible resolutions is under the URL ...oslc/workflows/[Project Area UUID]/resolutions/com.ibm.team.workitem.defectWorkflow/. But how can I pass the resolution code to RTC, in addition to the "Resolve" action?
Additional information: If I try to change the state by the "Resolve" action, it fails with the message
{"oslc:message":"'Save Work Item' failed. Preconditions have not been met: The 'Root Cause Description' attribute needs to be set (work item 114391).","oslc:statusCode":403,"prefixes":{"oslc":"http://open-services.net/ns/core#"}}
Accepted answer

http://open-services.net/bin/view/Main/CmRestApiV1
describes how to save.
Assuming the root cause description is called rootCauseDescription, the call would look something like this:
PUT {CR URI}?_action=bugzillaWorkflow.action.resolve&oslc_cm.properties=rootCauseDescription,internalResolution
Content:
<oslc_cm:ChangeRequest>
<rootCauseDescription>Something broke.</rootCauseDescription>
<internalResolution>5</internalResolution>
</oslc_cm:ChangeRequest>
You will need to play around with this for the right content.
Comments

Thanks for your answer! I tinkered with it a bit and I could get it to work like this (written done for other people having this problem):
Calling the attribute "internalResolution" did NOT work for me, it has to be called "rtc_cm:resolution".
Send "text/json" (not "application/json", for some reason) as Content-Type and Accept header.
Send the following content:
{
"rtc_cm:resolution": "com.ibm.team.workitem.defectWorkflow.resolution.r9"
}
where "com.ibm.team.workitem.defectWorkflow.resolution.r9" is just an example of a possible resolution.
The root cause description turned out to be just one of many attributes that had to be set on resolving, which can be configured, I think.