Folder Resource

This resource represents a folder that can contain sub folders or documents.

DELETE /qoppapdf/v1/documents/{folderPath}

Delete the folder. It must be empty to be deleted successfully. Set "recursive" to true to delete any subfolders and documents within the directory.

Sample Request

DELETE http://{host}:{port}/qoppapdf/v1/documents/mydir?recursive=true

Request Parameters
name type description default
QSESSIONID cookie The session id n/a
X-Qoppa-DocumentPassword header The document's password. n/a
folderPath path The path to the file's parent. n/a
recursive query Set to true to delete any sub folders and documents within the directory. false
Response Body
media type data type description
application/json object (JSON) 204 on success.
application/xml anyType (XML)

GET /qoppapdf/v1/documents/{folderPath}

Get a list of files in a folder. File details will include file size when it is of type DocumentModel.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir?details=true

Request Parameters
name type description default
QSESSIONID cookie The session id n/a
X-Qoppa-DocumentPassword header The document's password. n/a
folderPath path The path to the file's parent. n/a
details query Set to true to print out detailed information about each PDF document. false
Response Body
media type data type description
application/json FolderModel (JSON) The Directory.
application/xml Folder (XML)

POST /qoppapdf/v1/documents/{folderPath}

Upload a file to create a new Document from a PDF, Word document, Excel spreadsheet, or image that will have the specified file name. Parent directories will be created if they don't already exist.

The message body is Multipart/Form-Data which consists of a PDF, GIF, JPEG, PNG, TIFF, Doc, DocX, Xlsx, Pptx, or text file.

Sample Request

 POST http://{host}:{port}/qoppapdf/v1/documents/mydir
 (file as attachment)

Request Parameters
name type description default
QSESSIONID cookie The session id n/a
file formdata The file to upload. n/a
fileDisposition formdata n/a
X-Qoppa-DocumentPassword header The document's password. n/a
folderPath path The path to the file's parent. n/a
dpi query The resolution of the GIF file. Does not apply to other file types and will be ignored. 72
namingMode query The behavior a document with the same filename already exists in the folder. Valid values are: 0-Throw a bad request exception, 1-Overwrite the existing file, 2-Append a random number to the file name. 2
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json object (JSON) The uploaded Document.
application/xml anyType (XML)

PUT /qoppapdf/v1/documents/{folderPath}

Create a new folder at the given path.

The message body is empty.

Sample Request

PUT http://{host}:{port}/qoppapdf/v1/documents/mydir

Request Parameters
name type description default
QSESSIONID cookie The session id n/a
X-Qoppa-DocumentPassword header The document's password. n/a
folderPath path The path to the file's parent. n/a
Response Body
media type data type description
application/json FolderModel (JSON) The new Directory.
application/xml Folder (XML)