REST API - createCase

The table summarizes the REST API - createCase.

Request

Format
POST <baseurl>globaldata/model/<caseType>/<version>/create
Path Parameters
  • caseType. The case type is the fully qualified name of the case class. For example, com.example.gddemo.Customer. You can obtain this by running getCaseClassInfo.
  • version. The version number of the case model. For example, 2 or 2.0.0.
Body casePayload element (required). Contains the representation of the case data to be created as XML in the CasePayloadArrayType element (from the BusinessDataServices schema). You can have as many casePayload elements as you want.

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

Response

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

Example

Request
POST <baseurl>/globaldata/model/com.example.hastings.Order/1/create
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>665422</orderNum>
<acctNum>987780-00</acctNum>
<orderDate>2015-02-04Z</orderDate>
<lineItems xsi:type="hastings:LineItem">
<partNum>CAM8896</partNum>
<quantity>1</quantity>
<price>999.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-24-0</caseReference>