Command line utility (idevsutil) APIs

Development made easy: IDriveSync EVS APIs

APIs


Parameters / Switches

  • --pvt-key = PATH_OF_PVT_KEY_FILE

    Using this parameter / switch you can provide your own private encryption key for AES 256-bit encryption. Command line utility reads private encryption key for AES 256-bit encryption for all communication / data transfers from the specified file path.

    Alternately you can directly set the privtate encryption key for the --pvt-key parameter / switch.
    Example:
    --pvt-key=ENCKEY
    Wherein ENCKEY is private encryption key of your choice for all communication / data transfers to your IDriveSync account.
    Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

  • --files-from = PATH_OF_FILE_LIST_FILE

    This parameter / switch acts like a source file for Upload / Download / Delete operations. This file contains file(s) / folder(s) path names that you wish to upload / download / delete.
    Example:
    --files-from=/file_list
    wherein file_list file contains the list of file(s) / folder(s) path names that you wish to upload / download / delete.

    Some of the file(s) / folder(s) path names include:
    • /Data/mydata.ps
    • /Data/mybook.doc
    • /Data/my references/

  • --temp = PATH_OF_TEMP_DIR

    Command line utility may use default location for the internal caching, you can have specific caching location using --temp=PATH switch / parameter

  • --password-file = PATH_OF_PSWD_FILE

    Using this parameter / switch you can provide your account password for user authentication. Command line utility reads the password from the specified file path for user authentication.

    Alternately you can directly set the password for the --password-file parameter / switch.
    Example:
    --password-file=ACC_PSWD
    Wherein ACC_PSWD is your account password.

    You can also use EVS_PASSWORD environment variable to set your password for a particular session, when you do not wish to send your password to execute each individual command

  • --proxy=PROX_INFO

    Command line utility uses this parameter / switch to connect to the server via proxy. During connection if you are behind the proxy server, you need to provide the proxy details such as username, password, IP address and port of the particular proxy.
    Syntax:
    --proxy=<proxy username>:<proxy password>@<proxy IP address>:<proxy port>
    You can use EVS_PROXY environment variable to set your proxy details for a particular session, when you do not wish to set proxy to execute each individual command

Account Configuration

Configure your IDriveSync EVS account with encryption key.
Syntax:
idevsutil --config-account --enc-type=DEFAULT --user=<username> --password-file=<account password>
Code:
idevsutil --config-account --enc-type=DEFAULT --user=john --password-file="MyPassword"

Get Server address

Retrieve your IDriveSync server address. Use this address for executing command line utility APIs and REST APIs.

It is important to note that the IDriveSync server address is dynamic and may change over a period of time as physically the data may get moved to another server. So depending on your application needs, you may need to call this API periodically to get the current IDriveSync server address applicable for the user.

Syntax:
idevsutil --getServerAddress <username> --password-file=<account password>
Code:
idevsutil --getServerAddress john --password-file="MyPassword"

Account Validation

Validate your IDriveSync account
Syntax:
idevsutil --validate --user=<username> --password-file=<account password>
Code:
idevsutil -–validate --user=john --password-file="MyPassword"

Upload

Perform full / incremental uploads.
Syntax:
--files-from=PATH_OF_FILE_LIST_ FILE
Reads the list of file(s) / folder(s) path names that you wish to upload to your IDriveSync account.

idevsutil --xml-output --password-file=<account password> --pvt-key=<key file path> --files-from=<path of filelist file> / <username>@<server address>::home/

Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --pvt-key=enc_key --files-from=filelist / john@<server address>::home/

Download

Download a particular file or a selected version of the file.
Syntax:
--files-from=PATH_OF_FILE_LIST_ FILE
Reads the list of file(s) / folder(s) path names that you wish to restore from your IDriveSync account.

idevsutil --xml-output --password-file=<account password> --pvt-key=<key file path> --files-from=<path of filelist file> <username>@<server address>::home/ /<download location on your computer>/

Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --pvt-key=enc_key --files-from =filelist john@<server address>::home/ /C/download_data/

Search

Locate files in your IDriveSync account.
1. Search all 'doc' files in your IDriveSync account:

Syntax:
idevsutil --xml-output --password-file=<account password> --search <username>@<server address>::home/<search criteria>
Code:
idevsutil --xml-output --password-file="MyPassword" --search john@<server address>::home/doc
2. Search all files including trash in your IDriveSync account:

