question

Upvote
Accepted
32 3 3 7

Filter entities by relationship type

We are using /entity/analyze/connect and /entity/analyze/search requests to build a relationship graph between entities.

We are looking for an opportunity to request entities with specific relationship types. like OfficerDirectorOrganization.

We analyzed existing parameters, but did not find any opportunity to filter entities by relationship type.

Is there any?

apientity
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Upvotes
Accepted
1.2k 6 10 8

We have that functionality in the search endpoint. You would need to recursively iterate through the resultset to replicate analyze functionality, otherwise the filtering would have to be done on the client.

Example:

GET /datafusion/api/entity/search?parentUrisDirect=http://permid.org/1-4295861160&parentPredicateFilters=23|||http://rdf.thomsonreuters.com/relationship/OfficerDirectorOrganization

where:

  • parentUrisDirect is the subject IRI of the entity, here PermID for Thomson Reuters
  • parentPredicateFilters is the form of [CONTEXT ID OR URI]|||[PREDICATE]

These will be specific to your instance, but you can retrieve them either through

GET /datafusion/api/context/list

or

GET /datafusion/api/entity/search?parentUrisDirect=http://permid.org/1-4295861160&includePredicates=true 
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thank you, Tomasz. This is helpful.

Probably you also can help us to understand is there any prioritization in responses for connections? We can see this score field, however looks like it is working in scope of one request and when we request additional connections request score is not correlated with previous response. Our main question here, can we receive really relevant and important connection only after several requests?