Attachments Resource

This resource represents a file attached to a PDFDocument.

GET /qoppapdf/v1/documents/{filePath}.pdf/attachments

Get all attachments in the document.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments

Request Parameters
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
Response Body
media type data type description
application/json AttachmentsModel (JSON) A list of attachments in the document.
application/xml Attachments (XML)

POST /qoppapdf/v1/documents/{filePath}.pdf/attachments

Add a new attachment to the document.

Sample Request

POST http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments/

Request Parameters
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
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json AttachmentModel (JSON) Information about the newly added attachment.
application/xml Attachment (XML)

DELETE /qoppapdf/v1/documents/{filePath}.pdf/attachments/{attachmentName}

Delete an attachment from the document.

Sample Request

DELETE http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments/{attachmentName}

Request Parameters
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
Response Body
media type data type description
application/json object (JSON) 204 on Success.
application/xml anyType (XML)

GET /qoppapdf/v1/documents/{filePath}.pdf/attachments/{attachmentName}

Get information about a single attachment in the document.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments/{attachmentName}

Request Parameters
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
Response Body
media type data type description
application/json AttachmentModel (JSON) The attachment information.
application/xml Attachment (XML)

GET /qoppapdf/v1/documents/{filePath}.pdf/attachments/{attachmentName}/content

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.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/attachments/{attachmentName}/content

Request Parameters
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
Response Body
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)