REST APIs

IDrive EVS REST APIs: Development now made easy!

Delete files

Remove files / folders from your IDrive account using the deleteFile API.

Quick links

Syntax for ‘deleteFile’ API:

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

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 resource (folder) path
trash set trash parameter to "yes” to delete files permanently from trash

Output:
Below is a sample XML output generated during file deletion:
<tree message="SUCCESS"> <item path="/Data/web.xml" result="SUCCESS" /> </tree>

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 the following attributes:
    • path
      Specifies the path of the resource that is deleted.
    • result
      Status of the resource that is deleted(whether the resource is deleted successfully or not).

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 delete files page using this API.