REST APIs

IDrive EVS REST APIs: Development now made easy!

Upload

Upload data securely on your IDrive account using the uploadFile API.

Quick links

Syntax for ‘uploadFile’ API:

https://<server address>/evs/uploadFile

Server address:
Use
getServerAddress API to retrieve the IDrive server address.

HTTP method: POST
Input parameters:
uid username or email address
pwd password
pvtkey private encryption key is an optional parameter and is not required if you opt for the default encryption key during your IDrive account sign up
p location (folder path) in your account where the file will get uploaded.

Note: REST API supports file size upto 2GB for upload. We recommend you to use Command Line Utility API that has no limit on file size for upload.

Output:
Below is the sample XML output generated during file upload if the callback URL is not used:
<tree message="SUCCESS"><item filename="My.jpg" uploadstatus="SUCCESS" /> </tree>

Thumbnail
During upload, thumbnails will be automatically created for ".jpg, .bmp, .gif, .png, .tiff " file types in Small and Intermediate size.

Description:
  • tree
    Root node with the attribute message.
  • message
    This attribute describes the operation as SUCCESS or FAIL.
  • item
    This is the child node with following attributes:
    • filename
      This attribute describes the resource file name that is uploaded.
    • uploadstatus
      This attribute describes the upload operation as SUCCESS or FAIL.

    NOTE: If the callback URL is specified then the user will get redirected to the respective URL. It is advisable to use the ‘callback URL’ option for web-based applications.

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"/>
  • Case 5: Authentication failed

    If the account encryption configuration does not match, the output is as follows:
    <tree message="ERROR" desc="AUTHENTICATION FAILED" />

Code snippets for Java, PHP, Python and Ruby:
Java:

PHP:

Python:

Ruby:

Refer web browser design screenshots to design the browser based file upload page using this API.