Annotation
Create annotation
Create an annotation object.
Normally you create annotations via the upload endpoint.
This endpoint could be used for creating annotation instances including their content and with status set to an explicitly requested value. Currently only created is supported which is not touched by the rest of the platform and is not visible via the Rossum UI. This allows for subsequent updates before switching the status to importing so that it is passed through the rest of the upload pipeline.
The use-case for this is the upload.created hook event where new annotations could be created and the platform runtime then switches all such annotations' status to importing.
post/api/v1/annotations
Request body
Example request
{
"id": 314528,
"url": "https://example.rossum.app/api/v1/annotations/314159",
"status": "to_review",
"document": "https://example.rossum.app/api/v1/documents/456700",
"queue": "https://example.rossum.app/api/v1/queues/8198",
"schema": "https://example.rossum.app/api/v1/schemas/31336",
"relations": [],
"pages": [
"https://example.rossum.app/api/v1/pages/558598"
],
"creator": "https://example.rossum.app/api/v1/users/10775",
"created_at": "2021-04-26T10:08:03.856648Z",
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z",
"rir_poll_id": "54f6b9ecfa751789f71ddf12",
"content": "https://example.rossum.app/api/v1/annotations/314159",
"metadata": {
"some_key": "some_value"
},
"related_emails": [],
"email": "https://example.rossum.app/api/v1/emails/1234",
"email_thread": "https://example.rossum.app/api/v1/email_threads/456",
"has_email_thread_with_replies": true,
"organization": "https://example.rossum.app/api/v1/organizations/406",
"assignees": [
"https://example.rossum.app/api/v1/users/1",
"https://example.rossum.app/api/v1/users/2"
],
"labels": [],
"training_enabled": true
}Response
Created
Example response
{
"id": 314528,
"url": "https://example.rossum.app/api/v1/annotations/314159",
"status": "to_review",
"document": "https://example.rossum.app/api/v1/documents/456700",
"queue": "https://example.rossum.app/api/v1/queues/8198",
"schema": "https://example.rossum.app/api/v1/schemas/31336",
"relations": [],
"pages": [
"https://example.rossum.app/api/v1/pages/558598"
],
"creator": "https://example.rossum.app/api/v1/users/10775",
"created_at": "2021-04-26T10:08:03.856648Z",
"modified_by": "https://example.rossum.app/api/v1/users/10775",
"modified_at": "2021-04-26T10:08:03.856648Z",
"rir_poll_id": "54f6b9ecfa751789f71ddf12",
"content": "https://example.rossum.app/api/v1/annotations/314159",
"metadata": {
"some_key": "some_value"
},
"related_emails": [],
"email": "https://example.rossum.app/api/v1/emails/1234",
"email_thread": "https://example.rossum.app/api/v1/email_threads/456",
"has_email_thread_with_replies": true,
"organization": "https://example.rossum.app/api/v1/organizations/406",
"assignees": [
"https://example.rossum.app/api/v1/users/1",
"https://example.rossum.app/api/v1/users/2"
],
"labels": [],
"training_enabled": true
}