Get Document as Tiff File

GET /ws/rest/service/v1/dm/file/view/<file_id>

Purpose

Retrieves a file as a multi-page tiff file.

Prerequisites

Ensure the following:

  • Configure the Document Manager in the shell where the document is to be retrieved.
  • You must have Get permissions to use this REST service of Document Manager.
  • Configure the properties to view any file as a tiff file.
  • Create or upload a document/file and view it as a tiff file using the file_id.

Path Parameter

Specify the following path parameter:

Request Parameter Required? Data Type Description
file_id Yes Integer The file id of the document you want as a tiff file.

Response Format

A JSON object is returned in the following format.

{

"data": [],

"message": [],

"status": <REST status code value>

}

A successful response displays a status code 200.

A failed response displays a message with a status code.

Sample Success Response

A tiff file can be downloaded and viewed.

Sample Failed Request

An invalid file_id is specified in the following request:

http://<host>:<port>/ws/rest/service/v1/dm/file/download/5924

Note:

File_id is provided as a part of the path parameter in the above request.

Sample Failed Response

A failed response displays in the following format:

{

"data": [ ],

"message": [ ],

"status":1041

}

Supported Validation Messages and Status Codes

The following validation messages and status codes display in the response when incorrect values are provided in the request.

Field Name Use-case Scenario Status code Error Message
file_id file_id is invalid. 1069 File does not exist.