REST API - findByID

The table summarizes the REST API - findByID.

Request

Format
POST <baseurl>/globaldata/model/<caseType>/<version>/findbyid
Path parameters
  • caseType: The case type is the fully qualified name of the case class. For example, com.example.hastings.Order. You can obtain this by running getCaseClassInfo.
  • version: The version of the case model. For example, 1 or 1.0.0.
Body casePayload: Contains the parameters in the caseDataType element (from the BusinessDataServices schema).

This contains the case identifier of the case data whose case reference you want to find. 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 CaseReferenceType element.
XML Returns the contents of a CaseReferenceType element (from the BusinessDataServices schema).

Example

Request
POST <baseurl>/globaldata/model/com.example.hastings.Order/1/findbyid
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>776564</orderNum>
</hastings:OrderElement>
]]>
</casePayload>
</xml-fragment>
Response
<?xml version="1.0" encoding="UTF-8"?>
    <caseReference>BDS-1-com.example.hastings.Order-1-0</caseReference>