getRecord

Purpose

Reviewers: I added this method in response to CQ issue: PSC00299657

Retrieves all field data (including formulas) for a given record in XML format.

The composite output is generated recursively in a tree-type structure. The following rules apply:

  • The maximum level of recursion is provided as a URL parameter.
  • Each data record is included in the output only once.
  • No more than 1000 total data records are included in the output.
  • The objNames input parameter can be used to explicitly set the list of output data objects.

For objects in dedicated tables, you must specify the objNames parameter.

HTTP Method

GET

URL

https://app.infiniteblue.com/rest/api/getRecord

URL Parameters

objNames

Optional parameter specifying the object integration names.

sessionId

The session ID obtained from the body of the response when calling login.

id

The record ID.

composite

Optional parameter specifying the number of levels for related records to be included recursively in the output. Defaults to 0.

objNames

Optional parameter specifying a comma-separated list of object names. If present, only objects from this list are included in the output.

fieldList

Optional parameter specifying a comma-separated list of field names. If present, only fields from this list are included in the output.

output

Optional parameter specifying the output format, one of: xml (default) or json.

Note:
  • The format of date or date/time fields is governed by the shared property UseISODateFormatInRESTJSON and can be configured from System Console > System > Shared Properties > General > API. For more information, see Shared Properties.
  • The shared property mentioned above is applicable only if the output is in JSON format.

Permissions Required

View permission for the requested object type.

Response

All of the field data for the specified object record and related records.

Example

Output example for core record:

<?xml version="1.0" encoding="utf-8" ?>
<resp status="ok">
<data id="131227" objName="person">
<Field name="id">131227</Field>
<Field name="club_member">false</Field>
<Field name="lastName">Smith</Field>
<Field name="status">Created</Field>
<Field name="updatedAt">20110111T143331Z</Field>
</data>
</resp>

Output example for core and related record (composite parameter set to 1):

<?xml version="1.0" encoding="utf-8" ?>
<resp status="ok">
<data id="131227" objName="person">
<Field name="id">131227</Field>
<Field name="club_member">false</Field>
<Field name="lastName">Smith</Field>
<Field name="status">Created</Field>
<Field name="updatedAt">20110111T143331Z</Field>
<Field name="R986">131228,131229</Field>
<composite>
<data id="131228" objName="payment">
<Field name="amount">500.00</Field>
<Field name="paym_date">20110115T143331Z</Field>
<Field name="R986">131227</Field>
</data>
<data id="131229" objName="payment">
<Field name="amount">450.00</Field>
<Field name="paym_date">20110116T143331Z</Field>
<Field name="R986">131227</Field>
</data>
</composite>
</data>
</resp>