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:

  1. api_error
  2. invalid_request_error
  3. server_error

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.

  1. Errore del server (HTTP 500)
     
                               Response (application/JSON) : {
          error:{
                type: 'api_error',
                code: 'request_processing_failed',
                message: 'Impossibile elaborare questa richiesta, riprova più tardi'
                }
    }
  2. Non autorizzato (HTTP 401)
     
                                  Response (application/JSON) : {
          error:{
                type: 'invalid_request_error',
                code: 'unauthorized',
                message: 'Intestazione di autenticazione mancante/non valida'
           }
    }
  3. 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

  1. Elenca tutti gli utenti

    GET
    https://api.idrivee2.com/api/reseller/v1/usersClicca 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;
    }
  2. 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>'
  3. Invita utente
  4. PUT
    https://api.idrivee2.com/api/reseller/v1/inviteClicca 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:

    • Quota (GB) (0 per illimitato altrimenti >0)

    Parametri di lunghezza

    • Email [255]

    Output
    In caso di successo la risposta API (application/JSON) sarà:

    { email: abc@example.com, invite_url: signup_invite_url_response }

    Casi di errore

    • Richiesta non valida (HTTP-403)
      1. L'utente esiste già ed è collegato al tuo account.
                                                        { 
            error:{
               type: 'invalid_request_error',
               code: 'user_signed_up',
               message: 'Utente già registrato'
               }
        }
      2. 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'
               }
        }
      3. Numero massimo di sotto-account già invitati/registrati.
                                                        { 
            error:{
               type: 'invalid_request_error',
               code: 'maximum_limit_reached',
               message: 'Limite massimo raggiunto. Contattare il supporto.
               }
        }

    Esempio di Richiesta: Corpo (application/JSON)

                                        {
        "email": "e2reseller+1,"
        "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>'
  5. Crea Utente
  6. PUT
    https://api.idrivee2.com/api/reseller/v1/create_userClicca 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:

    • 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.

    Parametri di Lunghezza

    • Email [255]
    • Password [100]
    • Nome [64]
    • Cognome [64]

    Output
    In caso di successo, la risposta API (application/JSON) sarà:

    { user_created: true }

    Casi di Errore

    • Richiesta non valida (HTTP-403)
      1. L'utente esiste già ed è collegato al tuo account.
                                            { 
            error:{
                  type: 'invalid_request_error',
                  code: 'user_signed_up',
                  message : 'User already signed up'
                 }
        }
      2. 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'
                 }
        }

    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>'
  7. Modifica Utente
  8. POST
    https://api.idrivee2.com/api/reseller/v1/edit_userClicca 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

    • 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

    Output
    In caso di successo la risposta API (application/JSON) sarà:

    { user_updated: true }

    Casi di errore

    • 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.'
               }
      }

    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:

    • 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
  9. Disabilita utente
  10. POST
    https://api.idrivee2.com/api/reseller/v1/disable_userClicca 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

    • Email [255]

    Precondizione

    • Utente registrato.
    • Account abilitato.

    Output
    In caso di successo la risposta API (application/JSON) sarà:

    { user_disabled : true }

    Casi di errore

    • Richiesta non valida (HTTP 403)
      1. Account già disabilitato.
                                                           error:{ 
               type: 'invalid_request_error',
               code: 'user_account_already_disabled',
               message: 'Account already disabled for the user'
               }
        }
      2. L'account non esiste.
                                                        error:{ 
               type: 'invalid_request_error',
               code: 'account_non_existant',
               message: 'Account with this email does not exist'
               }
        }

    Esempio di richiesta: Corpo (application/JSON)

                                           {
        "email":"e2reseller+1"
    }

    Esempio di richiesta Curl:

                                           curl --request POST 'https://api.idrivee2.com/api/reseller/v1/disable_user' 
    --data '{
        "email":"e2reseller+1@idrivee2.com"
    }'
  11. Abilita utente
  12. POST
    https://api.idrivee2.com/api/reseller/v1/enable_userClicca 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

    • Email [255]

    Precondizione

    • Utente registrato/creato.
    • L'account utente era stato precedentemente disabilitato.

    Output
    In caso di successo, la risposta API (application/JSON) sarà:

    { user_enabled : true }

    Casi di errore

    • Richiesta non valida (HTTP 403)
      1. L'account non esiste.
                                                           error:{ 
               type: 'invalid_request_error',
               code: 'account_non_existant',
               message: 'Account with this email does not exist'
               }
        }
      2. Account già abilitato.
                                                        error:{ 
               type: 'invalid_request_error',
               code: 'user_account_already_enabled',
               message: 'Account already enabled for the user'
               }
        }

    Esempio di richiesta: Corpo (application/JSON)

                                          {
        "email":"e2reseller+1"
    }

    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>'
  13. Rimuovi utente
  14. POST
    https://api.idrivee2.com/api/reseller/v1/remove_userClicca 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

    • Email [255]

    Precondizione

    • L'utente deve essere disabilitato.

    Output
    In caso di successo, la risposta API (JSON) sarà:

    { user_removed : true }
    Casi di errore

    • Richiesta non valida (HTTP 403)
      1. L'account non esiste.
                                                           {
              error:{
                     type: 'invalid_request_error',
                     code: 'account_non_existant',
                     message:'Account with this email does not exist'
                    }
        }
      2. Account non disabilitato.
                                                              {
              error:{
                     type: 'invalid_request_error',
                     code: 'user_account_not_disabled',
                     message: 'User account not disabled'
                    }
        }

    Esempio di Richiesta: Corpo (application/JSON)

                                             {
        "email":"e2reseller+1"
    }

    Esempio di Richiesta Curl:

                                              curl  --request POST 'https://api.idrivee2.com/api/reseller/v1/remove_user' 
    --data '{
        "email":"e2reseller+1"
    }' --header 'token: <la tua chiave api>'
  15. Annulla Invito
  16. POST
    https://api.idrivee2.com/api/reseller/v1/invite/cancelClick 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

    • Email [255]

    Output
    In caso di successo, la risposta API (application/JSON) sarà:

    { user_removed : true }
    Casi di Errore

    1. 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
      }
    2. Request Processing Failed
      Occurs when the API request is invalid or cannot be processed.
      Response
                                                           {
          "message": "Request processing failed"
      }

    Esempio di richiesta Curl:

                                              curl  --request POST 'https://api.idrivee2.com/api/reseller/v1/invite/cancel' 
    --data '{
        "email":"e2reseller+1"
    }' --header 'token: <your api key>'
  17. Reimpostazione Password
  18. Ottieni il link per la reimpostazione della password del sottouttente

    POST
    https://api.idrivee2.com/api/reseller/v1/subuser/reset_password_linkClicca 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

    • Email [255]
    Caso di errore specifico

    1. 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'
               }
      }
    2. Se il sottouttente non è registrato
       
                                                         Risposta (application/JSON) : {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_not_signed_up',
                  message: 'Subuser is not signed up'
               }
      }
    3. Se il sottouttente è gestito
       
                                                         Risposta (application/JSON) : {
            error:{
                  type: 'invalid_request_error',
                  code: 'not_allowed',
                  message: 'This operation is not allowed. Please contact support.',
               }
      }

    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>'
  19. Ottieni utilizzo dello storage
  20. POST
    https://api.idrivee2.com/api/reseller/v1/usage_statsClicca 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

    • Email [255]

    Precondizioni

    • L'utente deve essere registrato.

    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

    • Richiesta non valida (HTTP 403)
      1. L'account non esiste.
                                                              {
             error:{
                   type: 'invalid_request_error',
                   code: 'account_non_existant',
                   message: 'Account with this email does not exist'
                  }
        }

    Esempio di richiesta: Corpo (application/JSON)

                                                {
        "email":"e2reseller+1",
        "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>'
  21. Ottieni registri attività
  22. POST
    https://api.idrivee2.com/api/reseller/v1/user_activity_historyClicca 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

    • Email [255]

    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

    1. 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)

                                                    { 
        "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

  1. Elenca regioni

    GET
    https://api.idrivee2.com/api/reseller/v1/regionsClicca 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>'
                                     
                                  
  2. Abilita regione per utente
  3. POST
    https://api.idrivee2.com/api/reseller/v1/enable_user_regionClicca 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

    • Email [255]
    • Regione [5]

    Precondizione

    • Account utente esistente.
    • La regione non deve essere già abilitata per l'utente.

    Output

    In caso di successo, la risposta API (application/JSON) sarà:

    { storage_added: true, storage_dn: /*user_storage_dns*/ }

    Casi di errore

    • Richiesta non valida (HTTP 403)
      1. L'account non esiste.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. 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'
            }
        }
      3. Utente disabilitato.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }
      4. 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'
            }
        }

    Esempio di richiesta: Corpo (application/JSON)

                               {
        "email":"e2reseller+1",
        "region": "NY"
    }

    Esempio di richiesta Curl:

                                curl  --request POST 'https://api.idrivee2.com/api/reseller/v1/enable_user_region'
    --data '{
      "email":"e2reseller+1",
      "region": "NY"
    }' --header 'token: <la tua chiave api>'
  4. Elenca le regioni abilitate per l'utente

    POST
    https://api.idrivee2.com/api/reseller/v1/list_user_regionsClicca 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)
      1. L'account non esiste.
                                                  {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. Utente disabilitato.
                                                  {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }

    Esempio di richiesta: Corpo (application/JSON)

                                        {
      "email":""
    }

    Esempio di richiesta Curl:

    curl --request POST 'https://api.idrivee2.com/api/reseller/v1/list_user_regions'
    --data '{
    "email":""
    }' --header 'token: <la tua chiave api>'
  5. Rimuovi la regione assegnata all'utente
  6. POST
    https://api.idrivee2.com/api/reseller/v1/remove_user_regionClicca 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

    • Email [255]
    • Storage_dn[128]

    Precondizione

    • Utente registrato.
    • Lo storage deve essere assegnato all'utente.

    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

    1. Nessun bucket creato dall'utente

    Output

    In caso di successo l'API restituirà una risposta (JSON):

    {removed : true}

    Casi di errore

    • Richiesta non valida (HTTP 403)
      1. L'account non esiste.
                                                  {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. Lo storage non esiste.
                                                  {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: 'Storage does not exists'
            }
        }
      3. 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'
            }
        }

    Esempio di Richiesta: Corpo (application/JSON)

                                  {
        "email":"e2reseller+1",
        "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",
       "storage_dn": "abcd.test@idrivee2.com"
    }' --header 'token: <la tua chiave api>'
  7. Aggiorna le impostazioni cors per la regione utente
  8. Metodo: POST
    URL:  https://api.idrivee2.com/api/reseller/v1/storage/set_corsClicca 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

    • Richiesta non valida (HTTP 403)
      1. L'account non esiste.
                                                     {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. Lo storage non esiste.
                                                     {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: 'Storage does not exists'
            }
        }
      3. Parametri cors non validi.
                                                     {
            error:{
                  type: 'invalid_request_error',
                  code: 'invalid_cors_policy',
                  message: 'The cors policy is invalid' / 'Maximum 10 cors are allowed'
            }
        }

    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",
    }'
  9. Aggiungi Chiave di Accesso
  10. POST
    https://api.idrivee2.com/api/reseller/v1/create_access_keyClicca 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

    • Utente registrato/creato e abilitato.
    • Storage DN assegnato al rispettivo utente.
    • I bucket non devono essere vuoti se forniti.

    Parametri di Lunghezza

    • Email [255]
    • storage_dn[128]
    • Name[64]

    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

    • Richiesta Non Valida (HTTP 403)
      1. L'account non esiste.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. Lo storage non esiste.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: 'Storage does not exists'
            }
        }
      3. Utente disabilitato.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }

    Esempio di Richiesta: Corpo (application/JSON)

                               {
        "email":"e2reseller+1",
        "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",
       "storage_dn":"abcd.test@idrivee2.com",
       "name":"myaccesskeyname",
       "permissions":0
    }' --header 'token: <your api key>'
  11. Elenca Chiavi di Accesso
  12. POST
    https://api.idrivee2.com/api/reseller/v1/list_access_keysClicca 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

    • email [255]
    • storage_dn[128]

    Precondizione

    • Utente registrato/creato e abilitato.
    • Storage assegnato all'utente.

    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

    • Richiesta Non Valida (HTTP 403)
      1. L'account non esiste.
                                            {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. Lo storage non esiste.
                                            {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: 'Storage does not exist'
            }
        }
      3. Utente disabilitato.
                                            {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled '
            }
        }

    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",
        "storage_dn":"abcd.test.idrivee2.com",
    }' --header 'token:<your api key>'
  13. Rimuovi chiave di accesso
  14. POST
    https://api.idrivee2.com/api/reseller/v1/remove_access_keyClicca 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)
      1. L'account non esiste.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. Lo storage non esiste.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: 'Storage does not exists'
            }
        }
      3. Utente disabilitato.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }
      4. 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'
            }
        }

    Esempio di Richiesta: Corpo (application/JSON)

                         {
        "email":"e2reseller+1",
        "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",
        "storage_dn":"abcd.test@idrivee2.com",
        "access_key":"<la tua chiave di accesso>"
    }' --header 'token: <la tua chiave API>'

