Reseller API's Collection
The IDrive® e2 Reseller API is developed over REST architecture.
The IDrive® e2 Reseller API accepts request bodies in the form of content type 'application/JSON' and returns 'application/JSON' responses.
Our API uses API Key Authentication mechanism. You can generate the API key from the profile section of the IDrive® e2 account.
Add the API key generated from the profile section to all HTTP API calls header against key 'token'.
HTTP Response codes:
- 200 (Success)
- 500 (Server Error)
- 400 (Invalid Parameters)
- 401 (Unauthorized)
- 403 (Invalid request)
The Error response body would be of following structure:
Response (application/JSON) : {
error : {
string type;
string code;
string message;
}
}
Possible values for 'error.type' are :
For further details 'error.code' and 'error.message' would explain what went wrong.
Common Error Cases
Following are the common error cases that can be returned by all APIs detailed below. Rest of the error cases will be documented with the specific APIs.
- Server Error (HTTP 500)
Response (application/JSON) : {
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - Unauthorized (HTTP 401)
Response (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'unauthorized',
message: 'Authentication header missing/invalid'
}
} - Invalid Parameters (HTTP 400)
Response (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'invalid_parameters',
message: 'Invalid parameter values, check errors for details',
errors: [] (array contain details of error)
}
}
AUTHORIZATION Header API Key
Key | token |
Value | <YOUR-API-KEY> |
Enumerations used throughout API's are:
Enums:
Access Key Permissions:
{
0: Read access,
1: Write access,
2: Read/Write access
}
User Operations
- List all users
GET
https://api.idrivee2.com/api/reseller/v1/usersClick to copyLink copied This displays all the users added under your profile.Output
API returns array of the users added under your profile.
The structure of response is as following:struct response {
string id;
List users[];
}
struct users{
string email;
string first_name;
string last_name;
string account_creation_timestamp;
string invite_url;
bool is_signed_up;
bool is_active;
double storage_used;
int storage_quota;
} - Create User
- Quota (GB's) (0 for unlimited else >0)
- Password is a base64 encoded string.
- email_notification Iff provided and set to false then no email notification would be send to the specified email address.
- Email [255]
- Password [100]
- First Name [64]
- Last Name [64]
- Invalid Request (HTTP-403)
- User already exists and is linked to your account.
{
error:{
type: 'invalid_request_error',
code: 'user_signed_up',
message : 'User already signed up'
}
} -
Email already in use (an independent account exists which is not linked to your account).
{
error:{
type: 'invalid_request_error',
code: 'email_already_in_use',
message: 'Email already in use'
}
}
- User already exists and is linked to your account.
- Disable User
- Email [255]
- User signed up.
- Account enabled.
- Invalid Request (HTTP 403)
- Account already disabled.
error:{
type: 'invalid_request_error',
code: 'user_account_already_disabled',
message: 'Account already disabled for the user'
}
} - Account does not exist.
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
- Account already disabled.
- Enable User
- Email [255]
- User signed up/created.
- User account was disabled previously.
- Invalid Request (HTTP 403)
- Account does not exist.
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Account already enabled.
error:{
type: 'invalid_request_error',
code: 'user_account_already_enabled',
message: 'Account already enabled for the user'
}
}
- Account does not exist.
- Remove User
- Email [255]
- User must be disabled.
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message:'Account with this email does not exist'
}
} - Account not disabled.
{
error:{
type: 'invalid_request_error',
code: 'user_account_not_disabled',
message: 'User account not disabled'
}
}
- Account does not exist.
- Get Storage Usage
- Email [255]
- User must be signed up.
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
- Account does not exist.
Note:
storage_used (bytes)
storage_quota (GB's) (0 : unlimited else > 0)
invite_url if not null can be used by the invited user to sign up
Curl Example Request:
curl --request GET 'https://api.idrivee2.com/api/reseller/v1/users' --header 'token: <your api key>'
PUT
https://api.idrivee2.com/api/reseller/v1/create_userClick to copyLink copied
This API will create a user account on IDrive® e2 which will be linked to your account.
Input
string email;
string password; //base64 encoded string
string first_name;
string last_name; //last_name is an optional parameter
int quota;
bool email_notification; //email_notification is an optional parameter
Note:
Length Parameters
Output
On Success API Response (application/JSON) would be :
{ user_created: true }
Error Cases
Example Request :Body (application/JSON)
{
"email": "e2reseller+1@idrivee2.com",
"password":"dGVzdDEyMw==",
"first_name":"dev",
"quota": 1024,
"email_notification": false
}
Curl Example Request:
curl --request PUT 'https://api.idrivee2.com/api/reseller/v1/create_user'
--data '{
"email": "e2reseller+1@idrivee2.com",
"password":"dGVzdDEyMw==",
"first_name":"dev",
"quota": 1024
}' --header 'token: <your api key>'
POST
https://api.idrivee2.com/api/reseller/v1/disable_userClick to copyLink copied
This API disables the user account. Users will not be able to login, access data, and perform any operations.
Input
string email;
Length Parameters
Precondition
Output
On Success API Response (application/JSON) would be :
{ user_disabled : true }
Error Cases
Example Request :Body (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}
Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/disable_user'
--data '{
"email":"e2reseller+1@idrivee2.com"
}'
POST
https://api.idrivee2.com/api/reseller/v1/enable_userClick to copyLink copied
This API reenables disabled user accounts. Users can login, access data, and perform normal operations.
Input
string email;
Length Parameters
Precondition
Output
On Success API Response(application/JSON) would be:
{ user_enabled : true }
Error Cases
Example Request :Body (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}
Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/enable_user'
--data '{
"email":"e2reseller+1@idrivee2.com"
}' --header 'token: <your api key>'
POST
https://api.idrivee2.com/api/reseller/v1/remove_userClick to copyLink copied
This API will permanently delete users from IDrive® e2.
Note: The user data will be lost permanently on performing this operation.
Input
string email;
Length Parameters
Precondition
Output
On success API Response(JSON) would be :
{ user_removed : true }
Error Cases
Example Request :Body (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}
Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/remove_user'
--data '{
"email":"e2reseller+1@idrivee2.com"
}' --header 'token: <your api key>'
POST
https://api.idrivee2.com/api/reseller/v1/usage_statsClick to copyLink copied
This API returns the array of IDrive® e2 utilization for the user provided.
Input
{
string email;
string date_from;
string date_to;
}
date_from(ISO8601)(start date)
date_to(ISO8601) (end date)
Length Parameters
Preconditions
Output
Array of usage_stats structure
struct usage_stats{
double downloads;
double uploads;
double disk_used;
string date;
}
downloads, uploads, disk_used are in bytes
Error Cases
Example Request :Body (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"date_to":"2022-08-31",
"date_from":"2022-08-01"
}
Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/usage_stats'
--data '{
"email": "DEV-TEST+1@idrivee2.com",
"date_to":"2022-08-31",
"date_from":"2022-08-01"
}' --header 'token: <your api key>'
Storage Operations
- List Regions
GET
https://api.idrivee2.com/api/reseller/v1/regionsClick to copyLink copied This API returns an array of regions for IDrive® e2.Output
struct regions{
string region_key;
string region_name;
string country;
string region_code;
bool active;
bool hdd_storage;
bool ssd_storage;
}Note: Only active regions can be enabled for the user.
Example Request: List Regions
curl --request GET 'https://api.idrivee2.com/api/reseller/v1/regions' --header 'token: <your api key>'
- Enable Region for User
- Email [255]
- Region[5]
- Existing user account.
- Region must not be enabled for the user.
- Region must have an SSD Storage to set 'ssd_storage' as true.
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Storage region already enabled for the user.
{
error:{
type: 'invalid_request_error',
code: 'region_already_enabled',
message: 'Storage region already enabled for user'
}
} - User disabled.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
} - Payment for your account failed.
{
error:{
type: 'invalid_request_error',
code: 'payment_failed',
message: 'Account expired please update payment info'
}
}
- Account does not exist.
- List User Enabled Regions
POST
https://api.idrivee2.com/api/reseller/v1/list_user_regionsClick to copyLink copied This API lists all enabled regions of the user.Input
{
string email;
}Length Parameters
- Email [255]
Precondition
- Existing user account.
Output
On Success API Response(application/JSON) would be :
{
user_regions: /*lists user enabled regions*/
}Error Cases
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - User disabled..
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- Account does not exist.
Example Request :Body (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/list_user_regions'
--data '{
"email":"e2reseller+1@idrivee2.com"
}' --header 'token: <your api key>' - Remove Region assigned to User
- Email [255]
- Storage_dn[128]
- User signed up.
- Storage should be assigned to the user.
- No bucket created by the user
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Storage does not exist.
{
error:{
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exists'
}
} - Storage not empty.
{
error:{
type: 'invalid_request_error',
code: 'storage_not_empty',
message: 'Storage not empty. To avoid user data loss, this request will not be
processed. To remove this storage, please disable the user first and try again'
}
}
- Account does not exist.
- Add Access Key
- User signed up/created and enabled.
- Storage DN assigned to the respective user.
- Buckets should not be empty if provided.
- Email [255]
- storage_dn[128]
- Name[64]
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Storage does not exist.
{
error:{
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exists'
}
} - User disabled.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- Account does not exist.
- List Access Keys
- email [255]
- storage_dn[128]
- User signed up/created and enabled.
- Storage assigned to the user.
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Storage does not exist.
{
error:{
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exist'
}
} - User disabled.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled '
}
}
- Account does not exist.
POST
https://api.idrivee2.com/api/reseller/v1/enable_user_regionClick to copyLink copied
This API enables the regions for the user.
Input
{
string email;
string region;
bool ssd_storage; // ssd_storage is an optional parameter;
}
region : region_key from list regions api. e.g "TX", "LDN" etc.
ssd_storage : set true to use SSD Storage for a specified region. SSD Storage availability for regions can be identified on ssd_storage from list regions api.
API returns the storage DN (domain name) for the enabled region through which user storage can be accessed using access key and secret key.
Length Parameters
Precondition
Output
On Success API Response(application/JSON) would be :
{ storage_added: true, storage_dn: /*user_storage_dns*/ }
Error Cases
Example Request :Body (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"region": "NY"
}
Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/enable_user_region'
--data '{
"email":"e2reseller+1@idrivee2.com",
"region": "NY"
}' --header 'token: <your api key>'
POST
https://api.idrivee2.com/api/reseller/v1/remove_user_regionClick to copyLink copied
This API removes a region assigned to the user.
Input
{
string email;
string storage_dn;
}
'storage_dn' is the storage domain assigned to the user you wish to be removed.
Length Parameters
Precondition
Please note this action will result in deletion of the user data.
API will allow you to remove user region if
User is in disabled state
Output
On Success API will return Response (JSON) :
{removed : true}
Error Cases
Example Request :Body (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test@idrivee2.com"
}
Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/remove_user_region'
--data '{
"email":"e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test@idrivee2.com"
}' --header 'token: <your api key>'
POST
https://api.idrivee2.com/api/reseller/v1/create_access_keyClick to copyLink copied
This API creates an Access Key for storage access and returns the Access Key ID and Secret Key.
Input
{
string email;
string storage_dn;
string name;
int permissions;
array buckets; //buckets is an optional parameter
}
Buckets: Provide a list of bucket names to create an access key for specified buckets to access storage. 'buckets' input is not required if access key is for all buckets.
Precondition
Length Parameters
Access Key Permissions Enumeration:
{
0: Read access
1: Write access
2: Read/Write access
}
Output
On Success API would return Response (application/JSON):
{
created: true,
data: {
access_key: /access key/
secret_key: /* secret key*/
}
}
Error Cases
Example Request :Body (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"storage_dn":"abcd.test@idrivee2.com",
"name":"myaccesskeyname",
"permissions":0
}
Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/create_access_key'
--data '{
"email":"e2reseller+1@idrivee2.com",
"storage_dn":"abcd.test@idrivee2.com",
"name":"myaccesskeyname",
"permissions":0
}' --header 'token: <your api key>'
POST
https://api.idrivee2.com/api/reseller/v1/list_access_keysClick to copyLink copied
This API lists all the Access Keys for the storage.
Input
{
string email;
string storage_dn;
}
'storage_dn' is the storage domain assigned to the user of which you wish to list all access keys
Length Parameters
Precondition
Output
On Success API would return Response(application/JSON) :
{
'storage_dn' : /*user_storage_dns*/,
'access_keys' : [
{
'key_id' : /*key_id*/,
'name' : /*key_name*/,
'creation_date' : /*date_of_key_creation*/,
'description' : /*description_of_access_key_permissions*/
},
{...},
…
]
}
Error Cases
Example Request : Body (application/JSON)
{
"email" : "e2reseller+1@idrivee2.com",
"storage_dn" : "abcd.test.idrivee2.com"
}
Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/list_access_keys'
--data '{
"email":"e2reseller+1@idrivee2.com",
"storage_dn":"abcd.test.idrivee2.com",
}' --header 'token:<your api key>'
POST
https://api.idrivee2.com/api/reseller/v1/remove_access_keyClick to copyLink copied
This API removes the Access Key for the storage.
Input
{
string email;
string storage_dn;
string access_key;
}
Length Parameters
- Email [255]
- storage_dn[128]
- access_key[128]
Precondition
- User signed up/created and enabled.
- Storage assigned to user.
- access key exists for the storage.
Output
On Success API would return Response(application/JSON) :
{removed : true}
Error Cases
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Storage does not exist.
{
error:{
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exists'
}
} - User disabled.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
} - Access key does not exist.
{
error:{
type: 'invalid_request_error',
code: 'access_key_non_existant',
message: 'Access key does not exist, please provide a valid access key'
}
}
- Account does not exist.
Example Request :Body (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"storage_dn":"abcd.test@idrivee2.com",
"access_key":"<ACCESS-KEY-ID>"
}
Curl Example Request:
curl --location --request POST 'https://api.idrivee2.com/api/reseller/v1/remove_access_key'
--data '{
"email":"e2reseller+1@idrivee2.com",
"storage_dn":"abcd.test@idrivee2.com",
"access_key":"<your access key>"
}' --header 'token: <your api key>'
Whitelabeling Operations
- Add CNAMEs
POST
https://api.idrivee2.com/api/reseller/v1/storage/cname/addClick to copyLink copied This API adds Cname for the specified storage dns.Input
{
string email;
string storage_dn;
string cname;
string public_key;
string private_key;
string file_index;
}'storage_dn' is the storage domain assigned to the user.
'cname' is the new cname needs to be assigned.
'file_index' is an optional parameter.
Length Parameters
- email[255]
- storage_dn[128]
- cname[128]
- public_key[10000]
- private_key[6000]
- file_index[64]
Precondition
- User signed up/created and enabled.
- Storage assigned to the user.
Output
On Success API would return Response(application/JSON) :
{ 'cname_added' : true }
Error Cases
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - CNAME cannot be used
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'this CNAME cannot be used, please try changing your CNAME'
}
} - Storage Domain does not existIf storage_ dns is wrong
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - If CNAMEcname already configured
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'CNAME already configure'
}
} - Invalid CNAME or CertificatesIf public private keys are wrong
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Could not verify CNAME or certificates. Please try again'
}
}
- Account does not exist.
- Server Error (HTTP 500)
- Unable to process this request
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - Data not found for given dns
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- Unable to process this request
Example Request : Body (application/JSON)
{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
"cname" : "example.mycloud.io",
"public_key" : "...",
"private_key" : "...",
"file_index" : "1"
}Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/storage/cname'
--data'{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
"cname" : "example.mycloud.io",
"public_key" : "...",
"private_key" : "...",
"file_index" : "1"
}'--header 'token:<your api key>' - List CNAMEs
POST
https://api.idrivee2.com/api/reseller/v1/storage/cnameClick to copyLink copied This API lists all the Cnames for the storage.Input
{
string email;
string storage_dn;
}'storage_dn' is the storage domain assigned to the user of which you wish to list all CNAMEs
Length Parameters
- email[255]
- storage_dn[128]
Precondition
- User signed up/created and enabled.
- Storage assigned to the user.
Output
On Success API would return Response(application/JSON) :
{
'cname_list' : [
{
file_index: /*file_index*/,
cname: /*cname*/,
certificate_info: /*isValidSsl.certInfo*/
creation_date: /*creation_date*/
}
{...},
]
}
Error Cases
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - User disabled.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- Account does not exist.
- Server Error (HTTP 500)
- Unable to process this request
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - Data not found for given dns
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- Unable to process this request
Example Request : Body (application/JSON)
{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
}Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/storage/cname'
--data'{
email: "e2reseller+1@idrivee2.com",
storage_dn: abcd.test.idrivee2.com,
}'--header 'token:<your api key>' - Update CNAMEs
POST
https://api.idrivee2.com/api/reseller/v1/remove_access_keyClick to copyLink copied This API updates Cname for the specified storage dns.Input
{
string region_key;
string email;
string storage_dn;
string cname;
string public_key;
string private_key;
string file_index;
}'storage_dn' is the storage domain assigned to the user.
'cname' is the new cname that needs to be replaced with the already existing cname.
'file_index is an optional parameter.
Length Parameters
- email[255]
- storage_dn[128]
- cname[128]
- public_key[10000]
- private_key[6000]
- file_index[64]
Precondition
- User signed up/created and enabled.
- Storage assigned to the user.
Output
On Success API would return Response(application/JSON) :
{ 'cname_updated' : true }
Error Cases
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - CNAME cannot be usedIf cname is idrive domain
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'this CNAME cannot be used, please try changing your CNAME'
}
} - Storage Domain does not existIf storage_ dns is wrong
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - If storage_dn is wrong
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - Storage server cannot be reachedDomain does not existIf storage _dns is unavailable
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Storage server cannot be reached right now, please try again later'
}
} - If CNAMEcname already configured
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'CNAME already configured'
}
} - Invalid CNAME or CertificatesIf public private keys are wrong
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Could not verify CNAME or certificates. Please try again'
}
} - User disabled
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- Account does not exist.
- Server Error (HTTP 500)
- Unable to process this request
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - Data not found for given dns
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- Unable to process this request
Example Request : Body (application/JSON)
{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
"cname" : "example.mycloud.io",
"public_key" : "...",
"private_key" : "...",
"file_index" : "1"
}Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/storage/cname/update
--data'{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
"cname" : "example.mycloud.io",
"public_key" : "...",
"private_key" : "...",
"file_index" : "1"
}'--header 'token:<your api key>' - Remove CNAMEs
POST
https://api.idrivee2.com/api/reseller/v1/storage/cname/removeClick to copyLink copied This API removes CNAME for the storage dns.Input
{
string email;
string storage_dn;
string cname;
}'storage_dn' is the storage domain assigned to the user.
cname: provide cname which needs to be removed.
Length Parameters
- email[255]
- storage_dn[128]
- cname[128]
Precondition
- User signed up/created and enabled.
- Storage assigned to the user.
- Cname should be mapped to the storage domain.
Output
On Success API would return Response(application/JSON) :
{ 'cname_removed' : true }
Error Cases
- Invalid Request (HTTP 403)
- Account does not exist.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - User disabled
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
} - CNAME cannot be used
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'this CNAME cannot be used, please try changing your CNAME'
}
} - Storage Domain does not exist
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - Storage server cannot be reached
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Storage server cannot be reached right now, please try again later'
}
} - CNAME does not exist for the storage domain
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'cannot get cname details'
}
} - Failed to remove CNAMECannot remove Cname
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
}
- Account does not exist.
- Server Error (HTTP 500)
- Unable to process this request
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - Data not found for given dns
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- Unable to process this request
Example Request : Body (application/JSON)
{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
"cname" : "example.mycloud.io"
}Curl Example Request:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/storage/cname/remove
--data'{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
"cname" : "example.mycloud.io"
}'--header 'token:<your api key>'