File resource

Get file info - Get file info v2

OVERVIEW

Note: The latest specification for Collaborate 4.1.4 and above is here 

Purpose

API method to get a single file info from Collaborate.
 

Resource(API) EndPoint Query Params HTTP Method Request XML Response  Response Code
/files/{fileid} lastdmsinfo=true/false (support from 3.4.5 branch) GET     Response Code

 

Response

If successful this method returns a file resource in the response body.
 

Parameter Name Value Description
folderid Int The id of the folder in which the file exists
id Int The ID for the file in question
name String Name of the file
versionid Int Collaborate file version
versionnote String Any version notes provided for the file
createddate Date Date is provided in “dd mmm yyyy” format based on UTC timezone
modifieddate Date

Date is provided in “dd mmm yyyy” format based on UTC timezone.

Author, creation and modified date is provided based on site settings

type String Information stating the type of file
icon String URL to the file icon, this will bypass the security so that the API end user can obtain the file icon if required. (API endpoint for file icon will be provided in future releases)
originaltype String The original type of the file before conversion ( if any ). Originaltype will be shown when site level configuration for Enable automatic PDF conversion = true or Online viewer with DRM = true or Convert all files to PDF and encrypt with FileOpen plugin =true or (Encrypt PDF files with FileOpen plugin = true and file is PDF)
size int size in bytes. "size" is based on show size configuration at site level, "size" is in Bytes
commentscount Int Number of comments for the file
likescount Int No of likes for the file. Likes should be enabled for the instance and the user should not be a bidder user, otherwise the returned value will be 0
tags String Tags for the file
location String Full path to the file location in Collaborate including site name
dms Object Detailed related to the DMS from where the file was added.
createdby Object User object for the person who created this file
modifiedby Object

User object for the person who modified this file

 

Response XML

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<file>
    <folderID>3075</folderID>
    <name>RRRRRRRRRR</name>
    <id>868</id>
    <siteid>2</siteid>                                                <!-- Supported from 4.0.3 branch -->
    <versionid>1</versionid>
    <versionnote></versionnote>
    <createddate>20 Jun 2014 10:06</createddate>
    <modifieddate>20 Jun 2014 10:06</modifieddate>
    <type>pdf</type>
    <originaltype>txt</originaltype>
    <size>13878</size>
    <icon>https://domain.com/instancename/images/fileicon/pdf.png</icon>
    <commentscount>0</commentscount>
    <likescount>0</likescount>
     <tags>
        <tag>asdf</tag>
        <tag>asfn</tag>
    </tags>
    <location>Deleted Items</location>
    <dms>
        <dmsdocid>23</dmsdocid>
        <dmsParentFolderID>55</dmsParentFolderID>
        <dmscreateddate>2014-06-20T10:06:14.770+05:30</dmscreateddate>
        <dmsmodifiedBy>103</dmsmodifiedBy>
        <dmsdatabasename>user</dmsdatabasename>
        <dmsversion>1</dmsversion>                                  <!-- support from 3.4.5 branch -->
    </dms>
    <createdby>
        <firstname>firstname</firstname>
        <lastname>lastname</lastname>
        <email>first.last@highq.com</email>
        <userid>103</userid>
    </createdby>
    <modifiedby>
        <firstname>first</firstname>
        <lastname>last</lastname>
        <email>first.last@highq.com</email>
        <userid>103</userid>
    </modifiedby>
    <permission>
        <view>1</view>
        <edit>1</edit>                                               <!-- support from 4.0.3 branch -->
        <delete>1</delete>
    </permission>
</file>

 

  1. "originaltype" field will hold a value when site level configuration for Enable automatic PDF conversion = true or Online viewer with DRM = true or Convert all files to PDF and encrypt with FileOpen plugin = true or (Encrypt PDF files with FileOpen plugin = true and file is PDF)
  2. "size" field is populated depending on the "show size" configuration at site level, "size" is in Bytes. If this configuration is set to false, no size information will be provided through the API. 
  3. Query params 'lastdmsinfo' is support from Collaborate 3.4.5 branch. It accepts  true/false value. By default false. If this value is set as true then response will have last added dms version <dms> information. Current file version does not have bounded <dms> information.
  4. The siteID and permission fields have been added to the response from Collaborate 4.0.3

 

Code Meaning
401 Unauthorized
403 Validation failed/ Forbidden
405 Method not allowed (calling api with wrong method)
500 Internal error

 

Comments


0 Comments

Last Updated: Nov 08,2024