question

Upvote
Accepted
32 5 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.

Hello @Evgeniya Drapun

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
1.2k 8 11 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?

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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