Reseller API 모음

IDrive® e2 Reseller API는 REST 아키텍처로 개발되었습니다.

IDrive® e2 Reseller API는 'application/JSON' 콘텐츠 타입의 요청 본문을 허용하며 'application/JSON' 응답을 반환합니다.

당사 API는 API Key 인증 방식을 사용합니다. API 키는 IDrive® e2 계정의 프로필 섹션에서 생성할 수 있습니다.

프로필 섹션에서 생성한 API 키를 모든 HTTP API 호출의 헤더에 'token' 키로 추가하세요.

HTTP 응답 코드:

  • 200 (성공)
  • 500 (서버 오류)
  • 400 (잘못된 파라미터)
  • 401 (인증되지 않음)
  • 403 (잘못된 요청)

오류 응답 본문의 구조는 다음과 같습니다:

                        응답 (application/JSON) : { 
      error : {
         문자열 type;
         문자열 code;
         문자열 message;
       }
}

'error.type'의 가능한 값은 다음과 같습니다:

  1. api_error
  2. invalid_request_error
  3. server_error

자세한 내용은 'error.code'와 'error.message'에서 확인할 수 있습니다.

공통 오류 사례

아래는 모든 API에서 공통으로 반환될 수 있는 오류 사례입니다. 그 외 오류 사례는 각 API 항목에 문서화되어 있습니다.

  1. 서버 오류 (HTTP 500)
     
                               응답 (application/JSON) : {
          error:{
                type: 'api_error',
                code: 'request_processing_failed',
                message: '요청을 처리할 수 없습니다. 잠시 후 다시 시도해 주세요.'
                }
    }
  2. 인증되지 않음 (HTTP 401)
     
                                  응답 (application/JSON) : {
          error:{
                type: 'invalid_request_error',
                code: 'unauthorized',
                message: '인증 헤더가 없거나 올바르지 않습니다.'
           }
    }
  3. 잘못된 파라미터 (HTTP 400)
     
                                  응답 (application/JSON) : {
          error:{
                type: 'invalid_request_error',
                code: 'invalid_parameters',
                message: '파라미터 값이 올바르지 않습니다. 자세한 내용은 errors를 확인하세요.',
                errors: [] (배열에는 오류 상세 정보가 포함됩니다)
             }
    }
AUTHORIZATION 헤더 API Key
token
<YOUR-API-KEY>

API 전체에서 사용되는 열거형은 다음과 같습니다:

열거형:

Access Key 권한:

                        {
    0: 읽기 권한,
    1: 쓰기 권한,
    2: 읽기/쓰기 권한
}

