How do I run a search for addresses that don't have any affiliated entities?

Question

I want to search for all addresses which do not have any affiliated individual on that specific tenant.  Can I make embedded _hops API call?

Answer

In this case, _hops is not recommended to use.  Since you have the relationship and for 1M entity its better to identify the relations with the connection API.

POST {TenantURL}/entities/{entity id}/_connections

In a single API request, several connected entities for one entity could be requested. Each connection could be specified by

  • In relation types - fetch relations with specified types, that has specified entity as end entity
  • Out relation types - fetch relations with specified types, that has specified entity as start entity
  • Group types - group types that have specified entity as a member
  • Entity types - only specified entity types would be in the result
  • Offset - result in each connections group could be sorted, and the only one page of results would be returned, so offset specifies what element in the list to return first
  • Max - number of results to return in each facet
  • Filter - filter expression to filter results
  • Suggested - references to other connection groups that was requested in one request to populate result inside the current group

Connections could be more than on distance = 1 from the specified entity. In such a case, the connection should be specified as connections list - request entities by first connection, then request all connections of entities got at step 1 using the second connection and so on.

Note: there is the limit of relations per entity for this request. If an entity has more then 500K relations, then only the first 500K of relations will be read from the database and will be used to build the response. If it happens, then the additional property - "limitExceeded" : true - will be added to the response.

There are two request parameters which allow changing this default behavior:

  • activeness_date - the value of this parameter should be a timestamp in milliseconds. With this parameter, the response will contain active connections and connections where both objects, relation, and entity, have "endDate" > activeness_date
 POST {TenantURL}/entities/{entity id}/_connections?activeness_date=1524640582963
  • activeness_enabled - the value of this parameter is true or false (true is the default). With this parameter, the response will contain all connections with active and inactive entities and relations, i.e. regardless of "endDate" values for them. 

 

 POST {TenantURL}/entities/{entity id}/_connections?activeness_enabled=false

References

 

https://docs.reltio.com/relationsapi/requestdifferententityconnections.html

https://docs.reltio.com/relationsapi/connectionrequestspec.html

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.