File resource

Download File - Download file v1

OVERVIEW

API methods to download a file from Collaborate. (File not the metadata; metadata should be downloaded using the “get file info” API.)

This method supports downloading a specific version of a file.

Admin users can download the original contents of the file by passing downloadoriginal=true as a query parameter.

Assumption

  1. original=true parameter is only applicable for users, who have rights to download original version from Collaborate web based interface.
  2. If workflow is enabled for the site and the document is in pending state, this method call will download the file for the file owner & content admin.

Request

GET       /api/1/files/{fileid}/content

Parameters
 

Parameter Name

Value

Description

fileid

Int

The ID for the file in question

 

Query Parameters
 

Parameter Name

Value

Description

version

Int

Specific version of the file which is to be downloaded

original

True/false (default)

Use this parameter to download the original format of the document.

In case automatic PDF conversion is enabled for the site, the original format of the file will be returned. e.g if the PDF was converted from a txt file then on setting original=true will send the txt file back to the user. 

If both version parameter and original = true is set then the original format of the file will be returned for the specified version of the document. 

 

Request body

No request body is required for this call

Response

If successful, this method returns a 200 OK response. If DRM is enabled, the user can request the original file if they have access to it. If site password, IP address access or terms and conditions are enabled, No API requests will be successful. 

Error object is returned in case of an error.

Comments


8 Comments

Last Updated: Jun 09,2023