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.gddemo.Customer. You can obtain this by running getCaseClassInfo.
  • version: The version of the case model. For example, 2 or 2.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.gddemo.Customer/2/findbyid
Body
{

"xml-fragment":

{

"casePayload": "

<gddemo:CustomerElement xmlns:gddemo=\"http://example.com/gddemo\"

xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">

<customerID>Cust203</customerID>

</gddemo:CustomerElement>

"

}

}
Response
{

"caseReference": "BDS-2-com.example.gddemo.Customer-35-0"

}