REST APIs

IDrive EVS REST APIs: Development now made easy!

Rename file/folder

Rename file(s) / folder(s) in your IDrive account using the renameFileFolder API.

Quick links

Syntax for ‘renameFileFolder’ API:

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

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
oldpath Old path of the file / folder name
newpath New path of the file / folder name

Output:
Below is a sample XML output generated during rename operation:
<tree message="SUCCESS" desc="RENAMED SUCCESSFULLY" />

Description:
  • tree
    Root node with attributes; message and desc.
  • message
    This attribute describes the operation as SUCCESS or FAIL.
  • desc
    This attribute holds the description of the SUCCESS or FAIL case

The following case explains the expected output during a Failure operation:
  • Failure case:

    The output is as follows:
    <tree message="ERROR" desc="FILE/FOLDER ALREADY EXISTS"/>
    <tree message="ERROR" desc="FILE/FOLDER ALREADY EXISTS IN TRASH" />

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

PHP:

Python:

Ruby:

Refer web browser design screenshots to design the browser based rename files page using this API.