REST API-Patch or Put Method- Cannot change the resource on an Assignment record

Document ID : KB000045848
Last Modified Date : 14/02/2018
Show Technical Document Details


Customer is using REST APIs to update assignments in Clarity.  However when he tries to use the Put or Patch methods to update the resource assigned to an assignment record, he gets the following error:

Error:  400

"errorMessage": "Cannot update resource/role for an assignment.", 
"errorCode": "projmgr.CANNOT_UPDATE_RESOURCE" 


Error 400 means "bad request".  In this case the error message is correct and this is a bad request.  If you log into the Clarity UI and try to change the Resource who is assigned to a task, the UI will not allow you to do that.  You must delete the current assignment record and create a new one.  Consequently the REST API, XOG and WSDL will all prevent you from doing this since it cannot be done in the UI.


Delete the old assignment record and insert a new one using the REST APIs.