Relationship management endpoints

Relationships are basic building blocks of a graph. They can be automatically extracted from a document and then added to a graph.

To automatically extract relationships from a document, you can use the following endpoint. Note that you only need to run this once per document to extract both entities and relationships:

MethodEndpointDescription
POST/documents/{id}/entities_and_relationshipsExtract entities and relationships from a document

To manage relationships extracted from a document, you can use the following endpoints:

MethodEndpointDescription
GET/documents/{id}/relationshipsGet relationships for a document
GET/documents/{id}/relationships/{id}Get a relationship for a document
POST/documents/{id}/relationshipsAdd relationships to a document
POST/documents/{id}/relationships/{id}Update a relationship for a document
DELETE/documents/{id}/relationships/{id}Delete a relationship from a document

Once entities are added to a graph using the “/graphs/{id}/{object_type}/add” endpoint, you can manage them using the following endpoints:

MethodEndpointDescription
GET/graphs/{id}/relationshipsGet relationships for a graph
GET/graphs/{id}/relationships/{id}Get a relationship for a graph
POST/graphs/{id}/relationshipsAdd relationships to a graph
POST/graphs/{id}/relationships/{id}Update a relationship for a graph
DELETE/graphs/{id}/relationships/{id}Delete a relationship from a graph
Was this page helpful?
Built with