This resource represents a file attached to a PDFDocument.
Get all attachments in the document.
GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments
name | type | description | default |
---|---|---|---|
QSESSIONID | cookie | The session id | n/a |
X-Qoppa-DocumentPassword | header | The document's password. | n/a |
filePath | path | Path to the file to operate on. | n/a |
media type | data type | description |
---|---|---|
application/json | AttachmentsModel (JSON) | A list of attachments in the document. |
application/xml | Attachments (XML) |
Add a new attachment to the document.
POST http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments/
name | type | description | default |
---|---|---|---|
QSESSIONID | cookie | The session id | n/a |
file | formdata | The file to attach. | n/a |
fileDisposition | formdata | Information about the file to attach. | n/a |
X-Qoppa-DocumentPassword | header | The document's password. | n/a |
filePath | path | Path to the file to operate on. | n/a |
description | query | The description of the file to attach. | n/a |
relation | query | The relationship of the embedded file relative to the document. | n/a |
media type | data type |
---|---|
multipart/form-data | (custom) |
media type | data type | description |
---|---|---|
application/json | AttachmentModel (JSON) | Information about the newly added attachment. |
application/xml | Attachment (XML) |
Delete an attachment from the document.
DELETE http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments/{attachmentName}
name | type | description | default |
---|---|---|---|
QSESSIONID | cookie | The session id | n/a |
X-Qoppa-DocumentPassword | header | The document's password. | n/a |
attachmentName | path | The name of the attachment to delete. | n/a |
filePath | path | Path to the file to operate on. | n/a |
media type | data type | description |
---|---|---|
application/json | object (JSON) | 204 on Success. |
application/xml | anyType (XML) |
Get information about a single attachment in the document.
GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments/{attachmentName}
name | type | description | default |
---|---|---|---|
QSESSIONID | cookie | The session id | n/a |
X-Qoppa-DocumentPassword | header | The document's password. | n/a |
attachmentName | path | The name of the attachment to get information about. | n/a |
filePath | path | Path to the file to operate on. | n/a |
media type | data type | description |
---|---|---|
application/json | AttachmentModel (JSON) | The attachment information. |
application/xml | Attachment (XML) |
Download the attachment. By default the attachment will be returned in the body of the response but can also be downloaded as a file attachment.
GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments/{attachmentName}/content
name | type | description | default |
---|---|---|---|
QSESSIONID | cookie | The session id | n/a |
X-Qoppa-DocumentPassword | header | The document's password. | n/a |
accept | header | The accept header. Can be left empty or should match the mimetype of the attachment if specified. | n/a |
attachmentName | path | The name of the attachment to download. | n/a |
filePath | path | Path to the file to operate on. | n/a |
attachment | query | Set to true to download as an attachment, otherwise the attachment will be the body of the response. | false |
media type | data type | description |
---|---|---|
application/json | object (JSON) | The attachment in the body of the response or as an attachment. |
application/xml | anyType (XML) |