Retrieve Related Records by Parent Record ID and ID Extension

The various details of how to retrieve related records by parent record ID and ID extension are explained in this section.

HTTP Method
Endpoint URL See Endpoint
Resource GET/records/{repositoryName}/{id}/relatedrecords/{relationshipName}
Request Parameters Specify the following parameters:
Name Description Type Data Type
Required
repositoryName Name of the repository. The repository name is not case sensitive. path string
relationshipName Name of the relationship. The relationship name is case sensitive. path string
id Unique ID of the record. path string
Optional
idExt Unique ID and extension of the record. query string
sortBy Column name on which you want to sort the data. The sortBy works with the ascending field. query string
ascending Set to true if you want to sort by the ascending order. The ascending field works with the sortBy field. query boolean
perspectiveName Name of the perspective. query string
recordState The state of a record that is being searched. You can specify the following values:
  • CONFIRMED: includes the confirmed records. This is the default value.
  • UNCONFIRMED: includes the unconfirmed records.
  • LATEST: includes the confirmed or unconfirmed records.
query string
includeSystemAttributes Set to true if you want to include system attributes. The default value is false. query boolean
Media Type application/json
Response Model
{
  "relationshipRecords": [
    {
      "relationshipAttributes": [
        {
          "name": "string",
          "value": "string",
          "displayName": "string",
          "multivalues": [
            {}
          ],
          "multivalue": false,
          "id": 0,
          "groupName": "string"
        }
      ],
      "targetRecord": {
        "productId": "string",
        "productIdExt": "string",
        "productKeyId": "string",
        "version": "string",
        "state": "string",
        "effectiveDate": "string",
        "attributes": [
          {
            "name": "string",
            "value": "string",
            "displayName": "string",
            "multivalues": [
              {}
            ],
            "multivalue": false,
            "id": 0,
            "groupName": "string"
          }
        ],
        "repositoryName": "string",
        "relationships": {},
        "deleted": false
      }
    }
  ],
  "totalCount": 0
}
Request Example Retrieving records with relationship by record ID and extensions where record ID is REC1 and extension is REC1 in the repository named "Company".
Endpoint:http://localhost:8080
Resource:/eml/rest/records/Company/REC1/relatedrecords/companycustomer
Response Example The response returns all the records matching the criteria.
{
   "relationshipRecords": [   {
      "relationshipAttributes":       [
                  {
            "name": "RCustomerType",
            "value": "IT",
            "displayName": null,
            "multivalues": null,
            "groupName": null,
            "type": 4,
            "id": 0,
            "associationName": null,
            "auxiliaryContent": null,
            "matchingAttribute": false,
            "multivalue": false
         },
                  {
            "name": "RCompanyType",
            "value": "IT PVT",
            "displayName": null,
            "multivalues": null,
            "groupName": null,
            "type": 4,
            "id": 0,
            "associationName": null,
            "auxiliaryContent": null,
            "matchingAttribute": false,
            "multivalue": false
         }
      ],
      "targetRecord":       {
         "productId": "REC2",
         "productIdExt": "REC2",
         "productKeyId": "12800",
         "version": "1",
         "state": "CONFIRMED",
         "isDeleted": false,
         "key": 12800,
         "effectiveDate": null,
         "attributes":          [
                        {
               "name": "PRODUCTID",
               "value": "REC2",
               "displayName": "Record ID",
               "multivalues": null,
               "groupName": "Unassigned",
               "type": 4,
               "id": 0,
               "associationName": null,
               "auxiliaryContent": null,
               "matchingAttribute": false,
               "multivalue": false
            },
                        {
               "name": "PRODUCTIDEXT",
               "value": "REC2",
               "displayName": "Record ID Extension",
               "multivalues": null,
               "groupName": "Unassigned",
               "type": 4,
               "id": 0,
               "associationName": null,
               "auxiliaryContent": null,
               "matchingAttribute": false,
               "multivalue": false
            },
                        {
               "name": "CONTAINS",
               "value": "",
               "displayName": "Related Records",
               "multivalues": null,
               "groupName": "Unassigned",
               "type": 4,
               "id": 0,
               "associationName": null,
               "auxiliaryContent": null,
               "matchingAttribute": false,
               "multivalue": false
            },
                        {
               "name": "CustName",
               "value": "daniel reichard",
               "displayName": "CustName",
               "multivalues": null,
               "groupName": "Unassigned",
               "type": 4,
               "id": 0,
               "associationName": null,
               "auxiliaryContent": null,
               "matchingAttribute": false,
               "multivalue": false
            },
                        {
               "name": "CustAddress",
               "value": "UK",
               "displayName": "CustAddress",
               "multivalues": null,
               "groupName": "Unassigned",
               "type": 4,
               "id": 0,
               "associationName": null,
               "auxiliaryContent": null,
               "matchingAttribute": false,
               "multivalue": false
            },
                        {
               "name": "DOB",
               "value": "03/10/1986",
               "displayName": "DOB",
               "multivalues": null,
               "groupName": "Unassigned",
               "type": 1,
               "id": 0,
               "associationName": null,
               "auxiliaryContent": null,
               "matchingAttribute": false,
               "multivalue": false
            },
                        {
               "name": "Salary",
               "value": "45000",
               "displayName": "Salary",
               "multivalues": null,
               "groupName": "Unassigned",
               "type": 2,
               "id": 0,
               "associationName": null,
               "auxiliaryContent": null,
               "matchingAttribute": false,
               "multivalue": false
            },
                        {
               "name": "Gender",
               "value": "M",
               "displayName": "Gender",
               "multivalues": null,
               "groupName": "Unassigned",
               "type": 4,
               "id": 0,
               "associationName": null,
               "auxiliaryContent": null,
               "matchingAttribute": false,
               "multivalue": false
            },
                        {
               "name": "CustRating",
               "value": "7",
               "displayName": "CustRating",
               "multivalues": null,
               "groupName": "Unassigned",
               "type": 10,
               "id": 0,
               "associationName": null,
               "auxiliaryContent": null,
               "matchingAttribute": false,
               "multivalue": false
            }
         ],
         "externalAttributes": [],
         "repositoryName": "CUSTOMER",
         "classificationSchemeDetails": null,
         "relationships": {},
         "deleted": false
      }
   }],
   "totalCount": 1
}
Success Response Example:

Code: 200 successful operation

Error Response If the response is unsuccessful, either of the following error code is displayed:

Example:

Code: 400 Parameters required are missing

OR

Code: 404 Record not found

OR

Code: 500 Invalid Request

For error code response, see Error Handling .