사용자 작업

  1. 모든 사용자 목록

    GET
    https://api.idrivee2.com/api/reseller/v1/users클릭하여 복사링크가 복사되었습니다 프로필에 추가된 모든 사용자를 표시합니다.
    쿼리 파라미터를 사용해 이메일로 사용자를 선택적으로 필터링할 수 있습니다.

    쿼리 파라미터 (선택 사항):

    string email;

    이메일이 정확히 일치하는 사용자만 필터링합니다. email 파라미터는 URL 인코딩되어야 합니다.

    출력

    API는 프로필에 추가된 사용자 배열을 반환합니다.
    응답 구조는 다음과 같습니다:

                               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. 참고:
    storage_used (bytes)
    storage_quota (GB) (0 : 무제한, 그 외 > 0)
    invite_url 값이 null이 아니면 초대된 사용자가 회원가입에 사용할 수 있습니다.

    요청 예시:

    GET /api/reseller/v1/users
    GET /api/reseller/v1/users?email=user%40example.com

    Curl 요청 예시:

    모든 사용자 조회:

    curl --request GET 'https://api.idrivee2.com/api/reseller/v1/users' --header 'token: <your api key>'

    이메일로 사용자 조회:

    curl --request GET 'https://api.idrivee2.com/api/reseller/v1/users?email=user%40example.com'' --header 'token: <your api key>'
  3. 사용자 초대
  4. PUT
    https://api.idrivee2.com/api/reseller/v1/invite클릭하여 복사링크가 복사되었습니다 이 API는 IDrive® e2 사용자 계정을 초대하며, 해당 계정은 귀하의 계정에 연결됩니다. 이 API는 이메일을 전송하지 않으므로 URL은 직접 사용자에게 공유해야 합니다.

    입력

    string email; 
    int quota; //선택 사항

    참고:

    • Quota (GB 단위) (무제한은 0, 그 외에는 0 초과)

    길이 매개변수

    • Email [255]

    출력
    성공 시 API 응답 (application/JSON):

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

    오류 사례

    • 잘못된 요청 (HTTP-403)
      1. 사용자가 이미 존재하며 귀하의 계정에 연결되어 있습니다.
                                                        { 
            error:{
               type: 'invalid_request_error',
               code: 'user_signed_up',
               message: 'User already signed up'
               }
        }
      2. 이미 사용 중인 이메일입니다 (귀하의 계정에 연결되지 않은 독립 계정이 존재합니다).
                                                        { 
            error:{
               type: 'invalid_request_error',
               code: 'email_already_in_use',
               message: 'Email already in use'
               }
        }
      3. 최대 하위 계정이 이미 초대되었거나 가입되었습니다.
                                                        { 
            error:{
               type: 'invalid_request_error',
               code: 'maximum_limit_reached',
               message: 'Maximum limit reached. Please contact support.
               }
        }

    요청 예시: 본문 (application/JSON)

                                        {
        "email": "e2reseller+1,"
        "quota": 1024
    }

    Curl 요청 예시:

                                        curl  --request PUT 'https://api.idrivee2.com/api/reseller/v1/invite' 
    --data '{
        "email": "e2reseller+1@idrivee2.com",
        "quota": 1024
    }' --header 'token: <your api key>'
  5. 사용자 생성
  6. PUT
    https://api.idrivee2.com/api/reseller/v1/create_user클릭하여 복사링크가 복사되었습니다 이 API는 IDrive® e2에 사용자 계정을 생성하며, 해당 계정은 귀하의 계정에 연결됩니다.

    입력

                                  string email; 
    string password; //base64 인코딩된 문자열
    string first_name;
    string last_name; //last_name은 선택적 매개변수입니다
    int quota;
    bool email_notification; //email_notification은 선택적 매개변수입니다

    참고:

    • Quota (GB 단위) (무제한은 0, 그 외에는 0 초과)
    • 비밀번호는 base64 인코딩된 문자열입니다.
    • email_notification이 제공되고 false로 설정된 경우 지정된 이메일 주소로 이메일 알림이 전송되지 않습니다.

    길이 매개변수

    • Email [255]
    • Password [100]
    • First Name [64]
    • Last Name [64]

    출력
    성공 시 API 응답 (application/JSON):

    { user_created: true }

    오류 사례

    • 잘못된 요청 (HTTP-403)
      1. 사용자가 이미 존재하며 귀하의 계정에 연결되어 있습니다.
                                            { 
            error:{
                  type: 'invalid_request_error',
                  code: 'user_signed_up',
                  message : 'User already signed up'
                 }
        }
      2. 이메일이 이미 사용 중입니다 (귀하의 계정에 연결되지 않은 독립 계정이 존재합니다).
                                               { 
            error:{
                  type: 'invalid_request_error',
                  code: 'email_already_in_use',
                  message: 'Email already in use'
                 }
        }

    요청 예시 :본문 (application/JSON)

                                           {
        "email": "e2reseller+1@idrivee2.com",
        "password":"dGVzdDEyMw==",
        "first_name":"dev",
        "quota": 1024,
        "email_notification": false
    }

    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: <your api key>'
  7. 사용자 편집
  8. POST
    https://api.idrivee2.com/api/reseller/v1/edit_user클릭하여 복사링크가 복사되었습니다 이 API를 사용하면 리셀러 계정에 연결된 기존 사용자 계정을 업데이트할 수 있습니다.

    입력

    string email;         // 필수
    int quota;        // 0 = 무제한, >0 = GB
    bool email_notification; //선택 사항

    매개변수

    • email (string, 필수)
      업데이트할 사용자의 이메일 주소
    • quota (int, 선택 사항)
    • 저장 할당량 (GB)
      할당량 (GB) (무제한은 0, 그 외는 >0)
    • email_notification (bool, 선택 사항)
      false로 설정하면 사용자에게 이메일 알림이 전송되지 않습니다

    출력
    성공 시 API 응답 (application/JSON):

    { user_updated: true }

    오류 사례

    • 잘못된 요청 (HTTP-403)
                                          { 
          error:{
                type: 'invalid_request_error',
                code: 'account_non_existant',
                message : "Account with this email does not exist'
               }
      }
    • 허용되지 않음 (잘못된 업데이트 시도)
                                             { 
          error:{
                type: 'invalid_request_error',
                code: 'not_allowed',
                message: 'This operation is not allowed. Please contact support.'
               }
      }

    요청 예시 :본문 (application/JSON)

                                           {
        "email": "shane@idrive.com",
        "quota": 12,
        "email_notification": true
    }

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

    참고:

    • email_notification은 가입 사용자와 비관리 사용자만 수정할 수 있습니다
    • 관리 사용자 또는 비가입 사용자의 email_notification을 업데이트하면 not_allowed 오류가 반환됩니다
    • quota는 모든 사용자를 대상으로 업데이트할 수 있습니다
  9. 사용자 비활성화
  10. POST
    https://api.idrivee2.com/api/reseller/v1/disable_userClick to copyLink copied 이 API는 사용자 계정을 비활성화합니다. 사용자는 로그인, 데이터 접근 및 모든 작업 수행을 할 수 없습니다.

    입력

    string email;

    길이 매개변수

    • Email [255]

    사전 조건

    • 사용자가 가입했습니다.
    • 계정이 활성화되어 있습니다.

    출력
    성공 시 API 응답(application/JSON)은 다음과 같습니다 :

    { user_disabled : true }

    오류 사례

    • 잘못된 요청(HTTP 403)
      1. 계정이 이미 비활성화되었습니다.
                                                           error:{ 
               type: 'invalid_request_error',
               code: 'user_account_already_disabled',
               message: '계정이 이미 사용자에 대해 비활성화되어 있습니다'
               }
        }
      2. 계정이 존재하지 않습니다.
                                                        error:{ 
               type: 'invalid_request_error',
               code: 'account_non_existant',
               message: '이 이메일의 계정이 존재하지 않습니다'
               }
        }

    예시 요청: 본문(application/JSON)

                                           {
        "email":"e2reseller+1"
    }

    Curl 예시 요청:

                                           curl --request POST 'https://api.idrivee2.com/api/reseller/v1/disable_user' 
    --data '{
        "email":"e2reseller+1@idrivee2.com"
    }'
  11. 사용자 활성화
  12. POST
    https://api.idrivee2.com/api/reseller/v1/enable_userClick to copyLink copied 이 API는 비활성화된 사용자 계정을 다시 활성화합니다. 사용자는 로그인, 데이터 접근 및 일반 작업 수행이 가능합니다.

    입력

    string email;

    길이 매개변수

    • Email [255]

    사전 조건

    • 사용자가 가입/생성되었습니다.
    • 사용자 계정이 이전에 비활성화되었습니다.

    출력
    성공 시 API 응답(application/JSON)은 다음과 같습니다:

    { user_enabled : true }

    오류 사례

    • 잘못된 요청(HTTP 403)
      1. 계정이 존재하지 않습니다.
                                                           error:{ 
               type: 'invalid_request_error',
               code: 'account_non_existant',
               message: '이 이메일의 계정이 존재하지 않습니다'
               }
        }
      2. 계정이 이미 활성화되었습니다.
                                                        error:{ 
               type: 'invalid_request_error',
               code: 'user_account_already_enabled',
               message: '계정이 이미 사용자에 대해 활성화되어 있습니다'
               }
        }

    요청 예시 :본문 (application/JSON)

                                          {
        "email":"e2reseller+1"
    }

    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. 사용자 제거
  14. POST
    https://api.idrivee2.com/api/reseller/v1/remove_user클릭하여 복사링크가 복사되었습니다 이 API는 IDrive® e2에서 사용자를 영구적으로 삭제합니다.

    참고: 이 작업을 수행하면 사용자 데이터가 영구적으로 손실됩니다.

    입력

    string email;

    길이 매개변수

    • 이메일 [255]

    사전 조건

    • 사용자가 비활성화되어 있어야 합니다.

    출력
    성공 시 API 응답(JSON)은 다음과 같습니다:

    { user_removed : true }
    오류 사례

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                                           {
              error:{
                     type: 'invalid_request_error',
                     code: 'account_non_existant',
                     message:'이 이메일의 계정이 존재하지 않습니다'
                    }
        }
      2. 계정이 비활성화되지 않았습니다.
                                                              {
              error:{
                     type: 'invalid_request_error',
                     code: 'user_account_not_disabled',
                     message: '사용자 계정이 비활성화되지 않았습니다'
                    }
        }

    요청 예시 :본문 (application/JSON)

                                             {
        "email":"e2reseller+1"
    }

    Curl 요청 예시:

                                              curl  --request POST 'https://api.idrivee2.com/api/reseller/v1/remove_user' 
    --data '{
        "email":"e2reseller+1"
    }' --header 'token: <your api key>'
  15. 초대 취소
  16. POST
    https://api.idrivee2.com/api/reseller/v1/invite/cancelClick to copyLink copied 이 API는 회원님의 계정에 연결될 IDrive® e2의 초대된 사용자 계정을 취소합니다.

    입력

    string email;

    길이 매개변수

    • 이메일 [255]

    출력
    성공 시 API 응답(application/JSON)은 다음과 같습니다:

    { user_removed : true }
    오류 사례

    1. 초대가 제거되지 않음
      제공된 이메일이 유효하지 않거나, 이미 가입되었거나, 리셀러 계정과 연결되지 않은 경우 발생합니다.
      응답
                                                         {
          "user_removed": false
      }
    2. 요청 처리 실패
      API 요청이 유효하지 않거나 처리할 수 없는 경우 발생합니다.
      응답
                                                           {
          "message": "요청 처리 실패"
      }

    Curl 요청 예시:

                                              curl  --request POST 'https://api.idrivee2.com/api/reseller/v1/invite/cancel' 
    --data '{
        "email":"e2reseller+1"
    }' --header 'token: <your api key>'
  17. 비밀번호 재설정
  18. 하위 사용자 비밀번호 재설정 링크 가져오기

    POST
    https://api.idrivee2.com/api/reseller/v1/subuser/reset_password_linkClick to copyLink copied 이 API는 리셀러 하위 사용자의 비밀번호 재설정 링크를 생성합니다. 링크는 1시간 토큰 만료 시간과 함께 API 응답으로 반환됩니다.

    입력

    string email;

    참고:
    "email" - 비밀번호 재설정 링크를 생성하려는 하위 사용자의 이메일 주소입니다. 하위 사용자는 요청한 리셀러에 속해야 하며, 가입 완료 상태이고 관리형 계정이 아니어야 합니다.

    출력
    성공 시 API 응답(application/JSON)은 다음과 같습니다:

                                          { 
        "reset_link": "https://domain.com/change_password?link=&expire_session=true&type=0",
        "email": "subuser@example.com"
    }

    길이 매개변수

    • 이메일 [255]
    특정 오류 사례

    1. 하위 사용자가 존재하지 않는 경우
       
                                                         응답 (application/JSON) : {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: '이 이메일로 등록된 계정이 존재하지 않습니다'
               }
      }
    2. 하위 사용자가 가입하지 않은 경우
       
                                                         Response (application/JSON) : {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_not_signed_up',
                  message: '하위 사용자가 가입되어 있지 않습니다'
               }
      }
    3. 하위 사용자가 관리형 계정인 경우
       
                                                         Response (application/JSON) : {
            error:{
                  type: 'invalid_request_error',
                  code: 'not_allowed',
                  message: '이 작업은 허용되지 않습니다. 지원팀에 문의하세요.',
               }
      }

    유효하지 않은 API 키에 대한 인증 오류

     
                                                       Response (application/JSON) : {
          error:{
                type: 'authentication_error',
                code: 'unauthorized',
                message: '인증 헤더가 누락되었거나 유효하지 않습니다',
             }
    }

    요청 예시 :본문 (application/JSON)

                                                {
        "email":"subuser@example.com",
    }

    Curl 요청 예시:

                                              curl  --request POST 'https://api.idrivee2.com/api/reseller/v1/subuser/reset_password_link' 
    --data '{
        "email":"subuser@example.com"
    }' --header 'token: <사용자 API 키>'
  19. 스토리지 사용량 조회
  20. POST
    https://api.idrivee2.com/api/reseller/v1/usage_stats클릭하여 복사링크가 복사되었습니다 이 API는 제공된 사용자에 대한 IDrive® e2 이용 현황 배열을 반환합니다.

    입력

                                              {
        string email;
        string date_from;
        string date_to;
    }

    date_from(ISO8601)(시작 날짜)
    date_to(ISO8601) (종료 날짜)
    길이 매개변수

    • 이메일 [255]

    사전 조건

    • 사용자가 가입되어 있어야 합니다.

    출력
    usage_stats 구조체 배열

                                                 struct usage_stats{ 
           double downloads;
           double uploads;
           double disk_used;
           string date;
    }

    downloads, uploads, disk_used의 단위는 바이트입니다
    오류 사례

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                                              {
             error:{
                   type: 'invalid_request_error',
                   code: 'account_non_existant',
                   message: '이 이메일로 등록된 계정이 존재하지 않습니다'
                  }
        }

    요청 예시 :본문 (application/JSON)

                                                {
        "email":"e2reseller+1",
        "date_to":"2022-08-31",
        "date_from":"2022-08-01"
    }

    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. 활동 로그 가져오기
  22. POST
    https://api.idrivee2.com/api/reseller/v1/user_activity_history클릭하여 복사링크가 복사되었습니다 이 API는 날짜 범위에 대한 사용자의 활동 로그를 가져옵니다.

    입력

                                              string email;
    string start_date;
    string end_date;
    int page_no;

    길이 매개변수

    • 이메일 [255]

    참고

    start_date (ISO8601) - 시작 날짜
    end_date (ISO8601) - 종료 날짜
    page_no - API는 각 페이지가 200개의 레코드로 구성된 페이지 방식으로 제공됩니다
    또한 page_no1부터 시작합니다

    출력
    성공 시 API 응답 (application/JSON)은 다음과 같습니다:

                                               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;
        }

    특정 오류 사례

    1. 계정이 존재하지 않습니다.
                                                   응답 (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'account_non_existant',
              message: '이 이메일로 등록된 계정이 존재하지 않습니다'
          }
      }

    요청 예시 :본문 (application/JSON)

                                                    { 
        "email": "abc1@example.com",
        "start_date": "2025-04-05",
        "end_date": "2025-05-28",
        "page_no": 1
    }

    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: <your api key>'

