Files : API changes for 5.5 - Require API to get version history of a file
OVERVIEW
Specification :
API to get the version history of a file
Endpoint : /api/12/files/{fileid}/versions
Method : (GET)
Require Fields:
Version number
Version date & time
Author (User detail including UserId, Name)
Notes
Extension
Original Extension
Redaction status
Parameters:
Parameter Name | Type | Mandatory/Optional | Detail |
---|---|---|---|
fileid | string | Mandatory | The ID of file for which the version history is required |
offset | string | Optional |
The starting point for each record returned Default value : 0 |
limit | string | Optional |
The maximum number of records to show per request. Default value : 25 |
Description:
- All versions of the file that the logged in user has access to are returned
- Date and Time will be given in UTC
- Author should be given as From UserDBO format.
- Notes will be given as string and as version notes in UI
- Extension will be given as string as file extension
- Redaction status value will be given as true or false based on whether the file is redacted or not
The value of the limit parameter will be the following:
- limit =25 this is the default value
- if limit>0 then the number of items returned is equal to that limit
- if limit=-1 then return all records
- if limit <-1 then the system returns the default number of items i.e 25
The value of the Offset parameter behaves as per below:
- (Default) offset =0
- if offset > 0 then the records are returned from the offset value
- if offset < 0 then offset value of 0 is set
Request Parameters:
Response XML:
<versions>
<version>
<number>1</number>
<createddate>28 Aug 2019 11:13</createddate>
<author>
<firstname>Tom</firstname>
<lastname>Chick</lastname>
<email>tom.chick@highq.com</email>
<userid>100</userid>
</author>
<notes>This is version used for testing</notes>
<extension>pdf</extension>
<redactionstatus>true</redactionstatus>
</version>
<version>
<number>2</number>
<createddate>28 Aug 2019 11:13</createddate>
<author>
<firstname>Tom</firstname>
<lastname>Chick</lastname>
<email>tom.chick@highq.com</email>
<userid>100</userid>
</author>
<notes>This is version used for testing2</notes>
<extension>txt</extension>
<originalextension>pdf</originalextension>
<redactionstatus>false</redactionstatus>
</version>
</versions>
Comments
0 Comments