Raccolta API Reseller
L'API Reseller IDrive® e2 è sviluppata su architettura REST.
L'API Reseller IDrive® e2 accetta i corpi delle richieste nel formato di tipo di contenuto 'application/JSON' e restituisce risposte 'application/JSON'.
La nostra API utilizza il meccanismo di autenticazione tramite chiave API. Puoi generare la chiave API dalla sezione profilo dell'account IDrive® e2.
Aggiungi la chiave API generata dalla sezione profilo all'intestazione di tutte le chiamate API HTTP con la chiave 'token'.
Codici di risposta HTTP:
- 200 (Successo)
- 500 (Errore del server)
- 400 (Parametri non validi)
- 401 (Non autorizzato)
- 403 (Richiesta non valida)
Il corpo della risposta di errore avrà la seguente struttura:
Response (application/JSON) : {
error : {
string type;
string code;
string message;
}
}
I valori possibili per 'error.type' sono:
Per ulteriori dettagli, 'error.code' e 'error.message' spiegheranno cosa è andato storto.
Casi di errore comuni
Di seguito sono riportati i casi di errore comuni che possono essere restituiti da tutte le API descritte di seguito. Gli altri casi di errore saranno documentati con le API specifiche.
- Errore del server (HTTP 500)
Response (application/JSON) : {
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Impossibile elaborare questa richiesta, riprova più tardi'
}
} - Non autorizzato (HTTP 401)
Response (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'unauthorized',
message: 'Intestazione di autenticazione mancante/non valida'
}
} - Parametri non validi (HTTP 400)
Response (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'invalid_parameters',
message: 'Valori dei parametri non validi, controlla gli errori per i dettagli',
errors: [] (array contenente i dettagli dell'errore)
}
}
Chiave API intestazione AUTHORIZATION
| Chiave | token |
| Valore | <YOUR-API-KEY> |
Le enumerazioni utilizzate in tutte le API sono:
Enumerazioni:
Permessi chiave di accesso:
{
0: Accesso in lettura,
1: Accesso in scrittura,
2: Accesso in lettura/scrittura
}
Operazioni Utente
- Elenca tutti gli utenti
GET
https://api.idrivee2.com/api/reseller/v1/users
Clicca per copiareLink copiato
Visualizza tutti gli utenti aggiunti nel tuo profilo.
Puoi filtrare facoltativamente gli utenti per email utilizzando un parametro di query.
Parametri di query (facoltativi):
string email;
Filtra gli utenti per corrispondenza esatta dell'email. Il parametro email deve essere codificato nell'URL.
Output
L'API restituisce un array degli utenti aggiunti nel tuo profilo.
La struttura della risposta è la seguente: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;
} - Invita utente
- Quota (GB) (0 per illimitato altrimenti >0)
- Email [255]
- Richiesta non valida (HTTP-403)
- L'utente esiste già ed è collegato al tuo account.
{
error:{
type: 'invalid_request_error',
code: 'user_signed_up',
message: 'Utente già registrato'
}
} - Email già in uso (esiste un account indipendente non collegato al tuo account).
{
error:{
type: 'invalid_request_error',
code: 'email_already_in_use',
message: 'Email già in uso'
}
}
- Numero massimo di sotto-account già invitati/registrati.
{
error:{
type: 'invalid_request_error',
code: 'maximum_limit_reached',
message: 'Limite massimo raggiunto. Contattare il supporto.
}
}
- L'utente esiste già ed è collegato al tuo account.
- Crea Utente
- Quota (GB) (0 per illimitato, altrimenti >0)
- La password è una stringa codificata in base64.
- email_notification Se fornito e impostato su false, nessuna notifica email verrà inviata all'indirizzo email specificato.
- Email [255]
- Password [100]
- Nome [64]
- Cognome [64]
- Richiesta non valida (HTTP-403)
- L'utente esiste già ed è collegato al tuo account.
{
error:{
type: 'invalid_request_error',
code: 'user_signed_up',
message : 'User already signed up'
}
} -
Email già in uso (esiste un account indipendente non collegato al tuo account).
{
error:{
type: 'invalid_request_error',
code: 'email_already_in_use',
message: 'Email already in use'
}
}
- L'utente esiste già ed è collegato al tuo account.
- Modifica Utente
- email (string, obbligatorio)
Indirizzo email dell'utente da aggiornare - quota (int, opzionale)
- Quota di archiviazione in GB
Quota (GB) (0 per illimitato, altrimenti >0) - email_notification (bool, opzionale)
Se impostato su false, le notifiche email non verranno inviate all'utente - Richiesta non valida (HTTP-403)
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message : "Account with this email does not exist'
}
} -
Non consentito (Tentativo di aggiornamento non valido)
{
error:{
type: 'invalid_request_error',
code: 'not_allowed',
message: 'This operation is not allowed. Please contact support.'
}
} - email_notification può essere modificato solo per gli utenti registrati e gli utenti non gestiti
- L'aggiornamento di email_notification per utenti gestiti o non registrati restituirà un errore not_allowed
- quota può essere aggiornata per tutti gli utenti
- Disabilita utente
- Email [255]
- Utente registrato.
- Account abilitato.
- Richiesta non valida (HTTP 403)
- Account già disabilitato.
error:{
type: 'invalid_request_error',
code: 'user_account_already_disabled',
message: 'Account already disabled for the user'
}
} - L'account non esiste.
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
- Account già disabilitato.
- Abilita utente
- Email [255]
- Utente registrato/creato.
- L'account utente era stato precedentemente disabilitato.
- Richiesta non valida (HTTP 403)
- L'account non esiste.
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Account già abilitato.
error:{
type: 'invalid_request_error',
code: 'user_account_already_enabled',
message: 'Account already enabled for the user'
}
}
- L'account non esiste.
- Rimuovi utente
- Email [255]
- L'utente deve essere disabilitato.
- Richiesta non valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message:'Account with this email does not exist'
}
} - Account non disabilitato.
{
error:{
type: 'invalid_request_error',
code: 'user_account_not_disabled',
message: 'User account not disabled'
}
}
- L'account non esiste.
- Annulla Invito
- Email [255]
- Invite Not Removed
Occurs when the provided email is invalid, already signed up, or not associated with the reseller’s account.
Response
{
"user_removed": false
} - Request Processing Failed
Occurs when the API request is invalid or cannot be processed.
Response
{
"message": "Request processing failed"
} - Reimpostazione Password
- Email [255]
- Se il sottouttente non esiste
Risposta (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Se il sottouttente non è registrato
Risposta (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'user_not_signed_up',
message: 'Subuser is not signed up'
}
} - Se il sottouttente è gestito
Risposta (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'not_allowed',
message: 'This operation is not allowed. Please contact support.',
}
} - Ottieni utilizzo dello storage
- Email [255]
- L'utente deve essere registrato.
- Richiesta non valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
- L'account non esiste.
- Ottieni registri attività
- Email [255]
- L'account non esiste.
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
Nota:
storage_used (byte)
storage_quota (GB) (0 : illimitato altrimenti > 0)
invite_url se non nullo può essere utilizzato dall'utente invitato per registrarsi
Esempi di richieste:
GET /api/reseller/v1/users
GET /api/reseller/v1/users?email=user%40example.com
Esempio di richiesta Curl:
Recupera tutti gli utenti:
curl --request GET 'https://api.idrivee2.com/api/reseller/v1/users' --header 'token: <your api key>'
Recupera utente per email:
curl --request GET 'https://api.idrivee2.com/api/reseller/v1/users?email=user%40example.com'' --header 'token: <your api key>'
PUT
https://api.idrivee2.com/api/reseller/v1/invite
Clicca per copiareLink copiato
Questa API inviterà un account utente su IDrive® e2 che sarà collegato al tuo account. Questa API non invierà alcuna email, ma sarai tu responsabile della condivisione dell'URL con l'utente
Input
string email;
int quota; //facoltativo
Nota:
Parametri di lunghezza
Output
In caso di successo la risposta API (application/JSON) sarà:
{ email: abc@example.com, invite_url: signup_invite_url_response }
Casi di errore
Esempio di Richiesta: Corpo (application/JSON)
{
"email": "e2reseller+1@idrivee2.com,"
"quota": 1024
}
Esempio di Richiesta Curl:
curl --request PUT 'https://api.idrivee2.com/api/reseller/v1/invite'
--data '{
"email": "e2reseller+1@idrivee2.com",
"quota": 1024
}' --header 'token: <la tua chiave api>'
PUT
https://api.idrivee2.com/api/reseller/v1/create_user
Clicca per copiareLink copiato
Questa API creerà un account utente su IDrive® e2 che sarà collegato al tuo account.
Input
string email;
string password; //stringa codificata in base64
string first_name;
string last_name; //last_name è un parametro opzionale
int quota;
bool email_notification; //email_notification è un parametro opzionale
Nota:
Parametri di Lunghezza
Output
In caso di successo, la risposta API (application/JSON) sarà:
{ user_created: true }
Casi di Errore
Esempio di Richiesta: Corpo (application/JSON)
{
"email": "e2reseller+1@idrivee2.com",
"password":"dGVzdDEyMw==",
"first_name":"dev",
"quota": 1024,
"email_notification": false
}
Esempio di Richiesta Curl:
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: <la tua chiave api>'
POST
https://api.idrivee2.com/api/reseller/v1/edit_user
Clicca per copiareLink copiato
Questa API consente di aggiornare un account utente esistente collegato al tuo account rivenditore.
Input
string email; // obbligatorio
int quota; // 0 = illimitato, >0 = GB
bool email_notification; //opzionale
Parametri
Output
In caso di successo la risposta API (application/JSON) sarà:
{ user_updated: true }
Casi di errore
Esempio di richiesta: corpo (application/JSON)
{
"email": "shane@idrive.com",
"quota": 12,
"email_notification": true
}
Esempio di richiesta Curl:
curl --request POST
'https://api.idrivee2.com/api/reseller/v1/edit_user' \
--header 'Content-Type: application/json' \
--header 'token: <your_api_key>' \
--data '{
"email":"shane@idrive.com",
"quota":"12",
"email_notification": true
}'
Nota:
POST
https://api.idrivee2.com/api/reseller/v1/disable_user
Clicca per copiareLink copiato
Questa API disabilita l'account utente. Gli utenti non potranno accedere, visualizzare i dati né eseguire alcuna operazione.
Input
string email;
Parametri di lunghezza
Precondizione
Output
In caso di successo la risposta API (application/JSON) sarà:
{ user_disabled : true }
Casi di errore
Esempio di richiesta: Corpo (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}
Esempio di richiesta Curl:
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_user
Clicca per copiareLink copiato
Questa API riabilita gli account utente disabilitati. Gli utenti possono accedere, visualizzare i dati ed eseguire operazioni normali.
Input
string email;
Parametri di lunghezza
Precondizione
Output
In caso di successo, la risposta API (application/JSON) sarà:
{ user_enabled : true }
Casi di errore
Esempio di richiesta: Corpo (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}
Esempio di richiesta Curl:
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_user
Clicca per copiareLink copiato
Questa API eliminerà definitivamente gli utenti da IDrive® e2.
Nota: I dati dell'utente andranno persi definitivamente eseguendo questa operazione.
Input
string email;
Parametri di lunghezza
Precondizione
Output
In caso di successo, la risposta API (JSON) sarà:
{ user_removed : true }
Casi di errore
Esempio di Richiesta: Corpo (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}
Esempio di Richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/remove_user'
--data '{
"email":"e2reseller+1@idrivee2.com"
}' --header 'token: <la tua chiave api>'
POST
https://api.idrivee2.com/api/reseller/v1/invite/cancel
Click to copyLink copied
Questa API annullerà l'account utente invitato su IDrive® e2 che sarà collegato al tuo account.
Input
string email;
Parametri di Lunghezza
Output
In caso di successo, la risposta API (application/JSON) sarà:
{ user_removed : true }
Casi di Errore
Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/invite/cancel'
--data '{
"email":"e2reseller+1@idrivee2.com"
}' --header 'token: <your api key>'
Ottieni il link per la reimpostazione della password del sottouttente
POST
https://api.idrivee2.com/api/reseller/v1/subuser/reset_password_link
Clicca per copiareLink copiato
Questa API genera un link per la reimpostazione della password per un sottouttente reseller. Il link viene restituito nella risposta API con scadenza del token di 1 ora.
Input
string email;
Nota:
"email" - l'indirizzo email del sottouttente per cui si desidera generare il link di reimpostazione della password. Il sottouttente deve appartenere al reseller richiedente ed essere registrato ma non gestito.
Output
In caso di successo la risposta API (application/JSON) sarà:
{
"reset_link": "https://domain.com/change_password?link=&expire_session=true&type=0",
"email": "subuser@example.com"
}
Parametri di lunghezza
Errore di autenticazione per chiave API non valida
Risposta (application/JSON) : {
error:{
type: 'authentication_error',
code: 'unauthorized',
message: 'Authentication header missing/invalid',
}
}
Esempio di richiesta: Corpo (application/JSON)
{
"email":"subuser@example.com",
}
Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/subuser/reset_password_link'
--data '{
"email":"subuser@example.com"
}' --header 'token: <your api key>'
POST
https://api.idrivee2.com/api/reseller/v1/usage_stats
Clicca per copiareLink copiato
Questa API restituisce l'array di utilizzo di IDrive® e2 per l'utente fornito.
Input
{
string email;
string date_from;
string date_to;
}
date_from(ISO8601)(data di inizio)
date_to(ISO8601) (data di fine)
Parametri di lunghezza
Precondizioni
Output
Array della struttura usage_stats
struct usage_stats{
double downloads;
double uploads;
double disk_used;
string date;
}
downloads, uploads, disk_used sono in byte
Casi di errore
Esempio di richiesta: Corpo (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"date_to":"2022-08-31",
"date_from":"2022-08-01"
}
Esempio di richiesta Curl:
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>'
POST
https://api.idrivee2.com/api/reseller/v1/user_activity_history
Clicca per copiareLink copiato
Questa API recupera i registri attività di un utente per un intervallo di date.
Input
string email;
string start_date;
string end_date;
int page_no;
Parametri di lunghezza
Nota
start_date (ISO8601) - Data di inizio
end_date (ISO8601) - Data di fine
page_no - L'API è paginata con ogni pagina composta da 200 record
e page_no inizia da 1 in poi
Output
In caso di successo la risposta API (application/JSON) sarà:
struct response {
List[] logs;
struct pagination;
}
struct logs {
string timestamp;
string description;
string ip;
}
struct pagination {
int total_records;
int page_no;
int records_per_page;
}
Caso di errore specifico
Esempio di richiesta: Corpo (application/JSON)
{
"email": "abc1@example.com",
"start_date": "2025-04-05",
"end_date": "2025-05-28",
"page_no": 1
}
Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/user_activity_history'
--data '{
"email": "abc1@example.com",
"start_date": "2025-04-05",
"end_date": "2025-05-28",
"page_no": 1
}' --header 'token: <la tua chiave api>'
Operazioni di archiviazione
- Elenca regioni
GET
https://api.idrivee2.com/api/reseller/v1/regions
Clicca per copiareLink copiato
Questa API restituisce un array di regioni per IDrive® e2.
Output
struct regions{
string region_key;
string region_name;
string country;
string region_code;
bool active;
bool hdd_storage;
string cors;
}Nota: Solo le regioni attive possono essere abilitate per l'utente.
Esempio di richiesta: Elenca regioni
curl --request GET 'https://api.idrivee2.com/api/reseller/v1/regions' --header 'token: <la tua chiave api>' - Abilita regione per utente
- Email [255]
- Regione [5]
- Account utente esistente.
- La regione non deve essere già abilitata per l'utente.
- Richiesta non valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - La regione di archiviazione è già abilitata per l'utente.
{
error:{
type: 'invalid_request_error',
code: 'region_already_enabled',
message: 'Storage region already enabled for user'
}
} - Utente disabilitato.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
} - Il pagamento per il tuo account non è andato a buon fine.
{
error:{
type: 'invalid_request_error',
code: 'payment_failed',
message: 'Account expired please update payment info'
}
}
- L'account non esiste.
- Elenca le regioni abilitate per l'utente
POST
https://api.idrivee2.com/api/reseller/v1/list_user_regions
Clicca per copiareLink copiato
Questa API elenca tutte le regioni abilitate dell'utente.
Input
{
string email;
}Parametri di lunghezza
- Email [255]
Precondizione
- Account utente esistente.
Output
In caso di successo la risposta API (application/JSON) sarà:
{
user_regions: /*elenca le regioni abilitate dell'utente*/
}Casi di errore
- Richiesta non valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Utente disabilitato.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- L'account non esiste.
Esempio di richiesta: Corpo (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/list_user_regions'
--data '{
"email":"e2reseller+1@idrivee2.com"
}' --header 'token: <la tua chiave api>' - Rimuovi la regione assegnata all'utente
- Email [255]
- Storage_dn[128]
- Utente registrato.
- Lo storage deve essere assegnato all'utente.
- Nessun bucket creato dall'utente
- Richiesta non valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Lo storage non esiste.
{
error:{
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exists'
}
} - Lo storage non è vuoto.
{
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'
}
}
- L'account non esiste.
- Aggiorna le impostazioni cors per la regione utente
- Richiesta non valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Lo storage non esiste.
{
error:{
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exists'
}
} - Parametri cors non validi.
{
error:{
type: 'invalid_request_error',
code: 'invalid_cors_policy',
message: 'The cors policy is invalid' / 'Maximum 10 cors are allowed'
}
}
- L'account non esiste.
- Aggiungi Chiave di Accesso
- Utente registrato/creato e abilitato.
- Storage DN assegnato al rispettivo utente.
- I bucket non devono essere vuoti se forniti.
- Email [255]
- storage_dn[128]
- Name[64]
- Richiesta Non Valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Lo storage non esiste.
{
error:{
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exists'
}
} - Utente disabilitato.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- L'account non esiste.
- Elenca Chiavi di Accesso
- email [255]
- storage_dn[128]
- Utente registrato/creato e abilitato.
- Storage assegnato all'utente.
- Richiesta Non Valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Lo storage non esiste.
{
error:{
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exist'
}
} - Utente disabilitato.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled '
}
}
- L'account non esiste.
POST
https://api.idrivee2.com/api/reseller/v1/enable_user_region
Clicca per copiareLink copiato
Questa API abilita le regioni per l'utente.
Input
{
string email;
string region;
}
region : region_key dall'API elenco regioni. es. "TX", "LDN" ecc.
L'API restituisce il DN di archiviazione (nome di dominio) per la regione abilitata, tramite il quale è possibile accedere all'archiviazione utente utilizzando la chiave di accesso e la chiave segreta.
Parametri di lunghezza
Precondizione
Output
In caso di successo, la risposta API (application/JSON) sarà:
{ storage_added: true, storage_dn: /*user_storage_dns*/ }
Casi di errore
Esempio di richiesta: Corpo (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"region": "NY"
}
Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/enable_user_region'
--data '{
"email":"e2reseller+1@idrivee2.com",
"region": "NY"
}' --header 'token: <la tua chiave api>'
POST
https://api.idrivee2.com/api/reseller/v1/remove_user_region
Clicca per copiareLink copiato
Questa API rimuove una regione assegnata all'utente.
Input
{
string email;
string storage_dn;
}
'storage_dn' è il dominio di archiviazione assegnato all'utente che si desidera rimuovere.
Parametri di lunghezza
Precondizione
Si prega di notare che questa azione comporterà l'eliminazione dei dati dell'utente.
L'API consentirà di rimuovere la regione utente se
L'utente è in stato disabilitato
Output
In caso di successo l'API restituirà una risposta (JSON):
{removed : true}
Casi di errore
Esempio di Richiesta: Corpo (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test@idrivee2.com"
}
Esempio di Richiesta Curl:
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: <la tua chiave api>'
Metodo: POST
URL: https://api.idrivee2.com/api/reseller/v1/storage/set_cors
Clicca per copiareLink copiato
Questa API aggiornerà le impostazioni cors per una regione.
Tipo di contenuto: application/json
Chiave API dell'intestazione:
'token': <il tuo token>
Parametro richiesto:
body : {
"email": "test@test.com",
"storage_dn": "cxan.tx21.edgedrive.com",
"cors": "test1.com,test2.com,test3.com",
}
Parametri richiesti: email,storage_dn,cors
Limiti sulla lunghezza dei parametri: email[255],storage_dn[128], cors (fino a 10 domini separati da virgola)
NOTA: Per tutti i cors puoi impostare cors su "*" che è anche il cors predefinito su tutte le regioni
Output
In caso di successo, l'API restituirà la risposta (application/JSON):
{
cors_updated: true
}
Casi di errore
Esempio di richiesta Curl:
curl --location --request POST
https://api.idrivee2.com/api/reseller/v1/storage/set_cors\
--header 'token: <your token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"email":"test@test.com",
"storage_dn":"cxan.tx21.edgedrive.com",
"cors":"test1.com,test2.com,test3.com",
}'
POST
https://api.idrivee2.com/api/reseller/v1/create_access_key
Clicca per copiareLink copiato
Questa API crea una Chiave di Accesso per l'accesso allo storage e restituisce l'ID della Chiave di Accesso e la Chiave Segreta.
Input
{
string email;
string storage_dn;
string name;
int permissions;
array buckets; //buckets è un parametro opzionale
}
Buckets: Fornire un elenco di nomi di bucket per creare una chiave di accesso per bucket specifici e accedere allo storage. L'input 'buckets' non è richiesto se la chiave di accesso è per tutti i bucket.
Precondizione
Parametri di Lunghezza
Enumerazione Permessi Chiave di Accesso:
{
0: Accesso in lettura
1: Accesso in scrittura
2: Accesso in lettura/scrittura
}
Output
In caso di successo, l'API restituirà una risposta (application/JSON):
{
created: true,
data: {
access_key: /chiave di accesso/
secret_key: /* chiave segreta*/
}
}
Casi di Errore
Esempio di Richiesta: Corpo (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"storage_dn":"abcd.test@idrivee2.com",
"name":"myaccesskeyname",
"permissions":0
}
Esempio di Richiesta Curl:
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_keys
Clicca per copiareLink copiato
Questa API elenca tutte le Chiavi di Accesso per lo storage.
Input
{
string email;
string storage_dn;
}
'storage_dn' è il dominio dello storage assegnato all'utente di cui si desidera elencare tutte le chiavi di accesso
Parametri di Lunghezza
Precondizione
Output
In caso di successo, l'API restituirà una Risposta (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*/
},
{...},
…
]
}
Casi di Errore
Esempio di richiesta: Body (application/JSON)
{
"email" : "e2reseller+1@idrivee2.com",
"storage_dn" : "abcd.test.idrivee2.com"
}
Esempio di richiesta Curl:
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_key
Clicca per copiareLink copiato
Questa API rimuove la chiave di accesso per lo storage.
Input
{
string email;
string storage_dn;
string access_key;
}
Parametri di lunghezza
- Email [255]
- storage_dn[128]
- access_key[128]
Precondizione
- Utente registrato/creato e abilitato.
- Storage assegnato all'utente.
- La chiave di accesso esiste per lo storage.
Output
In caso di successo, l'API restituirà la risposta (application/JSON):
{removed : true}
Casi di errore
- Richiesta non valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Lo storage non esiste.
{
error:{
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exists'
}
} - Utente disabilitato.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
} - La chiave di accesso non esiste.
{
error:{
type: 'invalid_request_error',
code: 'access_key_non_existant',
message: 'Access key does not exist, please provide a valid access key'
}
}
- L'account non esiste.
Esempio di Richiesta: Corpo (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"storage_dn":"abcd.test@idrivee2.com",
"access_key":"<ACCESS-KEY-ID>"
}
Esempio di Richiesta Curl:
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":"<la tua chiave di accesso>"
}' --header 'token: <la tua chiave API>'
Operazioni di Whitelabeling
- Aggiungi CNAME
POST
https://api.idrivee2.com/api/reseller/v1/storage/cname/add
Clicca per copiareLink copiato
Questa API aggiunge un CNAME per il dns di archiviazione specificato.
Input
{
string email;
string storage_dn;
string cname;
string public_key;
string private_key;
string file_index;
string passphrase; // opzionale, da inviare solo in caso di chiave privata crittografata
}'storage_dn' è il dominio di archiviazione assegnato all'utente.
'CNAME' è il nuovo CNAME da assegnare.
'file_index' è un parametro opzionale.
Parametri di Lunghezza
- email[255]
- storage_dn[128]
- CNAME[128]
- public_key[10000]
- private_key[6000]
- file_index[64]
- passphrase[255]
Precondizione
- Utente registrato/creato e abilitato.
- Archiviazione assegnata all'utente.
- Il storage_dn deve essere l'endpoint tenant ottenuto dall'API Elenca Regioni Abilitate Utente.
Output
In caso di successo, l'API restituirà una Risposta (application/JSON):
{ 'cname_added' : true }Casi di Errore
- Richiesta Non Valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Il CNAME non può essere utilizzato
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'this CNAME cannot be used, please try changing your CNAME'
}
} - Il dominio di archiviazione non esiste - Se storage_dns non è corretto
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - Se il CNAME è già configurato
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'CNAME already configure'
}
} - CNAME o certificati non validi - Se le chiavi pubbliche/private sono errate
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Could not verify CNAME or certificates. Please try again'
}
}
- L'account non esiste.
- Errore del Server (HTTP 500)
- Impossibile elaborare questa richiesta
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - Dati non trovati per il dns specificato
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- Impossibile elaborare questa richiesta
Esempio di richiesta: 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"
}Esempio di richiesta Curl:
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:<la tua chiave api>' - Elenca CNAME
POST
https://api.idrivee2.com/api/reseller/v1/storage/cname
Clicca per copiareLink copiato
Questa API elenca tutti i CNAME per lo storage.
Input
{
string email;
string storage_dn;
}'storage_dn' è il dominio di storage assegnato all'utente di cui si desidera elencare tutti i CNAME
Parametri di lunghezza
- email[255]
- storage_dn[128]
Precondizione
- Utente registrato/creato e abilitato.
- Storage assegnato all'utente.
- Lo storage_dn deve essere l'endpoint tenant ottenuto dall'API Elenca Regioni Abilitate Utente.
Output
In caso di successo l'API restituirà una risposta (application/JSON):
{
'cname_list' : [
{
file_index: /*file_index*/,
cname: /*cname*/,
certificate_info: /*isValidSsl.certInfo*/
creation_date: /*creation_date*/
}
{...},
]
}
Casi di Errore
- Richiesta Non Valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Utente disabilitato.
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- L'account non esiste.
- Errore del Server (HTTP 500)
- Impossibile elaborare questa richiesta
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - Dati non trovati per il dns specificato
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- Impossibile elaborare questa richiesta
Esempio di Richiesta: Corpo (application/JSON)
{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
}Esempio di Richiesta Curl:
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>' - Aggiorna CNAME
POST
https://api.idrivee2.com/api/reseller/v1/storage/cname/update
Clicca per copiareLink copiato
Questa API aggiorna il CNAME per il DNS di archiviazione specificato.
Input
{
string region_key;
string email;
string storage_dn;
string cname;
string public_key;
string private_key;
string file_index;
string passphrase; // facoltativo, da inviare solo in caso di chiave privata cifrata
}'storage_dn' è il dominio di archiviazione assegnato all'utente.
'CNAME' è il nuovo CNAME che deve sostituire il CNAME già esistente.
'file_index' è un parametro facoltativo.
Parametri di Lunghezza
- email[255]
- storage_dn[128]
- CNAME[128]
- public_key[10000]
- private_key[6000]
- file_index[64]
- passphrase[255]
Precondizione
- Utente registrato/creato e abilitato.
- Archiviazione assegnata all'utente.
- Il storage_dn deve essere l'endpoint tenant ottenuto dall'API Elenca Regioni Abilitate Utente.
Output
In caso di successo, l'API restituirà una Risposta (application/JSON):
{ 'cname_updated' : true }Casi di Errore
- Richiesta Non Valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - CNAME non può essere utilizzatoSe il CNAME è un dominio idrive
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'this CNAME cannot be used, please try changing your CNAME'
}
} - Il dominio di archiviazione non esisteSe storage_dns è errato
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - Se storage_dn è errato
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - Il server di archiviazione non è raggiungibileDominio non esisteSe storage_dns non è disponibile
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Storage server cannot be reached right now, please try again later'
}
} - Se il CNAME è già configurato
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'CNAME already configured'
}
} - CNAME o Certificati Non ValidiSe le chiavi pubbliche/private sono errate
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Could not verify CNAME or certificates. Please try again'
}
} - Utente disabilitato
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- L'account non esiste.
- Errore del Server (HTTP 500)
- Impossibile elaborare questa richiesta
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - Dati non trovati per il dns specificato
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- Impossibile elaborare questa richiesta
Esempio di Richiesta: Corpo (application/JSON)
{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
"cname" : "example.mycloud.io",
"public_key" : "...",
"private_key" : "...",
"file_index" : "1"
}Esempio di Richiesta Curl:
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:<la tua chiave api>' - Rimuovi CNAME
POST
https://api.idrivee2.com/api/reseller/v1/storage/cname/remove
Clicca per copiareLink copiato
Questa API rimuove il CNAME per il dns di archiviazione.
Input
{
string email;
string storage_dn;
string cname;
}'storage_dn' è il dominio di archiviazione assegnato all'utente.
CNAME: fornire il CNAME da rimuovere.
Parametri di Lunghezza
- email[255]
- storage_dn[128]
- CNAME[128]
Precondizione
- Utente registrato/creato e abilitato.
- Archiviazione assegnata all'utente.
- Il CNAME deve essere mappato al dominio di archiviazione.
- Il storage_dn deve essere l'endpoint del tenant ottenuto dall'API Elenca Regioni Abilitate dell'Utente.
Output
In caso di successo l'API restituirà una Risposta (application/JSON):
{ 'cname_removed' : true }Casi di Errore
- Richiesta Non Valida (HTTP 403)
- L'account non esiste.
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Utente disabilitato
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
} - Il CNAME non può essere utilizzato
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'this CNAME cannot be used, please try changing your CNAME'
}
} - Il dominio di archiviazione non esiste
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - Il server di archiviazione non è raggiungibile
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Storage server cannot be reached right now, please try again later'
}
} - Il CNAME non esiste per il dominio di archiviazione
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'cannot get cname details'
}
} - Impossibile rimuovere il CNAME
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
}
- L'account non esiste.
- Errore del server (HTTP 500)
- Impossibile elaborare questa richiesta
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - Dati non trovati per il DNS specificato
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- Impossibile elaborare questa richiesta
Esempio di richiesta: Corpo (application/JSON)
{
"email": "e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test.idrivee2.com",
"cname" : "example.mycloud.io"
}Esempio di richiesta Curl:
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:<la tua chiave API>'
Operazioni Subuser
L'API Subuser di IDrive® e2 è supportata per gli account rivenditore. Un amministratore rivenditore può invocare queste API per conto di qualsiasi utente nel proprio account. In altre parole, l'amministratore rivenditore può utilizzare la propria chiave API per eseguire operazioni di gestione dei subuser per qualsiasi utente associato.
Per abilitare questa funzionalità, tutte le richieste API devono includere un parametro obbligatorio aggiuntivo: admin_email. Senza l'inclusione del parametro admin_email nel corpo della richiesta, le API non elaboreranno le richieste effettuate dagli account rivenditore.
Enum:
Permessi Subuser:
{
0: Accesso in lettura,
1: Accesso in scrittura,
2: Accesso in lettura/scrittura
}
- Invita subuser
PUT
https://api.idrivee2.com/api/subusers/v1/invite
Clicca per copiareLink copiato
Questa API invia un invito per la creazione di un account subuser all'email del subuser indicata nella richiesta.
Input
string subuser_email;
boolean disable_delete_object; // opzionale
int permissions;
boolean is_admin;
boolean sso_login; // opzionale
boolean allow_session_timeout_settings;
int idle_timeout;
boolean concurrent_sessions;
boolean allow_concurrent_session_settings;
Object[] storage_access; // opzionale
string admin_email;
Nota:
- "subuser_email" - l'indirizzo email del subuser a cui si desidera inviare l'invito
- "disable_delete_object" - un valore booleano che consente al subuser di eseguire l'eliminazione degli oggetti se impostato su false; il valore predefinito è true
- "pemissions" - un parametro enum in cui 0 = permesso di sola lettura, 1 = permesso di solo caricamento e 2 = permessi di lettura e scrittura
- "is_admin" - un valore booleano utilizzato per rendere il subuser un subuser amministratore se impostato su true. L'impostazione di questo flag su true concederà al subuser l'accesso completo allo spazio di archiviazione (lettura e scrittura).
- "sso_login" - un valore booleano che imposta se il login SSO è abilitato per il subuser o meno
- "allow_session_timeout_settings" - un valore booleano che consente al subuser di configurare le impostazioni di timeout della sessione se impostato su true
- "idle_timeout" - se l'utente amministratore desidera configurare il timeout della sessione (in secondi) per i subuser. Il valore massimo consentito è 3600 secondi (1 ora)
- "concurrent_sessions" - un valore booleano che consente al subuser di avere più sessioni simultanee se impostato su true
- "allow_concurrent_session_settings" - un valore booleano che consente al subuser di configurare le impostazioni per più sessioni simultanee se impostato su true
- "storage_access" - un array di oggetti di autorizzazione, se l'amministratore desidera che il subuser abbia accesso solo a bucket limitati. Ad esempio, se l'utente amministratore vuole che il subuser abbia accesso a "bucket1" e "bucket2" nella Regione di Chicago e a "bucket3" e "bucket4" nella Regione dell'Irlanda, l'amministratore deve impostare l'array storage_access come segue:
[
{
"storage_dn": "h4l1.ch.idrivee2-29.com", // Endpoint S3 della tua Regione di Chicago
"buckets": [
"bucket1", "bucket2"
]
},
{
"storage_dn": "r8l2.ie.idrivee2-44.com", // Endpoint S3 della tua Regione dell'Irlanda
"buckets": [
"bucket3", "bucket4"
]
}
]Si noti che "storage_access" è un parametro opzionale e deve essere inviato solo se l'utente amministratore desidera controllare l'accesso a livello di bucket per il subuser.
Output
On Success API Response (application/JSON) would be :
{
result: "invite successful",
invite_url: "invitation url string"
}Length Parameters
- email[255]
- Se si supera il limite del numero di sub-utenti consentiti per il proprio account
Response (application/JSON) :{
error: {
type: 'invalid_request_error',
code: 'maximum_limit_reached',
message: <informazioni sul proprio limite>
}
} -
Se sso_login viene inviato come true e SSO non è configurato
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'sso_not_configured',
message: 'SSO is not configured'
}
}Esempio di Richiesta: Corpo (application/JSON)
{
"subuser_email": "abc1@example.com",
"storage_access": [
{
"storage_dn": "h4l1.ch.idrivee2-29.com",
"buckets": [
"bucket1",
"bucket2"
]
},
{
"storage_dn": "r8l2.ie.idrivee2-44.com",
"buckets": [
"bucket3",
"bucket4"
]
}
],
"disable_delete_object": true,
"permissions": 0,
"is_admin": false,
"sso_login": false,
"allow_session_timeout_settings": false,
"idle_timeout": 300,
"concurrent_sessions": true,
"allow_concurrent_session_settings": false,
"admin_email": "abc@example.com"
}Richiesta di esempio Curl:
curl --request PUT 'https://api.idrivee2.com/api/subusers/v1/invite'
--data '{
"subuser_email": "abc1@example.com",
"storage_access": [
{
"storage_dn": "h4l1.ch.idrivee2-29.com",
"buckets": [
"bucket1",
"bucket2"
]
},
{
"storage_dn": "r8l2.ie.idrivee2-44.com",
"buckets": [
"bucket3",
"bucket4"
]
}
],
"disable_delete_object": true,
"permissions": 0,
"is_admin": false,
"sso_login": false,
"allow_session_timeout_settings": false,
"idle_timeout": 300,
"concurrent_sessions": true,
"allow_concurrent_session_settings": false,
"admin_email": "abc@example.com"
}' --header 'token: <your api key>' -
Elenca tutti i sottoutenti
POST
https://api.idrivee2.com/api/subusers/v1/list
Clicca per copiareLink copiato
Visualizza tutti i sottoutenti aggiunti al tuo profilo.
Input
string admin_email;
Output
L'API restituisce un array degli utenti aggiunti al tuo profilo.
La struttura della risposta è la seguente:struct response {
List users[];
}
struct users {
string email;
string first_name;
string last_name;
Object[] storage_access;
string account_creation_timestamp;
string invite_url;
bool is_admin;
bool signed_up;
int permissions;
bool disable_delete_object;
bool sso_login;
int idle_timeout;
bool concurrent_sessions;
bool allow_session_timeout_settings;
bool allow_concurrent_session_settings;
}Nota
I parametri dell'oggetto utente corrispondono ai parametri del corpo della richiesta spiegati nell'API di invito. Fare riferimento all'API di invito per ulteriori dettagli.Esempio di richiesta Curl
curl --request POST 'https://api.idrivee2.com/api/subusers/v1/list'
--data '{
"admin_email": "abc@example.com"
}'
--header 'token: <your api key>' -
Crea sottoutente
PUT
https://api.idrivee2.com/api/subusers/v1/create_account
Clicca per copiareLink copiato
Questo crea un account sottoutente che verrà collegato al tuo account.
Input
string subuser_email;
boolean disable_delete_object; // opzionale
int permissions;
boolean is_admin;
boolean sso_login; // opzionale
boolean allow_session_timeout_settings;
int idle_timeout;
boolean concurrent_sessions;
boolean allow_concurrent_session_settings;
Object[] storage_access; // opzionale
string admin_email;
string first_name;
string last_name; // opzionale
string password; // stringa codificata in base64
Nota
È possibile fare riferimento all'API di invito sottoutente per i dettagli sui parametri del corpo della richiesta.Parametri di lunghezza
- Email [255]
- Password [100]
- Nome [64]
- Cognome [64]
Output
In caso di successo, la risposta API (application/JSON) sarà:{ success: true }Caso di errore specifico
- Se si supera il limite del numero di sottoutenti consentiti per il proprio account
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'maximum_limit_reached',
message: 'information about your limit'
}
} - Lo storage non esiste.
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exist'
}
} - L'utente esiste già
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_already_signedup',
message: 'User signed up'
}
} -
Se sso_login viene inviato come true e SSO non è configurato
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'sso_not_configured',
message: 'SSO is not configured'
}
}
Esempio di richiesta: Corpo (application/JSON)
{
"subuser_email": "abc1@example.com",
"storage_access": [
{
"storage_dn": "h4l1.ch.idrivee2-29.com",
"buckets": [
"bucket1",
"bucket2"
]
},
{
"storage_dn": "r8l2.ie.idrivee2-44.com",
"buckets": [
"bucket3",
"bucket4"
]
}
],
"disable_delete_object": true,
"permissions": 0,
"is_admin": false,
"sso_login": false,
"allow_session_timeout_settings": false,
"idle_timeout": 300,
"concurrent_sessions": true,
"allow_concurrent_session_settings": false,
"first_name": "jack",
"last_name": "russell",
"password": "dGVzdDEyMw==",
"admin_email": “abc@example.com”
}
Esempio di richiesta Curl:
curl --request PUT 'https://api.idrivee2.com/api/subusers/v1/create_account'
--data '{
"subuser_email": "abc1@example.com",
"storage_access": [
{
"storage_dn": "h4l1.ch.idrivee2-29.com",
"buckets": [
"bucket1",
"bucket2"
]
},
{
"storage_dn": "r8l2.ie.idrivee2-44.com",
"buckets": [
"bucket3",
"bucket4"
]
}
],
"disable_delete_object": true,
"permissions": 0,
"is_admin": false,
"sso_login": false,
"allow_session_timeout_settings": false,
"idle_timeout": 300,
"concurrent_sessions": true,
"allow_concurrent_session_settings": false,
"first_name": "jack",
"last_name": "russell",
"password": "dGVzdDEyMw==",
"admin_email": “abc@example.com”
}' --header 'token: <your api key>' - Disabilita subuser
POST
https://api.idrivee2.com/api/subusers/v1/disable
Click to copyLink copied
Questa API disabilita l'account subuser. I subuser non potranno accedere, accedere ai dati ed eseguire operazioni.
Input
string subuser_email;
string admin_email;
bool email_notification; // la notifica email al subuser verrà inviata solo se questo parametro è impostato su true
Parametri di lunghezza
- Email [255]
Precondizione
- Utente registrato.
- Account abilitato.
Output
In caso di successo la risposta API (application/JSON) sarà:{ success: true }Casi di errore specifici
- Se il subuser non è registrato
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_not_signed_up',
message: 'Il subuser non è registrato'
}
} - Se l'account subuser è già disabilitato
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_account_already_disabled',
message: 'Account già disabilitato per l'utente'
}
} - L'account non esiste
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
Esempio di richiesta: Corpo (application/JSON)
{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com",
"email_notification": true
}Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/subusers/v1/disable'
--data '{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com",
"email_notification": true
}' --header 'token: <your api key>' - Abilita subuser
POST
https://api.idrivee2.com/api/subusers/v1/enable
Click to copyLink copied
Questa API riabilita gli account subuser disabilitati. Dopo l'abilitazione, i subuser possono accedere, consultare i dati ed eseguire le normali operazioni.
Input
string subuser_email;
string admin_email;
bool email_notification; // email notification to the subuser will be sent only if this parameter is set to true
Output
In caso di successo, la risposta API (application/JSON) sarà:{ success: true }Parametri di lunghezza
- Email [255]
Prerequisiti
- User signed up/created.
- User account was disabled previously.
Casi di errore specifici
- Se il subuser non è registrato
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_not_signed_up',
message: 'Subuser is not signed up'
}
} - Se l'account del subuser è già abilitato
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_account_already_enabled',
message: 'Account already enabled for the user'
}
} - L'account non esiste.
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
Esempio di richiesta: Corpo (application/JSON)
{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com",
"email_notification": true
}Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/subusers/v1/enable'
--data '{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com",
"email_notification": true
}' --header 'token: <your api key>' - Rimuovi subuser
POST
https://api.idrivee2.com/api/subusers/v1/remove
Click to copyLink copied
Questa API eliminerà permanentemente gli utenti da IDrive® e2.
Nota: I dati dell'utente andranno persi in modo permanente eseguendo questa operazione.Input
string subuser_email;
string admin_email;
bool email_notification; // email notification to the subuser will be sent only if this parameter is set to true
Parametri di lunghezza
- Email [255]
Precondizione
- L'utente deve essere disabilitato.
Output
In caso di successo la risposta API (application/JSON) sarà:{ success: true }Parametri di lunghezza
- Email [255]
Casi di errore specifici
- Se il subuser non è registrato
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_not_signed_up',
message: 'Il subuser non è registrato'
} } - Se l'account del subuser non è disabilitato
Response (application/JSON) : { error: {
type: 'invalid_request_error',
code: 'user_account_not_disabled',
message: 'L'account utente non è disabilitato'
} } - L'account non esiste
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Non esiste un account con questa email'
} }
Esempio di richiesta: Corpo (application/JSON)
{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com",
"email_notification": true
}Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/subusers/v1/remove'
--data '{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com",
"email_notification": true
}' --header 'token: <your api key>' - Annulla invito
POST
https://api.idrivee2.com/api/subusers/v1/invite/cancel
Click to copyLink copied
Questa API annullerà l'invito inviato al subuser.
Input
string subuser_email;
string admin_email;
Parametri di lunghezza
- Email [255]
Precondizione
- L'utente non deve già essere registrato.
Output
In caso di successo la risposta API (application/JSON) sarà:{ success: true }Caso di errore specifico
- Se il subuser è già registrato
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_already_signedup',
message: 'User signed up'
}
}
Esempio di richiesta: corpo (application/JSON)
{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com"
}Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/subusers/v1/invite/cancel'
--data '{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com"
}' --header 'token: <your api key>' - Update Subuser
POST
https://api.idrivee2.com/api/subusers/v1/update
Click to copyLink copied
Questa API aggiorna l'accesso dei subuser, le autorizzazioni, SSO e il controllo delle sessioni. L'API può essere usata per aggiornare sia i subuser invitati sia quelli registrati.
Input
string subuser_email;
boolean disable_delete_object; // optional
int permissions; // optional
boolean is_admin; // optional
boolean sso_login; // optional
boolean allow_session_timeout_settings; // optional
int idle_timeout; // optional
boolean concurrent_sessions; // optional
boolean allow_concurrent_session_settings; // optional
Object[] storage_access; // optional
string admin_email;
boolean expire_subuser_sessions; // optional, if true will expire existing user sessions
Nota
È possibile fare riferimento alla API Invite subuser per i dettagli dei parametri del corpo della richiesta. Nel corpo della richiesta devono essere inclusi solo i parametri che devono essere aggiornati.
Output
In caso di successo la risposta API (application/JSON) sarà:{ success: true }Parametri di lunghezza
- Email [255]
Specific Error Case
- Lo storage non esiste
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exist'
}
} - L'account non esiste
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - Se sso_login viene inviato come true e SSO non è configurato
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'sso_not_configured',
message: 'SSO is not configured'
}
}
Example Request :Body (application/JSON)
{
"subuser_email": "abc1@example.com",
"storage_access": [
{
"storage_dn": "h4l1.ch.idrivee2-29.com",
"buckets": [
"bucket1",
"bucket2"
]
},
{
"storage_dn": "r8l2.ie.idrivee2-44.com",
"buckets": [
"bucket3",
"bucket4"
]
}
],
"is_admin": false,
"sso_login": false,
"expire_subuser_sessions": false,
"admin_email": "abc@example.com"
}Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/subusers/v1/update'
--data '{
"subuser_email": "abc1@example.com",
"storage_access": [
{
"storage_dn": "h4l1.ch.idrivee2-29.com",
"buckets": [
"bucket1",
"bucket2"
]
},
{
"storage_dn": "r8l2.ie.idrivee2-44.com",
"buckets": [
"bucket3",
"bucket4"
]
}
],
"is_admin": false,
"sso_login": false,
"expire_subuser_sessions": false,
"admin_email": "abc@example.com"
}' --header 'token: <your api key>' - Ottieni registri attività
POST
https://api.idrivee2.com/api/subusers/v1/user_activity_history
Click to copyLink copied
Questa API recupererà i registri attività di un subuser per un intervallo di date.
Input
string subuser_email;
string admin_email;
string start_date;
string end_date;
int page_no;Parametri di lunghezza
- Email [255]
Nota
start_date (ISO8601) - Data di inizio
end_date (ISO8601) - Data di fine
page_no - L'API è impaginata con ogni pagina composta da 200 record
e page_no inizia da 1 in poiOutput
In caso di successo, la risposta dell'API (application/JSON) sarà:struct response {
List[] logs;
struct pagination;
}
struct logs {
string timestamp;
string description;
string ip;
}
struct pagination {
int total_records;
int page_no;
int records_per_page;
}Caso di errore specifico
- Se il subuser non è registrato
Response (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'user_not_signed_up',
message: 'Il subuser non è registrato'
}
} - L'account non esiste
Response (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'L\'account con questa email non esiste'
}
}
Esempio di richiesta: Corpo (application/JSON)
{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com",
"start_date": "2025-04-05",
"end_date": "2025-05-28",
"page_no": 1
}Esempio di richiesta Curl:
curl --request POST 'https://api.idrivee2.com/api/subusers/v1/user_activity_history'
--data '{
"subuser_email": "abc1@example.com",
"admin_email" : "admin1@example.com",
"start_date" : "2025-04-05",
"end_date" : "2025-05-28",
"page_no" : 1
}' --header 'token: <your api key>'
Caso di Errore Specifico