REST API - update

The table summarizes the REST API - update.

Request

Request
PUT <baseurl>/globaldata/ref/<caseReference>/update
Path parameters caseReference: The reference to the version of the case object that was returned by the readCase method. It is important that the case reference returned by the readCase method is used so that the optimistic locking works correctly.
Body casePayload (required). Contains the parameters in the CasePayloadType element (from the BusinessDataServices schema).

This contains the case objects to be updated. Your request must be constructed to match the structure of the case data defined in your business object model. There can be multiple case data in the request. See Obtaining Information From TIBCO Business Studio.

Response

JSON Returns a JSON representation of the contents of a CaseReferenceType element.
XML Returns the contents of a CaseReferenceType element (from the BusinessDataServices schema).

Example

Request
PUT <baseurl>/globaldata/ref/BDS-1-com.example.hastings.Order-32-0/update
Body
<xml-fragment>
<casePayload>
<![CDATA[
<hastings:OrderElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hastings="http://example.com/hastings" xsi:type="hastings:Order">
<orderNum>58876</orderNum>
<acctNum>16665-009</acctNum>
<orderDate>2015-02-04Z</orderDate>
<lineItems xsi:type="hastings:LineItem">
<partNum>CAM7765</partNum>
<quantity>1</quantity>
<price>699.0</price>
<vendor xsi:type="hastings:Vendor">
<name>Carrie's Cams</name>
<address xsi:type="hastings:Address">
<street>87765 Main St.</street>
<city>Spokane</city>
<state>WA</state>
<zip>99776</zip>
</address>
<contactNames>Carrie Miller</contactNames>
</vendor>
</lineItems>
</hastings:OrderElement>
]]>
</casePayload>
</xml-fragment>
Response
<?xml version="1.0" encoding="UTF-8"?>
    <caseReference>BDS-1-com.example.hastings.Order-32-1</caseReference>