Update

This content applies to legacy components (such as K2 Studio and K2 for Visual Studio), legacy assemblies, legacy services or legacy functionality. If you have upgraded from K2 blackpearl 4.7 to K2 Five, these items may still be available in your environment. These legacy items may not be available in new installations of K2 Five. These legacy items may also not be available, supported, or behave as described, in future updates or versions of K2. Please see the legacy component support policy for more information about support for these components.

Executes the Update type method on the SmartObject with the data posted for the SmartObjectKey specified.

The Update method requires both a Request Body, as well as the SmartObject Record Key value passed as a query parameter in the URL.  The SmartObject Key will indicate the record to update, and the Request Body will contain the new data for the properties that should be changed.  It is not necessary to specify all the fields in the request body XML, only the ones that should be changed. 

  Value Notes
URI {Service Root URI}{Service Path}?{SmartObjectKey}

Example:
http://k2.denallix.com:8888/SmartObjectServices/REST/K2%20Examples/Employee/Save?Id=1

See URIs for REST Services

The SmartObject Key can contain multiple properties separated by ampersand (&), for example Id1=100&Id2=2001 if you wish to update multiple records at once.

Method PUT This method cannot be called via URI construction in the address bar of standard browsers.  Tooling such as Fiddler or .NET code may be required to execute the PUT.
Request Headers Content-type: application/xml Ensure that the request has the correct Content-type set
Request Body XML string representing the SmartObject record to create

Example Body data for a a hypothetical Employee SmartObject, to change the Last Name property to "Jones":
<Employee>
    <Last_Name>Jones</Last_Name>
</Employee>


The request body contains the SmartObject records Properties to update, represented as XML. 
The root for the XML is the system name of the SmartObject and the elements are the system names of the properties you want in the new item. 
The SmartObject XML returned from SmartObject GET methods (Load and List) can be used as a starting point to build up the XML input of this POST method.

Return Type Errors and Response Codes Due to the asynchronous nature of the PUT, a successful call may not return anything depending on the tooling used to execute the PUT.