Related links
Developer Resources
Version history
Retrieve previous version details of a particular file from your IDrive account by using the
getVersions. API.
Quick links
Syntax for ‘getVersions’ API:
https://<server address>/evs/getVersions
Server address:
Use getServerAddress API to retrieve the IDrive server address.
HTTP method: POST
- Input parameters:
-
uid |
username or email address |
pwd |
password |
p |
file path name (in your account) |
- Output:
-
Below is a sample XML output generated during version listing:
<tree path="/BB_messages_list.txt" message="SUCCESS" filecount="2">
<item lmd="2010/05/25 05:11:05" size="5205" ver="1"/>
<item lmd="2010/05/25 05:12:53" size="5205" ver="2"/>
</tree>
- Description:
-
- tree
Root node with attributes path, message, filecount and desc.
- message
This attribute describes the operation as SUCCESS or FAIL.
- path
This attribute contains the path of the file whose versions are displayed.
- filecount
This attribute displays the total number of files that are available within a folder.
- desc
This attribute displays the error(s) that are generated during an invalid operation.
- item
This is the child node with following attributes:
- lmd
This attribute describes the last modified date of the resource.
- size
This attribute describes size of the resource.
- ver
This attribute describes the version (file version) of the resource.
- Following cases explain the expected outputs during INVALID operations:
-
- Case 1: Empty Username or Password
The output is as follows:
<tree message="ERROR" desc="INVALID PARAMETERS"/>
- Case 2: Invalid Username or Password
The output is as follows:
<tree message="ERROR" desc="INVALID USER"/>
Or
<tree message="ERROR" desc="INVALID PASSWORD"/>
- Case 3: Invalid path
The output is as follows:
<tree message="ERROR" desc="INVALID PATH"/>
- Case 4: Account not configured
Encryption configuration is a must for the IDrive account. If the configuration is not done for an account, the output is as follows:
<tree message="ERROR" desc="ACCOUNT NOT YET CONFIGURED" configstatus="NOT SET"/>
- Code snippets for Java, PHP, Python and Ruby:
-
Java:
PHP:
Python:
Ruby: