Question
How to perform an Entity search via API and apply different types of filters to the search?
Answer
Reltio has a search API with a filter option that can be used to customize search requirements.
filter=({Condition Type}[AND/OR {Condition Type}]*)
- equals(property, value) - exact match condition ignoring case
- not equals(property, value) - not equals condition ignoring case
- equalsCaseSensitive(property, value) - exact match condition considering case
- containsWordStartingWith(property, tokenized value) - prefix condition; returns entities that have condition property starting with condition value
- startsWith(property, restricted value) - prefix condition; returns entities that have condition property starting with condition value
- Fulltext(property, value) - full text search; returns entities that have condition property with condition value (any place)
- missing(property) - returns entities with fields that have no values for 'property' or 'property' value is empty.
- exists(property) - returns entities having some not empty value for 'property'.
- inSameAttributeValue(subquery on nested or reference attribute) - returns entities that have all attributes matching to a subquery in one single nested or reference attribute. Note that subquery supports only 'equals', 'equalsIgnoreCase' and 'startsWith' operands and all these operands should have sub-attributes of one nested attribute, e.g sub-attribute from 'Address' and 'Education' can't be used inside one 'inSameAttributeValue' query
- insideCategoryTree(category, '<category URI>') - filters all entities that have category inside category tree specified by 'category URI'. Inside category tree means that entity belongs to a specified category or to any child category of a specified category
- listEquals(property, file URI) - returns entities that have condition property with condition values from file(one value in each row). Files format - txt, CSV. Returns empty result if the file is unavailable or deleted
Example:
GET https://<environment>.reltio.com/reltio/api/<tenantID>/entities/_total?filter=equals(type,'configuration/entityTypes/HCP') and equals(sourceSystems,'PBMD') and equals(attributes.LastName,'Hughes') and equals(attributes.NameInitials,'D')
References
https://docs.reltio.com/search/search.html
https://docs.reltio.com/entitiesapi/entitiesfiltering.html
Comments
Please sign in to leave a comment.