Question
How can I search for entities based on the presence of specific relations, given that this isn't directly supported in the Reltio Platform UI?
Answer
Although the Reltio UI does not provide a direct way to search for entities by their relationships, you can achieve this via API using the following methods:
1. Get Relations Between Entities
This method retrieves all relations between specified entities, optionally filtered by relation type.
Endpoint:
POST {TenantURL}/relations/getByObjectUris
Request Example:
Find HasAddress relations between two entities:
{
"objectUris": [
"entities/0000Dqr",
"entities/00009ab"
],
"relationTypes": [
"configuration/relationTypes/HasAddress"
]
}
2. Search for Relations by Attributes or Entity References
This method searches for relationships using filters based on:
- Start/End entity URIs
- Attribute values
- Tags or relation types
Endpoint:
GET {TenantURL}/relations?filter=(<filter_condition>)
Examples:
- Active relations on a specific date:
filter=(gt(activeness.startDate,1129507200) and lt(activeness.endDate,1129507200))
- Relations of a specific type:
filter=(equals(type,'configuration/relationTypes/Spouse'))
- Relations with a specific start entity:
filter=(equals(startObject,'entities/1'))
Supported Condition Types Include:
equals(property, value)not equals(property, value)containsWordStartingWith(property, value)fullText(property, value)-
missing(property)/exists(property) -
range(property, from, to)/gt,lt,gte,lte -
contains(property, *value)/in(property, value1,value2) -
not(negates any condition)
Note: Property names are dot-delimited (e.g., attributes.Name, attributes.Education.Degree).
3. Search Relation Events Using Cursor
This method enables paginated and ordered scans across relation event data.
Endpoint:
POST {TenantURL}/relations/_events/_scan
Filter Examples:
- By relation URI:
filter=(equals(relation_uri, 'relations/005ZBhp'))
- By relation type:
filter=(equals(relation_type, 'HasAddress'))
- By event timestamp:
filter=(gt(timestamp, 1373288685810) and lt(timestamp,1373288903390))
References
Comments
Please sign in to leave a comment.