스토리지 작업

  1. 리전 목록

    GET
    https://api.idrivee2.com/api/reseller/v1/regionsClick to copyLink copied 이 API는 IDrive® e2의 리전 배열을 반환합니다.

    출력

    struct regions{ 
            string region_key;
            string region_name;
            string country;
            string region_code;
            bool active;
            bool hdd_storage;
            string cors;
    }

    참고: 사용자에게는 활성 상태인 리전만 활성화할 수 있습니다.

    요청 예시: 리전 목록

    curl --request GET 'https://api.idrivee2.com/api/reseller/v1/regions' --header 'token: <your api key>'
                                     
                                  
  2. 사용자에 대한 리전 활성화
  3. POST
    https://api.idrivee2.com/api/reseller/v1/enable_user_region클릭하여 복사링크가 복사되었습니다 이 API는 사용자에 대한 리전을 활성화합니다.

    입력

    {
         string email;
         string region;
    }

    region : 리전 목록 API의 region_key. 예: "TX", "LDN" 등.

    API는 활성화된 리전의 스토리지 DN(도메인 이름)을 반환하며, 이를 통해 액세스 키와 시크릿 키를 사용하여 사용자 스토리지에 접근할 수 있습니다.

    길이 매개변수

    • 이메일 [255]
    • 리전 [5]

    사전 조건

    • 기존 사용자 계정.
    • 리전이 사용자에 대해 활성화되어 있지 않아야 합니다.

    출력

    성공 시 API 응답(application/JSON)은 다음과 같습니다:

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

    오류 사례

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. 스토리지 리전이 이미 사용자에 대해 활성화되어 있습니다.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'region_already_enabled',
                  message: 'Storage region already enabled for user'
            }
        }
      3. 사용자가 비활성화되었습니다.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }
      4. 계정 결제에 실패했습니다.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'payment_failed',
                  message: 'Account expired please update payment info'
            }
        }

    요청 예시: 본문 (application/JSON)

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

    Curl 요청 예시:

                                curl  --request POST 'https://api.idrivee2.com/api/reseller/v1/enable_user_region'
    --data '{
      "email":"e2reseller+1",
      "region": "NY"
    }' --header 'token: <your api key>'
  4. 사용자 활성화된 리전 목록

    POST
    https://api.idrivee2.com/api/reseller/v1/list_user_regionsClick to copyLink copied 이 API는 사용자의 모든 활성화된 리전을 나열합니다.

    입력

    {
                                       
    string email;
    }

    길이 파라미터

    • Email [255]

    사전 조건

    • 기존 사용자 계정.

    출력

    성공 시 API 응답(application/JSON)은 다음과 같습니다:

                                     { 
      user_regions: /*사용자 활성화된 리전 목록*/
    }

    오류 사례

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                                  {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: '이 이메일의 계정이 존재하지 않습니다'
            }
        }
      2. 사용자가 비활성화되었습니다.
                                                  {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: '사용자 비활성화됨'
            }
        }

    요청 예시: 본문 (application/JSON)

                                        {
      "email":""
    }

    Curl 요청 예시:

    curl --request POST 'https://api.idrivee2.com/api/reseller/v1/list_user_regions'
    --data '{
    "email":""
    }' --header 'token: <your api key>'
  5. 사용자에게 할당된 리전 제거
  6. POST
    https://api.idrivee2.com/api/reseller/v1/remove_user_regionClick to copyLink copied 이 API는 사용자에게 할당된 리전을 제거합니다.

    입력

    { 
        string email;
        string storage_dn;
    }

    'storage_dn'은 제거하려는 사용자에게 할당된 스토리지 도메인입니다.

    길이 파라미터

    • Email [255]
    • Storage_dn[128]

    사전 조건

    • 사용자가 가입되어 있어야 합니다.
    • 스토리지가 사용자에게 할당되어 있어야 합니다.

    참고: 이 작업을 수행하면 사용자 데이터가 삭제됩니다.

    다음 조건에서 API가 사용자 리전 제거를 허용합니다.

    사용자가 비활성화 상태인 경우

    1. 사용자가 생성한 버킷이 없음

    출력

    성공 시 API는 응답(JSON)을 반환합니다:

    {removed : true}

    오류 사례

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                                  {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: '이 이메일의 계정이 존재하지 않습니다'
            }
        }
      2. 스토리지가 존재하지 않습니다.
                                                  {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: '스토리지가 존재하지 않습니다'
            }
        }
      3. 스토리지가 비어 있지 않습니다.
                                                  {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_not_empty',
                  message: '스토리지가 비어 있지 않습니다. 사용자 데이터 손실을 방지하기 위해 이 요청은
                  처리되지 않습니다. 이 스토리지를 제거하려면 먼저 사용자를 비활성화한 후 다시 시도하세요'
            }
        }

    요청 예시 :본문 (application/JSON)

                                  {
        "email":"e2reseller+1",
        "storage_dn": "abcd.test@idrivee2.com"
    }

    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: <your api key>'
  7. 사용자 리전의 cors 설정 업데이트
  8. 메서드: POST
    URL:  https://api.idrivee2.com/api/reseller/v1/storage/set_corsClick to copyLink copied 이 API는 리전의 cors 설정을 업데이트합니다.

    콘텐츠 유형 : application/json

    헤더 API 키:

    'token': <your token>

    필수 파라미터:

                                        
                                        body : { 
             "email": "test@test.com",
             "storage_dn": "cxan.tx21.edgedrive.com",
             "cors": "test1.com,test2.com,test3.com",
          }

    필수 파라미터: email,storage_dn,cors
    파라미터 길이 제한: email[255],storage_dn[128], cors (쉼표로 구분된 도메인 목록 최대 10개)
    참고: 모든 cors에 대해 cors를 "*"로 설정할 수 있으며, 이는 모든 리전의 기본 cors이기도 합니다

    출력

    성공 시 API는 응답(application/JSON)을 반환합니다:

                                        {
    cors_updated: true
    }

    오류 사례

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                                     {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: '이 이메일의 계정이 존재하지 않습니다'
            }
        }
      2. 스토리지가 존재하지 않습니다.
                                                     {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: '스토리지가 존재하지 않습니다'
            }
        }
      3. 잘못된 cors 파라미터입니다.
                                                     {
            error:{
                  type: 'invalid_request_error',
                  code: 'invalid_cors_policy',
                  message: 'cors 정책이 올바르지 않습니다' / '최대 10개의 cors만 허용됩니다'
            }
        }

    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. Add Access Key
  10. POST
    https://api.idrivee2.com/api/reseller/v1/create_access_keyClick to copyLink copied 이 API는 스토리지 접근을 위한 Access Key를 생성하고 Access Key ID와 Secret Key를 반환합니다.

    입력

    { 
        string email;
        string storage_dn;
        string name;
        int permissions;
        array buckets; //buckets는 선택 파라미터입니다
    }

    Buckets: 지정된 버킷에 대해 스토리지 접근용 액세스 키를 생성하려면 버킷 이름 목록을 제공하세요. 모든 버킷용 액세스 키인 경우 'buckets' 입력은 필요하지 않습니다.

    사전 조건

    • 사용자가 가입/생성되어 있고 활성화되어 있어야 합니다.
    • 해당 사용자에게 Storage DN이 할당되어 있어야 합니다.
    • Buckets를 제공하는 경우 비어 있으면 안 됩니다.

    길이 파라미터

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

    Access Key 권한 열거값:

    { 
        0: 읽기 권한
        1: 쓰기 권한
        2: 읽기/쓰기 권한
    }

    출력

    성공 시 API는 응답(application/JSON)을 반환합니다:

                                  {
    created: true,
            data: {
                    access_key: /access key/
                    secret_key: /* secret key*/
            }
    }

    오류 사례

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: '이 이메일의 계정이 존재하지 않습니다'
            }
        }
      2. 스토리지가 존재하지 않습니다.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: '스토리지가 존재하지 않습니다'
            }
        }
      3. 사용자 비활성화됨.
                                               {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: '사용자 비활성화됨'
            }
        }

    예시 요청 :본문 (application/JSON)

                               {
        "email":"e2reseller+1",
        "storage_dn":"abcd.test@idrivee2.com",
        "name":"myaccesskeyname",
        "permissions":0
    }

    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. 액세스 키 목록
  12. POST
    https://api.idrivee2.com/api/reseller/v1/list_access_keysClick to copyLink copied 이 API는 스토리지의 모든 액세스 키를 조회합니다.

    입력

    { 
        string email;
        string storage_dn;
    }

    'storage_dn'은 모든 액세스 키를 조회하려는 사용자에게 할당된 스토리지 도메인입니다.

    길이 파라미터

    • email [255]
    • storage_dn[128]

    사전 조건

    • 사용자가 가입/생성되어 있고 활성화되어 있어야 합니다.
    • 사용자에게 스토리지가 할당되어 있어야 합니다.

    출력

    성공 시 API는 응답(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*/
          },
          {...},
          …
        ]
    }

    오류 사례

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                            {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: '이 이메일의 계정이 존재하지 않습니다'
            }
        }
      2. 스토리지가 존재하지 않습니다.
                                            {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: '스토리지가 존재하지 않습니다'
            }
        }
      3. 사용자가 비활성화되었습니다.
                                            {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: '사용자 비활성화됨'
            }
        }

    요청 예시 : 본문 (application/JSON)

                               {
        "email" : "e2reseller+1@idrivee2.com",
        "storage_dn" : "abcd.test.idrivee2.com"
    }

    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. 액세스 키 제거
  14. POST
    https://api.idrivee2.com/api/reseller/v1/remove_access_key클릭하여 복사링크가 복사되었습니다 이 API는 스토리지의 액세스 키를 제거합니다.

    입력

    { 
        string email;
        string storage_dn;
        string access_key;
    }

    길이 매개변수

    • Email [255]
    • storage_dn[128]
    • access_key[128]

    사전 조건

    • 사용자가 가입/생성되고 활성화되어 있습니다.
    • 스토리지가 사용자에게 할당되어 있습니다.
    • 스토리지에 대한 액세스 키가 존재합니다.

    출력

    성공 시 API는 다음 응답(application/JSON)을 반환합니다:

    {removed : true}

    오류 사례

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: '이 이메일의 계정이 존재하지 않습니다'
            }
        }
      2. 스토리지가 존재하지 않습니다.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'storage_non_existant',
                  message: '스토리지가 존재하지 않습니다'
            }
        }
      3. 사용자가 비활성화되었습니다.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: '사용자 비활성화됨'
            }
        }
      4. 액세스 키가 존재하지 않습니다.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'access_key_non_existant',
                  message: '액세스 키가 존재하지 않습니다. 유효한 액세스 키를 입력해 주세요'
            }
        }

    요청 예시 :본문 (application/JSON)

                         {
        "email":"e2reseller+1",
        "storage_dn":"abcd.test@idrivee2.com",
        "access_key":"<ACCESS-KEY-ID>"
    }

    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":"<액세스 키를 입력하세요>"
    }' --header 'token: <API 키를 입력하세요>'

