Accelerate the Value of Data

Get Parents

This operation gets the parents of the current node.

Request
GET /api/{tenantId}/entities/{entityId}/_parents
Request Example
GET /api/{tenantId}/entities/{entityId}/_parents?
select=label,secondaryLabel,name,type&graphTypeURIs=configuration/graphTypes/CompanyHierarchy
Table 1. Header Parameters
Parameter Required Description
authorization Yes Bearer<access_token>
Table 2. Query Parameters
Parameter Required Description
select No This is a comma-separated list of properties from the entity structure that should be returned in a response. It allows you to return more data than the default request.

Example: Return only object URI and its label: select=entities.attributes.Gender
graphTypeURIs Yes Comma-separated list of graph types URIs for graphs to be traversed.
options No
  • sendHidden- disabled by default, entity's JSON will contain hidden attributes if this option is enabled.
  • ovOnly- return only attribute values that have ov=true flag.
  • nonOvOnly- return only attribute values that have ov=false flag. If you have a nested or reference attribute value whereov=true, but sub-attributes where ov=false, then these subattributes will not appear in the response.

Response

parentPaths - this item is an array of arrays, each entire array is a path from the node to its parents, each element of an array contains the following items:

  • entityUri - URI of an entity in the path
  • relationsUris - URIs of relations from current entity to its children
  • hasSelfRelation - boolean flag saying if entity has at least one self relation
  • entities - this is a dictionary of all entities used in paths
  • relations - this is a dictionary of all relations used in paths
  • Response Example
     {
      "parentPaths": [
        [
          {
            "entityUri": "entities/e41"
          },
          {
            "entityUri": "entities/e33",
            "relationsUris": [
              "relations/r_33_41"
            ]
          },
          {
            "entityUri": "entities/e23",
            "relationsUris": [
              "relations/r_23_33",
              "relations/r_23_23"
            ],
            "hasSelfRelation": true
          },
          {
            "entityUri": "entities/e13",
            "relationsUris": [
              "relations/r_13_23"
            ]
          }
        ],
        [
          {
            "entityUri": "entities/e41"
          },
          {
            "entityUri": "entities/e33",
            "relationsUris": [
              "relations/r_33_41"
            ]
          },
          {
            "entityUri": "entities/e23",
            "relationsUris": [
              "relations/r_23_33",
              "relations/r_23_23"
            ],
            "hasSelfRelation": true
          },
          {
            "entityUri": "entities/e12",
            "relationsUris": [
              "relations/r_12_23"
            ]
          },
          {
            "entityUri": "entities/e02",
            "relationsUris": [
              "relations/r_02_12"
            ]
          }
        ],
        [
          {
            "entityUri": "entities/e41"
          },
          {
            "entityUri": "entities/e33",
            "relationsUris": [
              "relations/r_33_41"
            ]
          },
          {
            "entityUri": "entities/e22",
            "relationsUris": [
              "relations/r_22_33"
            ]
          },
          {
            "entityUri": "entities/e11",
            "relationsUris": [
              "relations/r_11_22"
            ]
          },
          {
            "entityUri": "entities/e01",
            "relationsUris": [
              "relations/r_01_11"
            ]
          }
        ],
        [
          {
            "entityUri": "entities/e41"
          },
          {
            "entityUri": "entities/e33",
            "relationsUris": [
              "relations/r_33_41"
            ]
          },
          {
            "entityUri": "entities/e23",
            "relationsUris": [
              "relations/r_23_33",
              "relations/r_23_23"
            ],
            "hasSelfRelation": true
          },
          {
            "entityUri": "entities/e12",
            "relationsUris": [
              "relations/r_12_23"
            ]
          },
          {
            "entityUri": "entities/e01",
            "relationsUris": [
              "relations/r_01_12"
            ]
          },
          {
            "entityUri": "entities/e22",
            "relationsUris": [
              "relations/r_22_01"
            ]
          },
          {
            "entityUri": "entities/e11",
            "relationsUris": [
              "relations/r_11_22"
            ]
          }
        ]
      ],
      "entities": {
        "entities/e13": {
          "uri": "entities/e13",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e02": {
          "uri": "entities/e02",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e23": {
          "uri": "entities/e23",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e12": {
          "uri": "entities/e12",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e01": {
          "uri": "entities/e01",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e33": {
          "uri": "entities/e33",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e22": {
          "uri": "entities/e22",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e11": {
          "uri": "entities/e11",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e41": {
          "uri": "entities/e41",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        }
      },
      "relations": {
        "relations/r_12_23": {
          "uri": "relations/r_12_23",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_33_41": {
          "uri": "relations/r_33_41",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_23_33": {
          "uri": "relations/r_23_33",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_01_12": {
          "uri": "relations/r_01_12",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_22_33": {
          "uri": "relations/r_22_33",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_02_12": {
          "uri": "relations/r_02_12",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_01_11": {
          "uri": "relations/r_01_11",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_13_23": {
          "uri": "relations/r_13_23",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_11_22": {
          "uri": "relations/r_11_22",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_22_01": {
          "uri": "relations/r_22_01",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        }
      }
    }
    
    
    ##API
    
    A new endpoint
    
    
    A new endpoint
    /entities/{id}/_parents
    has been added. This endpoint has same input parameters as
    /entities/{id}/_tree endpoint
    . As a result it returns structure which contains following elements:
    "parentPaths" - this item is an array of arrays, each entire array is a path from the node to its parents, each element of an array contains the following items:
    "entityUri" - uri of an entity in the path
    "relationsUris" - uris of relations from current entity to its children
    "hasSelfRelation" - boolean flag saying if entity has at least one self relation
    "entities" - this is a dictionary of all entities used in paths
    "relations" - this is a dictionary of all relations used in paths
    Example of the response:
    {
      "parentPaths": [
        [
          {
            "entityUri": "entities/e41"
          },
          {
            "entityUri": "entities/e33",
            "relationsUris": [
              "relations/r_33_41"
            ]
          },
          {
            "entityUri": "entities/e23",
            "relationsUris": [
              "relations/r_23_33",
              "relations/r_23_23"
            ],
            "hasSelfRelation": true
          },
          {
            "entityUri": "entities/e13",
            "relationsUris": [
              "relations/r_13_23"
            ]
          }
        ],
        [
          {
            "entityUri": "entities/e41"
          },
          {
            "entityUri": "entities/e33",
            "relationsUris": [
              "relations/r_33_41"
            ]
          },
          {
            "entityUri": "entities/e23",
            "relationsUris": [
              "relations/r_23_33",
              "relations/r_23_23"
            ],
            "hasSelfRelation": true
          },
          {
            "entityUri": "entities/e12",
            "relationsUris": [
              "relations/r_12_23"
            ]
          },
          {
            "entityUri": "entities/e02",
            "relationsUris": [
              "relations/r_02_12"
            ]
          }
        ],
        [
          {
            "entityUri": "entities/e41"
          },
          {
            "entityUri": "entities/e33",
            "relationsUris": [
              "relations/r_33_41"
            ]
          },
          {
            "entityUri": "entities/e22",
            "relationsUris": [
              "relations/r_22_33"
            ]
          },
          {
            "entityUri": "entities/e11",
            "relationsUris": [
              "relations/r_11_22"
            ]
          },
          {
            "entityUri": "entities/e01",
            "relationsUris": [
              "relations/r_01_11"
            ]
          }
        ],
        [
          {
            "entityUri": "entities/e41"
          },
          {
            "entityUri": "entities/e33",
            "relationsUris": [
              "relations/r_33_41"
            ]
          },
          {
            "entityUri": "entities/e23",
            "relationsUris": [
              "relations/r_23_33",
              "relations/r_23_23"
            ],
            "hasSelfRelation": true
          },
          {
            "entityUri": "entities/e12",
            "relationsUris": [
              "relations/r_12_23"
            ]
          },
          {
            "entityUri": "entities/e01",
            "relationsUris": [
              "relations/r_01_12"
            ]
          },
          {
            "entityUri": "entities/e22",
            "relationsUris": [
              "relations/r_22_01"
            ]
          },
          {
            "entityUri": "entities/e11",
            "relationsUris": [
              "relations/r_11_22"
            ]
          }
        ]
      ],
      "entities": {
        "entities/e13": {
          "uri": "entities/e13",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e02": {
          "uri": "entities/e02",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e23": {
          "uri": "entities/e23",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e12": {
          "uri": "entities/e12",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e01": {
          "uri": "entities/e01",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e33": {
          "uri": "entities/e33",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e22": {
          "uri": "entities/e22",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e11": {
          "uri": "entities/e11",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        },
        "entities/e41": {
          "uri": "entities/e41",
          "type": "configuration/entityTypes/Individual",
          "label": "",
          "secondaryLabel": ""
        }
      },
      "relations": {
        "relations/r_12_23": {
          "uri": "relations/r_12_23",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_33_41": {
          "uri": "relations/r_33_41",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_23_33": {
          "uri": "relations/r_23_33",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_01_12": {
          "uri": "relations/r_01_12",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_22_33": {
          "uri": "relations/r_22_33",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_02_12": {
          "uri": "relations/r_02_12",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_01_11": {
          "uri": "relations/r_01_11",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_13_23": {
          "uri": "relations/r_13_23",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_11_22": {
          "uri": "relations/r_11_22",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        },
        "relations/r_22_01": {
          "uri": "relations/r_22_01",
          "type": "configuration/relationTypes/Family",
          "direction": "bidirectional"
        }
      }
    }