Skip to main content
Version: v2023.18.0

POST annotation conversions

This API allows you to convert annotations from an existing document id.

API technical description

Entry point:

POST /annotations/conversion

Query Param:

VariableTypeRequiredDescription
sourceTypeStringyesThe source annotation format type, the accepted values are XFDF or FDF.
targetTypeStringyesThe target annotation format type, the accepted values are XFDF or FDF.
documentIdStringyesThe ID of the requested document.

Header:

VariableTypeRequiredDescription
AcceptStringyesThe format output type, the accepted values are application/json or application/octet-stream.

Response:

AttributeTypeDescription
annotationsInputStream or JSONThe annotations for the requested document id.

Examples

Convert annotations for a specified document

The call below generates a request to convert the XFDF annotations for the document with id b64_bG9jYWxlPWZyJnJhbmRvbVVVSUQ9ZmFjMTgyOWItYjc0Ni00ZGVlLTg1YWEtNTZhNzY4NTcyOGMx to FDF and get the result as InputStream.

$ curl -X 'POST'\
'http://localhost:8761/annotations/conversion?sourceType=XFDF&targetType=FDF&documentId=b64_bG9jYWxlPWZyJnJhbmRvbVVVSUQ9ZmFjMTgyOWItYjc0Ni00ZGVlLTg1YWEtNTZhNzY4NTcyOGMx'\
-H 'accept: application/octet-stream'\
-H 'Content-Type: application/octet-stream'\
--data-binary '@Titre.pdf'