[POST] /annotations

[POST] /annotations

Description

Within this endpoint new annotations can be created or existing annotations which are placed on the content of a DMS object can be updated. The system:objectId inside the JSON should only be send if an update should be made.

Request Method

POST

Request Query Parameter

  • objectTypeId (Integer): For performance reasons, the objectTypeId of the object can be provided.

  • minimalResponse (Boolean):  The response is on success HTTP/204. This speeds up the endpoint by 30%.

Response Format

JSON

Minimum Version

6.5.0

Request
Example

/api/dms/objects/2563/contents/native/annotations?objectTypeId=262168
/api/dms/objects/2563/contents/native/annotations?objectTypeId=262168&minimalResponse=true

Request
Example

{ "objects": [{ "properties": { "system:objectId": { "value": "C07CCA9605B94D0B9BF5CF61CABE29C1" }, "page": { "value": "0" }, "pageXStart": { "value": "0" }, "pageYStart": { "value": "0" }, "pageXEnd": { "value": "0" }, "pageYEnd": { "value": "0" }, "type": { "value": "ANNOT" }, "color": { "value": "DFEAF7FF" }, "text": { "value": "Example" } } }], "numItems": 1, "hasMoreItems": false, "totalNumItems": 1 }

Result
Example

{ "objects": [{ "properties": { "system:objectId": { "value": "C07CCA9605B94D0B9BF5CF61CABE29C1" }, "page": { "value": "0" }, "pageXStart": { "value": "0" }, "pageYStart": { "value": "0" }, "pageXEnd": { "value": "0" }, "pageYEnd": { "value": "0" }, "type": { "value": "ANNOT" }, "color": { "value": "DFEAF7FF" }, "text": { "value": "Example" } } }], "numItems": 1, "hasMoreItems": false, "totalNumItems": 1 }