Update
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 |
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. |
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. |