화이트라벨링 작업

  1. CNAME 추가

    POST
    https://api.idrivee2.com/api/reseller/v1/storage/cname/addClick to copyLink copied 이 API는 지정된 storage dns에 CNAME을 추가합니다.

    입력

    { 
        string email;
        string storage_dn;
        string cname;
        string public_key;
        string private_key;
        string file_index;
        string passphrase; // 선택 사항, private key가 암호화된 경우에만 전송 필요
    }

    'storage_dn'은 사용자에게 할당된 스토리지 도메인입니다.

    'CNAME'은 새로 할당할 CNAME입니다.

    'file_index'는 선택 파라미터입니다.

    길이 파라미터

    • email[255]
    • storage_dn[128]
    • CNAME[128]
    • public_key[10000]
    • private_key[6000]
    • file_index[64]
    • passphrase[255]

    사전 조건

    • 사용자가 가입/생성되어 활성화되어 있어야 합니다.
    • 사용자에게 스토리지가 할당되어 있어야 합니다.
    • storage_dn은 List User Enabled Regions API에서 조회한 tenant endpoint여야 합니다.

    출력

    성공 시 API는 응답(application/JSON)을 반환합니다:

    { 'cname_added' : true }

    오류 케이스

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: '해당 이메일의 계정이 존재하지 않습니다'
            }
        }
      2. CNAME을 사용할 수 없습니다
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: '이 CNAME은 사용할 수 없습니다. 다른 CNAME으로 변경해 주세요'
            }
        }
      3. Storage 도메인이 존재하지 않음( storage_dns가 잘못된 경우 )
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: '지정한 storage_dn의 storage 정보를 조회할 수 없습니다'
            }
        }
      4. CNAME이 이미 구성된 경우
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'CNAME이 이미 구성되어 있습니다'
            }
        }
      5. 유효하지 않은 CNAME 또는 인증서( public/private key가 잘못된 경우 )
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'CNAME 또는 인증서를 검증할 수 없습니다. 다시 시도해 주세요'
            }
        }
    • 서버 오류 (HTTP 500)
      1. 이 요청을 처리할 수 없습니다
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: '이 요청을 처리할 수 없습니다. 잠시 후 다시 시도해 주세요'
            }
        }
      2. 지정한 dns의 데이터를 찾을 수 없습니다
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: '지정한 dns의 데이터를 찾을 수 없습니다'
            }
        }

    요청 예시 : Body (application/JSON)

    { 
        "email": "e2reseller+1@idrivee2.com",
        "storage_dn": "abcd.test.idrivee2.com",
        "cname" : "example.mycloud.io",
        "public_key" : "...",
        "private_key" : "...",
        "file_index" : "1"
    }

    Curl 요청 예시:

    curl --request POST 'https://api.idrivee2.com/api/reseller/v1/storage/cname'
    --data'{
        "email": "e2reseller+1@idrivee2.com",
        "storage_dn": "abcd.test.idrivee2.com",
        "cname" : "example.mycloud.io",
        "public_key" : "...",
        "private_key" : "...",
        "file_index" : "1"
    }'--header 'token:<your api key>'
  2. CNAME 목록 조회

    POST
    https://api.idrivee2.com/api/reseller/v1/storage/cnameClick to copyLink copied 이 API는 스토리지의 모든 CNAME을 조회합니다.

    입력

    { 
        string email;
        string storage_dn;
    }

    'storage_dn'은 CNAME 목록을 조회하려는 사용자에게 할당된 스토리지 도메인입니다.

    길이 파라미터

    • email[255]
    • storage_dn[128]

    사전 조건

    • 사용자가 가입/생성되어 활성화되어 있어야 합니다.
    • 사용자에게 스토리지가 할당되어 있어야 합니다.
    • storage_dn은 List User Enabled Regions API에서 조회한 tenant endpoint여야 합니다.

    출력

    성공 시 API는 응답(application/JSON)을 반환합니다:

    {
        'cname_list' : [
             {
                  file_index: /*file_index*/,
                  cname: /*cname*/,
                  certificate_info: /*isValidSsl.certInfo*/
                  creation_date: /*creation_date*/
             }

             {...},
         ]
    }

    오류 케이스

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. 사용자가 비활성화되었습니다.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }
    • 서버 오류 (HTTP 500)
      1. 이 요청을 처리할 수 없습니다
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'Unable to process this request, please try again later'
            }
        }
      2. 지정한 dns의 데이터를 찾을 수 없습니다
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'data not found for given dns'
            }
        }

    요청 예시 : Body (application/JSON)

    { 
        "email": "e2reseller+1@idrivee2.com",
        "storage_dn": "abcd.test.idrivee2.com",
    }

    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. CNAME 업데이트

    POST
    https://api.idrivee2.com/api/reseller/v1/storage/cname/updateClick to copyLink copied 이 API는 지정된 storage dns의 CNAME을 업데이트합니다.

    입력

    { 
        string region_key;
        string email;
        string storage_dn;
        string cname;
        string public_key;
        string private_key;
        string file_index;
        string passphrase; // 선택 사항, private key가 암호화된 경우에만 전송 필요
    }

    'storage_dn'은 사용자에게 할당된 스토리지 도메인입니다.

    'CNAME'은 기존 CNAME을 대체할 새 CNAME입니다.

    'file_index'는 선택 파라미터입니다.

    길이 파라미터

    • email[255]
    • storage_dn[128]
    • CNAME[128]
    • public_key[10000]
    • private_key[6000]
    • file_index[64]
    • passphrase[255]

    사전 조건

    • 사용자가 가입/생성되어 활성화되어 있어야 합니다.
    • 사용자에게 스토리지가 할당되어 있어야 합니다.
    • storage_dn은 List User Enabled Regions API에서 조회한 tenant endpoint여야 합니다.

    출력

    성공 시 API는 응답(application/JSON)을 반환합니다:

    { 'cname_updated' : true }

    오류 케이스

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. CNAME을 사용할 수 없음( CNAME이 idrive 도메인인 경우 )
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'this CNAME cannot be used, please try changing your CNAME'
            }
        }
      3. Storage 도메인이 존재하지 않음( storage_dns가 잘못된 경우 )
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'Unable to retrieve storage info for given storage_dn'
            }
        }
      4. storage_dn이 잘못된 경우
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'Unable to retrieve storage info for given storage_dn'
            }
        }
      5. Storage 서버에 연결할 수 없음( storage_dns를 사용할 수 없는 경우 )
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'Storage server cannot be reached right now, please try again later'
            }
        }
      6. CNAME이 이미 구성된 경우
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'CNAME already configured'
            }
        }
      7. 유효하지 않은 CNAME 또는 인증서( public/private key가 잘못된 경우 )
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'Could not verify CNAME or certificates. Please try again'
            }
        }
      8. 사용자가 비활성화됨
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }
    • 서버 오류 (HTTP 500)
      1. 이 요청을 처리할 수 없습니다
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'Unable to process this request, please try again later'
            }
        }
      2. 지정한 dns의 데이터를 찾을 수 없습니다
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'data not found for given dns'
            }
        }

    요청 예시 : Body (application/JSON)

    { 
        "email": "e2reseller+1@idrivee2.com",
        "storage_dn": "abcd.test.idrivee2.com",
        "cname" : "example.mycloud.io",
        "public_key" : "...",
        "private_key" : "...",
        "file_index" : "1"
    }

    Curl 요청 예시:

    curl --request POST 'https://api.idrivee2.com/api/reseller/v1/storage/cname/update
    --data'{
        "email": "e2reseller+1@idrivee2.com",
        "storage_dn": "abcd.test.idrivee2.com",
        "cname" : "example.mycloud.io",
        "public_key" : "...",
        "private_key" : "...",
        "file_index" : "1"
    }'--header 'token:<your api key>'
  4. CNAME 제거

    POST
    https://api.idrivee2.com/api/reseller/v1/storage/cname/removeClick to copyLink copied 이 API는 storage dns에서 CNAME을 제거합니다.

    입력

    { 
        string email;
        string storage_dn;
        string cname;
    }

    'storage_dn'은 사용자에게 할당된 스토리지 도메인입니다.

    CNAME: 제거할 CNAME을 입력합니다.

    길이 파라미터

    • email[255]
    • storage_dn[128]
    • CNAME[128]

    사전 조건

    • 사용자가 가입/생성되어 활성화되어 있어야 합니다.
    • 사용자에게 스토리지가 할당되어 있어야 합니다.
    • CNAME이 스토리지 도메인에 매핑되어 있어야 합니다.
    • storage_dn은 List User Enabled Regions API에서 조회한 tenant endpoint여야 합니다.

    출력

    성공 시 API는 응답(application/JSON)을 반환합니다:

    { 'cname_removed' : true }

    오류 케이스

    • 잘못된 요청 (HTTP 403)
      1. 계정이 존재하지 않습니다.
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'account_non_existant',
                  message: 'Account with this email does not exist'
            }
        }
      2. 사용자가 비활성화됨
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'user_disabled',
                  message: 'User Disabled'
            }
        }
      3. CNAME을 사용할 수 없습니다
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'this CNAME cannot be used, please try changing your CNAME'
            }
        }
      4. Storage 도메인이 존재하지 않습니다
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'Unable to retrieve storage info for given storage_dn'
            }
        }
      5. Storage 서버에 연결할 수 없습니다
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'Storage server cannot be reached right now, please try again later'
            }
        }
      6. 해당 스토리지 도메인에 대한 CNAME이 존재하지 않습니다
                                         {
            error:{
                  type: 'invalid_request_error',
                  code: 'request_processing_failed',
                  message: 'cannot get cname details'
            }
        }
      7. CNAME 제거 실패
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'Unable to process this request, please try again later'
            }
        }
    • 서버 오류 (HTTP 500)
      1. 이 요청을 처리할 수 없습니다
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'Unable to process this request, please try again later'
            }
        }
      2. 지정한 dns의 데이터를 찾을 수 없습니다
                                         {
            error:{
                  type: 'api_error',
                  code: 'request_processing_failed',
                  message: 'data not found for given dns'
            }
        }

    요청 예시 : Body (application/JSON)

    { 
        "email": "e2reseller+1@idrivee2.com",
        "storage_dn": "abcd.test.idrivee2.com",
        "cname" : "example.mycloud.io"
    }

    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:<your api key>'

