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 | |
sameAsTypeURIs | Collection 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
Default is | Boolean | |
direction
|
Identifies directional semantics of relationship object of the type. Supported directions:
Default is directed. | Enum:directed , undirected , bidirectional
| |
entityEndDateStrategy |
Defines how to handle the relation when the start/end entity is end dated.
| 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"
}]
}
}
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",
...
}
]