Syntax:
idevsutil --xml-output --password-file=<account password> --all --search <username>@<server address>::home/<search criteria>
Code:
idevsutil --xml-output --password-file="MyPassword" --all --search john@<server address>::home/

Version history

Retrieve complete version details of a particular file present in your IDriveSync account.
Syntax:
idevsutil --xml-output --password-file=<account password> --version-info <username>@<server address>::home/<file path name for which you wish to retrieve version details>
Code:
idevsutil --xml-output --password-file="MyPassword" --version-info john@<server address>::home/DATA/myaccount.xls

Properties

Display all file / folder properties like size, date of creation etc.,
Syntax:
idevsutil --xml-output --password-file=<account password> --properties <username>@<server address>::home/<file/folder path name for which you wish to see properties>
Code:
idevsutil --xml-output --password-file="MyPassword" --properties john@<server address>::home/DATA/myaccount.xls

Status

Verify the existence of a specified file(s) / folder(s).
Syntax:
idevsutil --xml-output --password-file=<account password> --items-status --files-from=<path of filelist file> <username>@<server address>::home/
Code:
idevsutil --xml-output --password-file="MyPassword" --items-status --files-from =filelist john@<server address>::home/

Create Directory

Create a new directory on the server side.
Syntax:
idevsutil --xml-output --password-file=<account password> --create-dir=<NEW NAME> --pvt-key=<key file path> <username>@<server address>::home/PATH/
Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --create-dir=<NEW NAME> --pvt-key=enc_key john@<server address>::home/PATH/

Copy and paste

Copy file(s) / folder(s) from one location to another within the account.
Syntax:
idevsutil --xml-output --password-file=<account password> --copy-within --pvt-key=<key file path> --files-from=<path of filelist file> <username>@<server address>::home/<Destination path>
Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --copy-within --pvt-key=enc_key --files-from =filelist john@<server address>::home/<Destination path>

Delete

Delete selected file(s) / folder(s) from your IDriveSync account.
Syntax:
--files-from=PATH_OF_FILE_LIST_ FILE
Reads the list of file(s) / folder(s) path names that you wish to delete from your IDriveSync account.

idevsutil --xml-output --password-file=<account password> --delete-items --pvt-key=<key file path> --files-from=<path of filelist file> <username>@<server address>::home/

Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --delete-items --pvt-key=enc_key --files-from=filelist john@<server address>::home/

Trash

Trash helps you recover file(s) / folder(s) deleted by accident.

Note: By default file(s) / folder(s) deleted using delete command will be moved to Trash. The file(s) / folder(s) present in Trash will automatically get deleted after a 30 day (this may change without notice) period.

1. Move file(s) / folder(s) from Trash to its original location using --moveto-original parameter / switch in your IDriveSync account

Syntax:
--files-from=PATH_OF_FILE_LIST_ FILE
Reads list of file(s) / folder(s) that you wish to move from trash to your IDriveSync account.

idevsutil --xml-output --password-file=<account password> --pvt-key=<key file path> --moveto-original --files-from=<path of filelist file> <username>@<server address>::home/

Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --pvt-key=enc_key --moveto-original --files-from=filelist john@<server address>::home/

2. Delete file(s) / folder(s) permanently from Trash in your IDriveSync account.

Use --deletefrom-trash parameter / switch to delete file(s) / folder(s) permanently from Trash in your IDriveSync account.

Syntax:
idevsutil --xml-output --password-file=<account password> --pvt-key=<key file path> --deletefrom-trash --files-from=< path of filelist file > <username>@<server address>::home/
Code:
idevsutil --xml-output --password-file="MyPassword" --pvt-key=<key file path> --deletefrom-trash --files-from=filelist john@<server address>::home/

Rename

Rename file(s) / folder(s) in your IDriveSync account
Syntax:
idevsutil --xml-output --password-file=<account password> --rename --old-path=<file/folder path> --new-path=<file/folder path> --pvt-key=<key file path> <username>@<server address>::home/
Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --rename --old-path="/C/Oldfilename.txt" --new-path="/C/Newfilename.txt" --pvt-key=enc_key john@<server address>::home/

Listing

