Unify and manage your data

Relation Types

The Relation Types API is responsible for defining types of relation types (that link entities) that are recognized in a tenant configuration. Examples of relation types are:

  • Parent
  • Sister
  • Subsidiary
  • Division
  • Affiliated
  • Contractor

Structure

A configuration might have a collection of relation types. Each relation type has the following properties:

Property Name Required Description Type
URI Yes Path that is used to reach this relationship type configuration. It has format:configuration/relationTypes/{TypeName} String, URI
id Yes-for response JSON Internal, system-generated id. Is used internally to get difference between two versions of configurations when configuration is updated. String
label Yes Readable name of the relationship type String
description Details, description for the relation type. String
extendsTypeURI URI of relation type is extended by this relation type type String, URI
sameAsTypeURIsCollection URI of relation type that have the same semantics as this type. In all graphs configuration these relation types will be used as synonyms and there will be no need to list all possible types in graph configuration. Example: "attorney" and "lawyer" relation types.
reverseOfTypeURIs Collection of URIs that define the semantic reverse relation type as this type.

Example: "parent" relation type-reverse is "child" relation type.

implicit

If TRUE, relationship is marked as an Implicit relationship

  • Implicit Relationships that do not appear for example in a Network graph because they are deemed to not be of significant business value in a graphical display. Implicit relationships are used only in Business Objects for reference attributes such as Address, where again its not considered important to render that relationship.

  • Explicit Relationships such as that between an Individual and an Employer are displayed in a graph.

Default is false- i.e. explicit.

Boolean
direction

Identifies directional semantics of relationship object of the type. Supported directions:

  • directed- Used when the two nodes that the relationship connects have different business meaning relative to each other. Example: When "parent" relationship type is used, it us understood that one node is a parent the other node is the child.

  • undirected- Used when connecting node A to node B, and there is no reverse relationship implied. Example: "professional" might be used to connect a cardiologist to a neurosurgeon). A reverse relationship is neither required nor implied.

  • bidirectional- both objects in the relationship are equal and active in a system. Start and end entity types should play the same role. Example: "friendship" relationship in FB (when both sides confirmed that they are friends).

Default is directed.

Enum:directed, undirected, bidirectional
entityEndDateStrategy

Defines how to handle the relation when the start/end entity is end dated.

  • END_DATE_RELATION: End date the whole relation and related crosswalks;
  • END_DATE_RELATION_CROSSWALKS: End date related relation crosswalks. Defaults to END_DATE_RELATION_CROSSWALKS
Enum: END_DATE_RELATION, END_DATE_RELATION_CROSSWALKS
typeColor Color that will be used to visualize this relationship objects of that type (for example in graph view-color of lines between nodes) String, hex color
labelPattern

Pattern that is used to build entity object label. Can include static text as well as patterns-attributes in brackets.

Note: if the pattern is not specified, then the type's label is used.

String
attributes

Attributes that are defined as standard for this entity type. Attributes for relationships can be of simple, atomic type (please find more details in Attributes Configuration page).

NOTE: not every relation object will have all attributes defined in its relation type. Also relation object can have some attributes that are not defined in configuration-custom attributes.

JSON object of Attributes Configuration
startObject Yes-when inheritance is applied Defines properties of start object like it's type, directional context.
endObject Yes-when inheritance is applied Defines properties of start object like it's type, directional context.

Example

{
	"URI": "configuration/relationTypes/Parent",
	"label": "Parent",
	"name": "Parent",
	"description": "Types of relationships between Individual and Individual-representing Parent-child relationship type",
	"extendsTypeURI": "configuration/relationTypes/Family",
	"reverceOfTypeURIs": ["configuration/relationTypes/Child"],
	"implicit": false,
	"direction": "directed",
	"typeColor": "#AA3A44",
	"startObject": {
		"objectTypeURI": "configuration/entityTypes/Individual",
		"directionalContext": [{
				"rule": [{
					"attribute": "configuration/entityTypes/Individual/attributes/Gender",
					"type": "condition",
					"condition": "=",
					"value": "Female"
				}],
				"labelPattern": "mother"
			},
			{
				"rule": [{
					"attribute": "configuration/entityTypes/Individual/attributes/Gender",
					"type": "condition",
					"condition": "=",
					"value": "Male"
				}],
				"labelPattern": "father"
			},
			{
				"labelPattern": "parent"
			}
		]
	},
	"endObject": {
		"objectTypeURI": "configuration/entityTypes/Individual",
		"directionalContext": [{
			"labelPattern": "child"
		}]
	}
}
Note: Currently "id" parameters are not supported by Configuration API.

Operations

Get Relation Types Collection

This operation returns an array of Relation Types in configuration for a tenant.

Request

GET {TenantURL}/configuration/relationTypes

Parameters

No

Response

If there is a configuration defined for a tenant specified in Header of a request - JSON Array of entityrelation types is returned. If there is no such configuration-Error.

Errors

  • 309: Tenant '{0}' not defined in a system

  • 310: Failed to process Reltio Business Model JSON loaded from Reltio data storage.

Example Request

GET {TenantURL}/configuration/relationTypes

Example Response

  GET {
  	TenantURL
  }
  /configuration/relationTypes
  Body: [{
  		"URI": "configuration/relationTypes/hasAddress",
  		...
  	},
  	{
  		"URI": "configuration/relationTypes/Spouse",
  		...
  	},
  	{
  		"URI": "configuration/entityTypes/Friend",
  		...
  	}
  ]