REST API - read
REST API - read calls a single case data object.
Request
| Format | GET <baseurl>/globaldata/ref/<caseReference>/read |
| Path parameters | caseReference: The reference to the case object. You can obtain this by using findAllCases. |
| Query parameters | casemetadata=boolean (optional, default=false). Indicates whether to return case metadata.
|
Response
| JSON | Note - ActiveMatrix BPM does not support case data being returned in JSON format for this operation. If an Accept header of
application/json is specified, case data is not returned in the response. Therefore, for this operation, you should specify the response be in XML format (application/xml).
|
| XML | Returns the contents of a CaseDataTypeelement (from the BusinessDataServicesschema). |
Example
| Request | GET <baseurl>/globaldata/ref/BDS-1-com.example.hastings.Order-3-0/read |
| Response | <?xml version="1.0" encoding="UTF-8"?>
<xml-fragment>
<caseReference>BDS-1-com.example.hastings.Order-3-0</caseReference>
<casePayload>
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<hastings:OrderElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hastings="http://example.com/hastings" xsi:type="hastings:Order">
<orderNum>76576533</orderNum>
<acctNum>876-900</acctNum>
<orderDate>2016-06-27</orderDate>
<lineItems xsi:type="hastings:LineItem">
<partNum>625528</partNum>
<quantity>50</quantity>
<price>24.99</price>
<vendor xsi:type="hastings:Vendor">
<name>Morgan Interprises</name>
<address xsi:type="hastings:Address">
<street>1200 24th Ave.</street>
<city>Spokane</city>
<state>WA</state>
<zip>98760</zip>
</address>
</vendor>
</lineItems>
</hastings:OrderElement>
]]>
</casePayload>
</xml-fragment>
|