List file(s) / folder(s) from the selected path in your IDriveSync account.
1. List first level hierarchy of file(s) / folder(s):

Syntax:
idevsutil --xml-output --password-file=<account password> --auth-list <username>@<server address>::home/<folder path name>/
Code:
idevsutil --xml-output --password-file="MyPassword" --auth-list john@<server address>::home/C/DATA/

2. Use Search API to list all file(s) / folder(s) from the specified location

Events

Retrieve all event details within a specified time period.
1. List all events for the specified Month and Year:

Syntax:
idevsutil --xml-output --password-file=<account password> --event-month=<month> --event-year=<year> <username>@<server address>::home/
Code:
idevsutil --xml-output --password-file="MyPassword" --event-month=08 --event-year=2011 john@<serveraddress>::home/

2. View / Download particulars of an event:

Syntax:
idevsutil --xml-output --password-file=<account password> --event-month=<month> --event-year=<year> --eventid=<event id> --save-event=<location where you wish to download the event details> <username>@<server address>::home/
Code:
idevsutil --xml-output --password-file="MyPassword" --event-month=08 --event-year=2011 --eventid="BCK20110824" --save-event=/data/events <username>@<server address>::home/

Display Quota

Get your IDriveSync account quota details.
Syntax:
idevsutil --xml-output --password-file=<account password> --get-quota <username>@<server address>::home/
Code:
idevsutil --xml-output --password-file="MyPassword" --get-quota john@<server address>::home/

Regulate bandwidth
usage

Regulate your bandwidth usage to upload.
Syntax:
--bw-file=PATH_OF_BW_FILE
Reads bandwidth value in percentage from the file. You can dynamically vary the bandwidth value as per your requirement from 0 to 100% during upload operations.

idevsutil --xml-output --password-file=<account password> --bw-file = <path of the file containing bandwidth value in percentage> --pvt-key=<key file path> --files-from=filelist / <username>@<server address>::home/

Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --bw-file =/bw.txt --pvt-key=enc_key --files-from=filelist / john@<server address>::home/

Pause / Resume operations

To pause the upload operation, add -1 to the bandwidth file (--bw-file).
To resume the upload operation, add a non-ZERO positive value to the bandwidth file (--bw-file).

Know the size of a particular folder / drive / volume

Find the size of a folder / drive / volume in your IDriveSync account.
Syntax:
idevsutil --xml-output --password-file=<account password> --get-size <username>@<server address>::home/<folder path name>/
Code:
idevsutil --xml-output --password-file="MyPassword" --get-size john@<server address>::home/DATA/

Verify upload / download rate of transfer

Test the upload / download transfer rate using -trf-uprate and -trf-downrate parameter / switch respectively.
Upload rate of transfer:

Syntax:
idevsutil --xml-output --password-file=<account password> --trf-uprate --pvt-key=<key file path> <username>@<server address>::home/
Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --trf-uprate --pvt-key=enc_key john@<server address>::home/
The above-mentioned code can be executed using any programming language across any platform (Windows, Mac and Linux).

Output:
Sample XML output:
<item trf_type="upload" trf_rate="26.77kB/s"/>
Description:
The following details are displayed while testing upload rate of transfer:
  • trf_type
    This attribute displays the type of transfer (upload) for which the rate has been calculated.
  • trf_rate
    This attribute displays the rate of data transfer in kB/s.

Download rate of transfer:

Syntax:
idevsutil --xml-output --password-file=<account password> --trf-downrate --pvt-key=<key file path> <username>@<server address>::home/
Note: --pvt-key parameter is optional and is not required if you opt for the default encryption key during your IDriveSync account sign up.

Code:
idevsutil --xml-output --password-file="MyPassword" --trf-downrate --pvt-key=enc_key john@<server address>::home/
The above-mentioned code can be executed using any programming language across any platform (Windows, Mac and Linux).

Output:
Sample XML output:
<item trf_type="download" trf_rate="34.66kB/s"/>
Description:
The following details are displayed while testing download rate of transfer:
  • trf_type
    This attribute displays the type of transfer.
  • trf_rate
    This attribute displays the rate of data transfer in kB/s

You can make use of I / O redirection methods for redirecting IDriveSync EVS command line utility (idevsutil) output.

Refer code repository for more details on usage / implementation.