Operazioni di Whitelabeling

  1. Aggiungi CNAME

    POST
    https://api.idrivee2.com/api/reseller/v1/storage/cname/addClicca 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)
      1. L'account non esiste.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. 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'
            }
        }
      3. 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'
            }
        }
      4. Se il CNAME è già configurato
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'CNAME already configure'
            }
        }
      5. 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'
            }
        }
    • Errore del Server (HTTP 500)
      1. Impossibile elaborare questa richiesta
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'Unable to process this request, please try again later'
            }
        }
      2. Dati non trovati per il dns specificato
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'data not found for given dns'
            }
        }

    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>'
  2. Elenca CNAME

    POST
    https://api.idrivee2.com/api/reseller/v1/storage/cnameClicca 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)
      1. L'account non esiste.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. Utente disabilitato.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }
    • Errore del Server (HTTP 500)
      1. Impossibile elaborare questa richiesta
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'Unable to process this request, please try again later'
            }
        }
      2. Dati non trovati per il dns specificato
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'data not found for given dns'
            }
        }

    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>'
  3. Aggiorna CNAME

    POST
    https://api.idrivee2.com/api/reseller/v1/storage/cname/updateClicca 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)
      1. L'account non esiste.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. 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'
            }
        }
      3. 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'
            }
        }
      4. Se storage_dn è errato
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'Unable to retrieve storage info for given storage_dn'
            }
        }
      5. 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'
            }
        }
      6. Se il CNAME è già configurato
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'CNAME already configured'
            }
        }
      7. 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'
            }
        }
      8. Utente disabilitato
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }
    • Errore del Server (HTTP 500)
      1. Impossibile elaborare questa richiesta
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'Unable to process this request, please try again later'
            }
        }
      2. Dati non trovati per il dns specificato
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'data not found for given dns'
            }
        }

    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>'
  4. Rimuovi CNAME

    POST
    https://api.idrivee2.com/api/reseller/v1/storage/cname/removeClicca 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)
      1. L'account non esiste.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. Utente disabilitato
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }
      3. 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'
            }
        }
      4. 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'
            }
        }
      5. 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'
            }
        }
      6. Il CNAME non esiste per il dominio di archiviazione
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'cannot get cname details'
            }
        }
      7. Impossibile rimuovere il CNAME
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'Unable to process this request, please try again later'
            }
        }
    • Errore del server (HTTP 500)
      1. Impossibile elaborare questa richiesta
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'Unable to process this request, please try again later'
            }
        }
      2. Dati non trovati per il DNS specificato
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'data not found for given dns'
            }
        }

    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
}
  1. Invita subuser

    PUT
    https://api.idrivee2.com/api/subusers/v1/inviteClicca 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]
  2. Caso di Errore Specifico

    1. 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>
          }
      }
    2. 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>'
  3. Elenca tutti i sottoutenti

    POST
    https://api.idrivee2.com/api/subusers/v1/listClicca 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>'
  4. Crea sottoutente

    PUT
    https://api.idrivee2.com/api/subusers/v1/create_accountClicca 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

    1. 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'
          }
      }
    2. Lo storage non esiste.
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'storage_non_existant',
              message: 'Storage does not exist'
          }
      }
    3. L'utente esiste già
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'user_already_signedup',
              message: 'User signed up'
          }
      }
    4. 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>'
  5. Disabilita subuser

    POST
    https://api.idrivee2.com/api/subusers/v1/disableClick 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

    1. Se il subuser non è registrato
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'user_not_signed_up',
              message: 'Il subuser non è registrato'
          }
      }
    2. 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'
          }
      }
    3. 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>'
  6. Abilita subuser

    POST
    https://api.idrivee2.com/api/subusers/v1/enableClick 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

    1. Se il subuser non è registrato
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'user_not_signed_up',
              message: 'Subuser is not signed up'
          }
      }
    2. 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'
          }
      }
    3. 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>'
  7. Rimuovi subuser

    POST
    https://api.idrivee2.com/api/subusers/v1/removeClick 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

    1. Se il subuser non è registrato
      Response (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'user_not_signed_up',
              message: 'Il subuser non è registrato'
          } }
    2. 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'
          } }
    3. 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>'
  8. Annulla invito

    POST
    https://api.idrivee2.com/api/subusers/v1/invite/cancelClick 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

    1. 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>'
  9. Update Subuser

    POST
    https://api.idrivee2.com/api/subusers/v1/updateClick 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

    1. Lo storage non esiste
      Response (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'storage_non_existant',
              message: 'Storage does not exist'
          }
      }
    2. L'account non esiste
      Response (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'account_non_existant',
              message: 'Account with this email does not exist'
          }
      }
    3. 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>'
  10. Ottieni registri attività

    POST
    https://api.idrivee2.com/api/subusers/v1/user_activity_historyClick 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 poi

    Output
    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

    1. Se il subuser non è registrato
      Response (application/JSON) : { 
          error:{
              type: 'invalid_request_error',
              code: 'user_not_signed_up',
              message: 'Il subuser non è registrato'
          }
      }
    2. 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>'