Relation
A relation object introduces common relations between annotations. An annotation could be related to one or more other annotations and it may belong to several relations at the same time.
Relation types:
editrelation is created after editing annotation in user interface (rotation or split of the document). The original annotation is set toparentattribute and newly created annotations are set toannotationsattribute. To find all siblings of edited annotation see filters on annotationattachmentis a relationship representing the state that one or more documents are attachments to another document.keyis null in this case. Feature must be enabled.duplicaterelation is created after importing the same document that already exists in Rossum for current organization. Ifduplicaterelation already exists then corresponding annotation is added to existing relation.keyofduplicaterelation is set to hash of document content. To find all duplicates of the annotation filter annotations with appropriate hash in relationkey. See filters on annotation
This resource supports ETag HTTP header handling. Use If-None-Match for conditional retrieval and If-Match for conditional updates and deletes.
Relation
ID of the relation
Type of relationship. Possible values are: edit, attachment, duplicate.
editrelation is created after editing annotation in user interface (rotation or split of the document)attachmentis a relationship representing the state that one or more documents are attachments to another documentduplicaterelation is created after importing the same document that already exists in Rossum for current organization
"edit"Key used to distinguish several instances of the same type.
- For
attachmentrelations, this is null - For
duplicaterelations, this is set to a hash of document content - For
editrelations, this is typically null
URL of the parent annotation in case of 1-M relationship
List of related annotations
URL of the relation
List relations
GET api / v1 / relations
Retrieve all relation objects (annotations from queues not with active status are excluded).
curl -X GET "https://example.rossum.app/api/v1/relations"{
"pagination": {
"next": null,
"previous": null
},
"results": [
{
"id": 1,
"type": "edit",
"key": null,
"parent": "https://example.rossum.app/api/v1/annotations/123",
"annotations": [
"https://example.rossum.app/api/v1/annotations/124",
"https://example.rossum.app/api/v1/annotations/125"
],
"url": "https://example.rossum.app/api/v1/relations/1"
}
]
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
OK
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Create relation
POST api / v1 / relations
Create a new relation object.
curl -X POST "https://example.rossum.app/api/v1/relations" \ -H "Content-Type: application/json" \ -d '{ "type": "edit", "annotations": [ "https://example.rossum.app/api/v1/annotations/124", "https://example.rossum.app/api/v1/annotations/125" ] }'{
"id": 1,
"type": "edit",
"key": null,
"parent": "https://example.rossum.app/api/v1/annotations/123",
"annotations": [
"https://example.rossum.app/api/v1/annotations/124",
"https://example.rossum.app/api/v1/annotations/125"
],
"url": "https://example.rossum.app/api/v1/relations/1"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
Type of relationship. Possible values are: edit, attachment, duplicate.
editrelation is created after editing annotation in user interface (rotation or split of the document)attachmentis a relationship representing the state that one or more documents are attachments to another documentduplicaterelation is created after importing the same document that already exists in Rossum for current organization
"edit"Key used to distinguish several instances of the same type.
- For
attachmentrelations, this is null - For
duplicaterelations, this is set to a hash of document content - For
editrelations, this is typically null
URL of the parent annotation in case of 1-M relationship
List of related annotations
Response
Created
ID of the relation
Type of relationship. Possible values are: edit, attachment, duplicate.
editrelation is created after editing annotation in user interface (rotation or split of the document)attachmentis a relationship representing the state that one or more documents are attachments to another documentduplicaterelation is created after importing the same document that already exists in Rossum for current organization
"edit"Key used to distinguish several instances of the same type.
- For
attachmentrelations, this is null - For
duplicaterelations, this is set to a hash of document content - For
editrelations, this is typically null
URL of the parent annotation in case of 1-M relationship
List of related annotations
URL of the relation
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Retrieve relation
GET api / v1 / relations / {relationID}
Get a relation object.
curl -X GET "https://example.rossum.app/api/v1/relations/0"{
"id": 1,
"type": "edit",
"key": null,
"parent": "https://example.rossum.app/api/v1/annotations/123",
"annotations": [
"https://example.rossum.app/api/v1/annotations/124",
"https://example.rossum.app/api/v1/annotations/125"
],
"url": "https://example.rossum.app/api/v1/relations/1"
}{
"detail": "Object was not modified",
"code": "not_modified"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
OK
ID of the relation
Type of relationship. Possible values are: edit, attachment, duplicate.
editrelation is created after editing annotation in user interface (rotation or split of the document)attachmentis a relationship representing the state that one or more documents are attachments to another documentduplicaterelation is created after importing the same document that already exists in Rossum for current organization
"edit"Key used to distinguish several instances of the same type.
- For
attachmentrelations, this is null - For
duplicaterelations, this is set to a hash of document content - For
editrelations, this is typically null
URL of the parent annotation in case of 1-M relationship
List of related annotations
URL of the relation
Object was not modified (e.g. ETag matches If-None-Match header).
Detail of the error
Code of the error
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Partial update relation
PATCH api / v1 / relations / {relationID}
Update part of relation object.
curl -X PATCH "https://example.rossum.app/api/v1/relations/0" \ -H "Content-Type: application/json" \ -d '{}'{
"id": 1,
"type": "edit",
"key": null,
"parent": "https://example.rossum.app/api/v1/annotations/123",
"annotations": [
"https://example.rossum.app/api/v1/annotations/124",
"https://example.rossum.app/api/v1/annotations/125"
],
"url": "https://example.rossum.app/api/v1/relations/1"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Precondition failed.",
"code": "precondition_failed"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
Type of relationship. Possible values are: edit, attachment, duplicate.
editrelation is created after editing annotation in user interface (rotation or split of the document)attachmentis a relationship representing the state that one or more documents are attachments to another documentduplicaterelation is created after importing the same document that already exists in Rossum for current organization
"edit"Key used to distinguish several instances of the same type.
- For
attachmentrelations, this is null - For
duplicaterelations, this is set to a hash of document content - For
editrelations, this is typically null
URL of the parent annotation in case of 1-M relationship
List of related annotations
Response
OK
ID of the relation
Type of relationship. Possible values are: edit, attachment, duplicate.
editrelation is created after editing annotation in user interface (rotation or split of the document)attachmentis a relationship representing the state that one or more documents are attachments to another documentduplicaterelation is created after importing the same document that already exists in Rossum for current organization
"edit"Key used to distinguish several instances of the same type.
- For
attachmentrelations, this is null - For
duplicaterelations, this is set to a hash of document content - For
editrelations, this is typically null
URL of the parent annotation in case of 1-M relationship
List of related annotations
URL of the relation
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Precondition failed (e.g. ETag does not match).
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Delete relation
DELETE api / v1 / relations / {relationID}
Delete relation object.
curl -X DELETE "https://example.rossum.app/api/v1/relations/0"{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Precondition failed.",
"code": "precondition_failed"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Response
No Content
No response body.
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Precondition failed (e.g. ETag does not match).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error
Update relation
PUT api / v1 / relations / {relationID}
Update relation object.
curl -X PUT "https://example.rossum.app/api/v1/relations/0" \ -H "Content-Type: application/json" \ -d '{ "type": "edit", "annotations": [ "https://example.rossum.app/api/v1/annotations/124", "https://example.rossum.app/api/v1/annotations/125" ] }'{
"id": 1,
"type": "edit",
"key": null,
"parent": "https://example.rossum.app/api/v1/annotations/123",
"annotations": [
"https://example.rossum.app/api/v1/annotations/124",
"https://example.rossum.app/api/v1/annotations/125"
],
"url": "https://example.rossum.app/api/v1/relations/1"
}{
"detail": "Bad Request.",
"code": "bad_request"
}{
"detail": "Invalid token.",
"code": "authentication_failed"
}{
"detail": "Access to the requested resource is forbidden.",
"code": "access_forbidden"
}{
"detail": "Not found.",
"code": "not_found"
}{
"detail": "Conflict.",
"code": "conflict_status"
}{
"detail": "Precondition failed.",
"code": "precondition_failed"
}{
"detail": "Payload Too Large.",
"code": "payload_too_large"
}{
"detail": "Request was rate limited.",
"code": "rate_limited",
"url": "https://rossum.app/api/docs/openapi/guides/overview/#rate-limiting"
}{
"detail": "Server error.",
"code": "error"
}{
"detail": "Bad Gateway.",
"code": "bad_gateway"
}{
"detail": "Service Unavailable.",
"code": "service_unavailable"
}{
"detail": "Gateway timeout.",
"code": "gateway_timeout"
}Request Body
application/json
Type of relationship. Possible values are: edit, attachment, duplicate.
editrelation is created after editing annotation in user interface (rotation or split of the document)attachmentis a relationship representing the state that one or more documents are attachments to another documentduplicaterelation is created after importing the same document that already exists in Rossum for current organization
"edit"Key used to distinguish several instances of the same type.
- For
attachmentrelations, this is null - For
duplicaterelations, this is set to a hash of document content - For
editrelations, this is typically null
URL of the parent annotation in case of 1-M relationship
List of related annotations
Response
OK
ID of the relation
Type of relationship. Possible values are: edit, attachment, duplicate.
editrelation is created after editing annotation in user interface (rotation or split of the document)attachmentis a relationship representing the state that one or more documents are attachments to another documentduplicaterelation is created after importing the same document that already exists in Rossum for current organization
"edit"Key used to distinguish several instances of the same type.
- For
attachmentrelations, this is null - For
duplicaterelations, this is set to a hash of document content - For
editrelations, this is typically null
URL of the parent annotation in case of 1-M relationship
List of related annotations
URL of the relation
Invalid input data.
Detail of the error
Code of the error
The username/password is invalid or token is invalid (e.g. expired).
Detail of the error
Code of the error
Insufficient permission, missing authentication, invalid CSRF token and similar issue.
Detail of the error
Code of the error
The specified resource was not found.
Detail of the error
Code of the error
Conflict
Detail of the error
Code of the error
Precondition failed (e.g. ETag does not match).
Detail of the error
Code of the error
Payload too large (especially for files uploaded).
Detail of the error
Code of the error
Request rate is too high, wait before sending more requests. See Rate Limiting for more details.
Detail of the error
Code of the error
Link to the rate limiting documentation
Server failure while processing the request.
Detail of the error
Code of the error
Invalid response from the upstream server.
Detail of the error
Code of the error
We're temporarily offline for maintenance. Please try again later.
Detail of the error
Code of the error
Upstream server could not complete the request in time.
Detail of the error
Code of the error