서브유저 작업

IDrive® e2 서브유저 API는 리셀러 계정에서 지원됩니다. 리셀러 관리자는 자신의 계정에 속한 모든 사용자를 대신하여 이 API를 호출할 수 있습니다. 즉, 리셀러 관리자는 자신의 API 키를 사용해 연결된 사용자들의 서브유저 관리 작업을 수행할 수 있습니다.

이 기능을 사용하려면 모든 API 요청에 추가 필수 파라미터인 admin_email이 포함되어야 합니다. 요청 본문에 admin_email 파라미터가 없으면 리셀러 계정의 요청은 처리되지 않습니다.

열거형:

서브유저 권한:
{
    0: 읽기 권한,
    1: 쓰기 권한,
    2: 읽기/쓰기 권한
}
  1. 서브유저 초대

    PUT
    https://api.idrivee2.com/api/subusers/v1/invite복사하려면 클릭링크가 복사되었습니다 이 API는 요청에 지정된 서브유저 이메일로 서브유저 계정 생성 초대를 보냅니다.

    입력

                            string subuser_email;
    boolean disable_delete_object; // optional
    int permissions;
    boolean is_admin;
    boolean sso_login; // optional
    boolean allow_session_timeout_settings;
    int idle_timeout;
    boolean concurrent_sessions;
    boolean allow_concurrent_session_settings;
    Object[] storage_access; // optional
    string admin_email;

    참고:

    • "subuser_email" - 초대를 보낼 서브유저의 이메일 주소
    • "disable_delete_object" - false로 전송 시 서브유저가 객체 삭제를 수행할 수 있도록 하는 불리언 값, 기본값은 true
    • "pemissions" - 열거형 매개변수로, 0 = 읽기 전용 권한, 1 = 업로드 전용 권한, 2 = 읽기 및 쓰기 권한
    • "is_admin" - true로 전송 시 서브유저를 관리자 서브유저로 지정하는 불리언 값. 이 플래그를 true로 설정하면 서브유저에게 모든 스토리지 접근(읽기 & 쓰기) 권한이 부여됩니다.
    • "sso_login" - 서브유저에 대해 SSO 로그인 활성화 여부를 설정하는 불리언 값
    • "allow_session_timeout_settings" - true로 전송 시 서브유저가 세션 시간 초과 설정을 구성할 수 있도록 하는 불리언 값
    • "idle_timeout" - 관리자가 서브유저의 세션 시간 초과(초 단위)를 구성하려는 경우 사용. 최대 허용 값은 3600초(1시간)
    • "concurrent_sessions" - true로 전송 시 서브유저가 여러 동시 세션을 가질 수 있도록 하는 불리언 값
    • "allow_concurrent_session_settings" - true로 전송 시 서브유저가 여러 동시 세션 설정을 구성할 수 있도록 하는 불리언 값
    • "storage_access" - 관리자가 서브유저의 접근을 특정 버킷으로 제한하려는 경우 사용하는 권한 객체 배열. 예를 들어, 관리자가 서브유저에게 시카고 리전의 "bucket1" 및 "bucket2"와 아일랜드 리전의 "bucket3" 및 "bucket4"에 대한 접근 권한을 부여하려는 경우, 다음과 같이 storage_access 배열을 설정해야 합니다:
      [
                                          
       {
          "storage_dn": "h4l1.ch.idrivee2-29.com", // 시카고 리전의 S3 엔드포인트
          "buckets": [
              "bucket1", "bucket2"
          ]
       },
       {
          "storage_dn": "r8l2.ie.idrivee2-44.com", // 아일랜드 리전의 S3 엔드포인트
          "buckets": [
              "bucket3", "bucket4"
          ]
       }
      ]

      "storage_access"는 선택적 매개변수이며, 관리자가 서브유저의 버킷 수준 접근을 제어하려는 경우에만 전송해야 합니다.

    출력
    성공 시 API 응답 (application/JSON) :

    { 
        result: "invite successful",
        invite_url: "invitation url string"
    }

    길이 매개변수

    • email[255]
  2. 특정 오류 사례

    1. 계정에 허용된 하위 사용자의 수 제한을 초과한 경우
      응답 (application/JSON) :{ 
          error: {
              type: 'invalid_request_error',
              code: 'maximum_limit_reached',
              message: <한도에 대한 정보>
          }
      }
    2. sso_login이 true로 전달되었고 SSO가 구성되지 않은 경우
      응답 (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'sso_not_configured',
              message: 'SSO가 구성되어 있지 않습니다'
          }
      }

      요청 예시 :본문 (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"
      }

      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. 모든 하위 사용자 목록

    POST
    https://api.idrivee2.com/api/subusers/v1/listClick to copyLink copied 프로필에 추가된 모든 하위 사용자를 표시합니다.

    입력

    string admin_email; 

    출력
    API는 프로필에 추가된 사용자 배열을 반환합니다.
    응답 구조는 다음과 같습니다:

                                     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;
    }

    참고
    사용자 객체 매개변수는 초대 API에서 설명한 요청 본문 매개변수에 해당합니다. 자세한 내용은 초대 API를 참고하세요.

    Curl 요청 예시

                                        curl --request POST 'https://api.idrivee2.com/api/subusers/v1/list' 
    --data '{
        "admin_email": "abc@example.com"
    }'
    --header 'token: <your api key>'
  4. 하위 사용자 생성

    PUT
    https://api.idrivee2.com/api/subusers/v1/create_account복사하려면 클릭링크가 복사되었습니다 계정에 연결될 하위 사용자 계정을 생성합니다.

    입력

                                        string subuser_email;
    boolean disable_delete_object; // 선택 사항
    int permissions;
    boolean is_admin;
    boolean sso_login; // 선택 사항
    boolean allow_session_timeout_settings;
    int idle_timeout;
    boolean concurrent_sessions;
    boolean allow_concurrent_session_settings;
    Object[] storage_access; // 선택 사항
    string admin_email;
    string first_name;
    string last_name; // 선택 사항
    string password; // base64 인코딩 문자열

    참고
    요청 본문 매개변수의 자세한 내용은 하위 사용자 초대 API를 참고하세요.

    길이 매개변수

    • 이메일 [255]
    • 비밀번호 [100]
    • 이름 [64]
    • 성 [64]

    출력
    성공 시 API 응답(application/JSON)은 다음과 같습니다:

    { success: true }

    특정 오류 사례

    1. 계정에 허용된 하위 사용자 수 제한을 초과한 경우
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'maximum_limit_reached',
              message: 'information about your limit'
          }
      }
    2. 스토리지가 존재하지 않습니다.
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'storage_non_existant',
              message: 'Storage does not exist'
          }
      }
    3. 사용자가 이미 존재합니다
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'user_already_signedup',
              message: 'User signed up'
          }
      }
    4. sso_login이 true로 전송되었고 SSO가 구성되지 않은 경우
      응답 (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'sso_not_configured',
              message: 'SSO가 구성되지 않았습니다'
          }
      }

    요청 예시 :본문 (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”
    }

    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. 하위 사용자 비활성화

    POST
    https://api.idrivee2.com/api/subusers/v1/disable클릭하여 복사링크가 복사되었습니다 이 API는 하위 사용자 계정을 비활성화합니다. 하위 사용자는 로그인, 데이터 접근 및 모든 작업을 수행할 수 없게 됩니다.

    입력

                                        string subuser_email;
    string admin_email;
    bool email_notification; // 이 매개변수가 true로 설정된 경우에만 하위 사용자에게 이메일 알림이 전송됩니다

    길이 매개변수

    • 이메일 [255]

    사전 조건

    • 사용자가 가입되어 있어야 합니다.
    • 계정이 활성화되어 있어야 합니다.

    출력
    성공 시 API 응답 (application/JSON)은 다음과 같습니다:

    { success: true }

    특정 오류 사례

    1. 하위 사용자가 가입되지 않은 경우
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'user_not_signed_up',
              message: 'Subuser is not signed up'
          }
      }
    2. 하위 사용자 계정이 이미 비활성화된 경우
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'user_account_already_disabled',
              message: 'Account already disabled for the user'
          }
      }
    3. 계정이 존재하지 않는 경우
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'account_non_existant',
              message: 'Account with this email does not exist'
          }
      }

    요청 예시 :본문 (application/JSON)

    { 
      "subuser_email": "abc1@example.com",
      "admin_email": "admin1@example.com",
      "email_notification": true
    }

    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. 하위 사용자 활성화

    POST
    https://api.idrivee2.com/api/subusers/v1/enable클릭하여 복사링크가 복사되었습니다 이 API는 비활성화된 하위 사용자 계정을 다시 활성화합니다. 하위 사용자는 활성화 후 로그인하고 데이터에 액세스하며 일반 작업을 수행할 수 있습니다.

    입력

                                        string subuser_email;
    string admin_email;
    bool email_notification; // 이 매개변수가 true로 설정된 경우에만 하위 사용자에게 이메일 알림이 전송됩니다

    출력
    성공 시 API 응답 (application/JSON)은 다음과 같습니다:

    { success: true }

    길이 매개변수

    • 이메일 [255]

    사전 조건

    • 사용자가 가입/생성되어 있어야 합니다.
    • 사용자 계정이 이전에 비활성화되어 있어야 합니다.

    특정 오류 케이스

    1. 하위 사용자가 가입하지 않은 경우
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'user_not_signed_up',
              message: 'Subuser is not signed up'
          }
      }
    2. 하위 사용자 계정이 이미 활성화된 경우
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'user_account_already_enabled',
              message: 'Account already enabled for the user'
          }
      }
    3. 계정이 존재하지 않는 경우
      Response (application/JSON) : { 
          error: {
              type: 'invalid_request_error',
              code: 'account_non_existant',
              message: 'Account with this email does not exist'
          }
      }

    요청 예시 :본문 (application/JSON)

    { 
        "subuser_email": "abc1@example.com",
        "admin_email": "admin1@example.com",
        "email_notification": true
    }

    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. 하위 사용자 제거

    POST
    https://api.idrivee2.com/api/subusers/v1/removeClick to copyLink copied 이 API는 IDrive® e2에서 사용자를 영구적으로 삭제합니다.
    참고: 이 작업을 수행하면 사용자 데이터가 영구적으로 삭제됩니다.

    입력

                                        string subuser_email;
    string admin_email;
    bool email_notification; // 이 매개변수가 true로 설정된 경우에만 하위 사용자에게 이메일 알림이 전송됩니다

    길이 매개변수

    • 이메일 [255]

    사전 조건

    • 사용자가 비활성화되어 있어야 합니다.

    출력
    성공 시 API 응답(application/JSON)은 다음과 같습니다:

    { success: true }

    길이 매개변수

    • 이메일 [255]

    특정 오류 사례

    1. 하위 사용자가 가입되지 않은 경우
      응답 (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'user_not_signed_up',
              message: '하위 사용자가 가입되어 있지 않습니다'
          } }
    2. 하위 사용자 계정이 비활성화되지 않은 경우
      응답 (application/JSON) : {
                                           error: {
              type: 'invalid_request_error',
              code: 'user_account_not_disabled',
              message: '사용자 계정이 비활성화되지 않았습니다'
          } }
    3. 계정이 존재하지 않는 경우
      응답 (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'account_non_existant',
              message: '이 이메일의 계정이 존재하지 않습니다'
          } }

    요청 예시 :본문 (application/JSON)

    {
        "subuser_email": "abc1@example.com",
        "admin_email": "admin1@example.com",
        "email_notification": true
    }

    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. 초대 취소

    POST
    https://api.idrivee2.com/api/subusers/v1/invite/cancelClick to copyLink copied 이 API는 하위 사용자에게 전송된 초대를 취소합니다.

    입력

                                  string subuser_email;
    string admin_email;

    길이 매개변수

    • 이메일 [255]

    사전 조건

    • 사용자가 이미 가입된 상태가 아니어야 합니다.

    출력
    성공 시 API 응답(application/JSON)은 다음과 같습니다 :

    { success: true }

    특정 오류 사례

    1. 하위 사용자가 이미 가입된 경우
      응답 (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'user_already_signedup',
              message: '사용자가 가입되었습니다'
          }
      }

    요청 예시 :본문 (application/JSON)

    {
        "subuser_email": "abc1@example.com",
        "admin_email": "admin1@example.com"
    }

    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. 하위 사용자 업데이트

    POST
    https://api.idrivee2.com/api/subusers/v1/update복사하려면 클릭링크가 복사되었습니다 이 API는 하위 사용자의 액세스, 권한, SSO 및 세션 제어를 업데이트합니다. 이 API는 초대된 하위 사용자와 가입 완료된 하위 사용자 모두를 업데이트하는 데 사용할 수 있습니다.

    입력

                                  string subuser_email;
    boolean disable_delete_object; // 선택 사항
    int permissions; // 선택 사항
    boolean is_admin; // 선택 사항
    boolean sso_login; // 선택 사항
    boolean allow_session_timeout_settings; // 선택 사항
    int idle_timeout; // 선택 사항
    boolean concurrent_sessions; // 선택 사항
    boolean allow_concurrent_session_settings; // 선택 사항
    Object[] storage_access; // 선택 사항
    string admin_email;
    boolean expire_subuser_sessions; // 선택 사항, true이면 기존 사용자 세션이 만료됩니다

    참고

    요청 본문 파라미터의 자세한 내용은 하위 사용자 초대 API를 참조할 수 있습니다. 업데이트가 필요한 파라미터만 요청 본문에 포함해야 합니다.

    출력
    성공 시 API 응답(application/JSON)은 다음과 같습니다:

    { success: true }

    길이 파라미터

    • 이메일 [255]

    특정 오류 사례

    1. 스토리지가 존재하지 않음
      응답 (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'storage_non_existant',
              message: '스토리지가 존재하지 않습니다'
          }
      }
    2. 계정이 존재하지 않음
      응답 (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'account_non_existant',
              message: '이 이메일의 계정이 존재하지 않습니다'
          }
      }
    3. sso_login이 true로 전송되고 SSO가 구성되지 않은 경우
      응답 (application/JSON) : {
          error: {
              type: 'invalid_request_error',
              code: 'sso_not_configured',
              message: 'SSO가 구성되지 않았습니다'
          }
      }

    요청 예시 : 본문 (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"
    }

    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. 활동 로그 조회

    POST
    https://api.idrivee2.com/api/subusers/v1/user_activity_history클릭하여 복사링크가 복사되었습니다 이 API는 지정한 날짜 범위에 대해 하위 사용자의 활동 로그를 조회합니다.

    입력

                                     string subuser_email;
    string admin_email;
    string start_date;
    string end_date;
    int page_no;

    길이 매개변수

    • 이메일 [255]

    참고

    start_date (ISO8601) - 시작 날짜
    end_date (ISO8601) - 종료 날짜
    page_no - API는 페이지당 200개 레코드로 페이지네이션됩니다
    그리고 page_no1부터 시작합니다

    출력
    성공 시 API 응답(application/JSON)은 다음과 같습니다:

                                     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;
    }

    특정 오류 사례

    1. 하위 사용자가 가입되지 않은 경우
      Response (application/JSON) : { 
          error:{
              type: 'invalid_request_error',
              code: 'user_not_signed_up',
              message: 'Subuser is not signed up'
          }
      }
    2. 계정이 존재하지 않는 경우
      Response (application/JSON) : { 
          error:{
              type: 'invalid_request_error',
              code: 'account_non_existant',
              message: 'Account with this email does not exist'
          }
      }

    요청 예시 : 본문 (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
    }

    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>'