リセラーAPIのコレクション
IDrive®e2 Reseller APIはRESTアーキテクチャで開発されています。
IDrive®e2 Reseller APIはコンテンツタイプ'application/JSON'形式のリクエストボディを受け入れ、'application/JSON'応答を返します。
弊社のAPIはAPIキー認証メカニズムを使用しています。IDrive®e2アカウントのプロファイルセクションからAPIキーを生成することができます。
キー 'token' に対するすべての HTTP API 呼び出しヘッダーに、プロファイルセクションから生成された API キーを追加します。
HTTPレスポンスコード:
- 200(成功)
- 500(サーバーエラー)
- 400(無効なパラメータ)
- 401(未承認)
- 403(無効なリクエスト)
エラー・レスポンス・ボディは以下のような構造である:
Response (application/JSON) : {
error : {
string type;
string code;
string message;
}
}
'error.type'に指定できる値は以下のとおり:
error.code'と'error.message'を見れば、何が問題だったのかがわかるだろう。
よくあるエラー事例
以下は、以下のすべてのAPIで返される一般的なエラーケースである。その他のエラーケースについては、それぞれのAPIで説明します。
- サーバーエラー(HTTP 500)
Response (application/JSON) : {
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - 認証されていません (HTTP 401)
Response (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'unauthorized',
message: 'Authentication header missing/invalid'
}
} - 無効なパラメータ (HTTP 400)
Response (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'invalid_parameters',
message: 'Invalid parameter values, check errors for details',
errors: [] (array contain details of error)
}
}
AUTHORIZATION ヘッダー API キー
キー | トークン |
価値 | <YOUR-API-KEY> |
API全体で使用される列挙は以下の通り:
列挙:
アクセスキーのパーミッション:
{
0: Read access,
1: Write access,
2: Read/Write access
}
ユーザーオペレーション
- 全ユーザーのリスト
ゲット
https://api.idrivee2.com/api/reseller/v1/usersクリックしてコピーコピーされたリンク あなたのプロフィールに追加されたすべてのユーザーを表示します。
出力
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;
} - ユーザー作成
- クォータ(GB)(無制限は0、それ以外は>0)
- パスワードはbase64エンコードされた文字列である。
- email_notification 提供され、falseに設定された場合、指定されたメールアドレスに電子メール通知は送信されない。
- メール [255]
- パスワード [100]
- ファーストネーム【64
- ラストネーム【64
- 無効なリクエスト (HTTP-403)
- ユーザーはすでに存在し、あなたのアカウントにリンクされています。
{
error:{
type: 'invalid_request_error',
code: 'user_signed_up',
message : 'User already signed up'
}
} -
すでに使用されている電子メール(お客様のアカウントにリンクされていない独立したアカウントが存在します)。
{
error:{
type: 'invalid_request_error',
code: 'email_already_in_use',
message: 'Email already in use'
}
}
- ユーザーはすでに存在し、あなたのアカウントにリンクされています。
- ユーザーを無効にする
- メール [255]
- ユーザーが登録しました。
- アカウントが有効。
- 無効なリクエスト (HTTP 403)
- アカウントはすでに無効になっています。
error:{
type: 'invalid_request_error',
code: 'user_account_already_disabled',
message: 'Account already disabled for the user'
}
} - アカウントが存在しない。
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
- アカウントはすでに無効になっています。
- ユーザーを有効にする
- メール [255]
- ユーザーがサインアップ/作成されました。
- ユーザーアカウントは以前に無効化されています。
- 無効なリクエスト (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: 'user_account_already_enabled',
message: 'Account already enabled for the user'
}
}
- アカウントが存在しない。
- ユーザー削除
- メール [255]
- ユーザーを無効にしなければならない。
- 無効なリクエスト (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: 'user_account_not_disabled',
message: 'User account not disabled'
}
}
- アカウントが存在しない。
- ストレージ使用量の取得
- メール [255]
- ユーザー登録が必要です。
- 無効なリクエスト (HTTP 403)
- アカウントが存在しない。
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
- アカウントが存在しない。
- アクティビティログの取得
- メール [255]
- アカウントが存在しない。
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
}
注意
ストレージ使用量(バイト)
storage_quota(GB) (0 : 無制限、それ以外は > 0)
invite_url(nullでない場合、招待されたユーザーがサインアップする際に使用可能
Curl リクエスト例:
curl --request GET 'https://api.idrivee2.com/api/reseller/v1/users' --header 'token: <your api key>'
プット
https://api.idrivee2.com/api/reseller/v1/create_userクリックしてコピーコピーされたリンク
このAPIはIDrive®e2にユーザーアカウントを作成し、お客様のアカウントにリンクします。
インプット
文字列Eメール
string password; //base64エンコードされた文字列
文字列first_name;
stringlast_name; //last_nameはオプションのパラメータです。
intクォータ;
bool email_notification; //email_notificationはオプションのパラメータです。
注:
長さパラメータ
出力
成功時のAPIレスポンス(application/JSON)は:
{ user_created: true }
エラー事例
リクエスト例 :本文 (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>'
ポスト
https://api.idrivee2.com/api/reseller/v1/disable_userクリックしてコピーコピーされたリンク
このAPIは、ユーザー・アカウントを無効にします。ユーザはログインやデータへのアクセス、操作を行うことができなくなります。
インプット
文字列の電子メール;
長さパラメータ
前提条件
出力
成功時のAPIレスポンス(application/JSON)は:
{ user_disabled : true }
エラー事例
リクエスト例 :本文 (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}
Curl リクエスト例:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/disable_user'
--data '{
"email":"e2reseller+1@idrivee2.com"
}'
ポスト
https://api.idrivee2.com/api/reseller/v1/enable_userクリックしてコピーコピーされたリンク
このAPIは、無効化されたユーザー・アカウントを再有効化する。ユーザーはログインし、データにアクセスし、通常の操作を行うことができます。
インプット
文字列の電子メール;
長さパラメータ
前提条件
出力
成功時のAPIレスポンス(application/JSON)は以下のようになる:
{ user_enabled : true }
エラー事例
リクエスト例 :本文 (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}
Curl リクエスト例:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/enable_user'
--data '{
"email":"e2reseller+1@idrivee2.com"
}' --header 'token: <your api key>'
ポスト
https://api.idrivee2.com/api/reseller/v1/remove_userクリックしてコピーコピーされたリンク
このAPIはIDrive®e2からユーザーを完全に削除します。
注意:この操作を行うと、ユーザーデータは永久に失われます。
インプット
文字列の電子メール;
長さパラメータ
前提条件
出力
成功時のAPIレスポンス(JSON)は以下のようになります:
{ user_removed : true }
エラー事例
リクエスト例 :本文 (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}
Curl リクエスト例:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/remove_user'
--data '{
"email":"e2reseller+1@idrivee2.com"
}' --header 'token: <your api key>'
ポスト
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)(終了日)
長さパラメータ
前提条件
出力
usage_stats構造体の配列
struct usage_stats{
double downloads;
double uploads;
double disk_used;
string date;
}
ダウンロード数、アップロード数、disk_usedの単位はバイトです。
エラーのケース
リクエスト例 :本文 (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"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>'
ポスト
https://api.idrivee2.com/api/reseller/v1/user_activity_historyクリックしてコピーコピーされたリンク
このAPIは、ある日付範囲のユーザーのアクティビティログを取得する。
インプット
文字列の電子メール
文字列 start_date;
文字列 end_date;
int page_no;
長さパラメータ
注
開始日 (ISO8601) - 開始日
終了日 (ISO8601) - 終了日
ページ番号 - APIはページ分割され、各ページは200レコードで構成される
page_noは 1以降から始まる
出力
成功時の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;
}
特定のエラーケース
リクエスト例 :本文 (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>'
ストレージ・オペレーション
- 地域一覧
ゲット
https://api.idrivee2.com/api/reseller/v1/regionsクリックしてコピーコピーされたリンク この 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>'
- ユーザーのリージョンを有効にする
- メール [255]
- 地域[5]
- 既存のユーザーアカウント。
- リージョンはユーザーに対して有効であってはならない。
- 無効なリクエスト (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: 'region_already_enabled',
message: 'Storage region already enabled for user'
}
} - ユーザーは使用不可。
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
} - アカウントの支払いに失敗しました。
{
error:{
type: 'invalid_request_error',
code: 'payment_failed',
message: 'Account expired please update payment info'
}
}
- アカウントが存在しない。
- ユーザー使用可能地域のリスト
ポスト
https://api.idrivee2.com/api/reseller/v1/list_user_regionsクリックしてコピーコピーされたリンク このAPIは、ユーザーのすべての有効なリージョンをリストする。
インプット
{
string email;
}長さパラメータ
- メール [255]
前提条件
- 既存のユーザーアカウント。
出力
成功時のAPIレスポンス(application/JSON)は:
{
user_regions: /*lists user enabled regions*/
}エラー事例
- 無効なリクエスト (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: 'user_disabled',
message: 'User Disabled'
}
}
- アカウントが存在しない。
リクエスト例 :本文 (application/JSON)
{
"email":"e2reseller+1@idrivee2.com"
}Curl リクエスト例:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/list_user_regions'
--data '{
"email":"e2reseller+1@idrivee2.com"
}' --header 'token: <your api key>' - ユーザーに割り当てられた地域を削除する
- メール [255]
- ストレージ_dn[128]
- ユーザーが登録しました。
- ストレージはユーザーに割り当てられるべきである。
- ユーザーが作成したバケットがない
- 無効なリクエスト (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: 'storage_non_existant',
message: 'Storage does not exists'
}
} - ストレージが空でない。
{
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'
}
}
- アカウントが存在しない。
- ユーザー地域のcors設定を更新
- 無効なリクエスト (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: 'storage_non_existant',
message: 'Storage does not exists'
}
} - cors パラメータが無効です。
{
error:{
type: 'invalid_request_error',
code: 'invalid_cors_policy',
message: 'The cors policy is invalid' / 'Maximum 10 cors are allowed'
}
}
- アカウントが存在しない。
- アクセスキーの追加
- ユーザーがサインアップ/作成され、有効になりました。
- 各ユーザーに割り当てられたストレージDN。
- バケツが提供されている場合、空であってはならない。
- メール [255]
- storage_dn[128]
- 名前[64]
- 無効なリクエスト (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: 'storage_non_existant',
message: 'Storage does not exists'
}
} - ユーザーは使用不可。
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- アカウントが存在しない。
- アクセスキー一覧
- メール [255]
- storage_dn[128]
- ユーザーがサインアップ/作成され、有効になりました。
- ユーザーに割り当てられたストレージ。
- 無効なリクエスト (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: 'storage_non_existant',
message: 'Storage does not exist'
}
} - ユーザーは使用不可。
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled '
}
}
- アカウントが存在しない。
ポスト
https://api.idrivee2.com/api/reseller/v1/enable_user_regionクリックしてコピーコピーされたリンク
このAPIはユーザーのために地域を有効にする。
インプット
{
string email;
string region;
}
例:"TX"、"LDN "など。
APIは、アクセスキーとシークレットキーを使用してユーザーストレージにアクセスできる有効なリージョンのストレージDN(ドメイン名)を返す。
長さパラメータ
前提条件
出力
成功時のAPIレスポンス(application/JSON)は:
{ storage_added: true, storage_dn: /*user_storage_dns*/ }
エラー事例
リクエスト例 :本文 (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"region": "NY"
}
Curl リクエスト例:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/enable_user_region'
--data '{
"email":"e2reseller+1@idrivee2.com",
"region": "NY"
}' --header 'token: <your api key>'
ポスト
https://api.idrivee2.com/api/reseller/v1/remove_user_regionクリックしてコピーコピーされたリンク
このAPIは、ユーザーに割り当てられたリージョンを削除する。
インプット
{
string email;
string storage_dn;
}
storage_dn」は、削除したいユーザーに割り当てられたストレージ・ドメインである。
長さパラメータ
前提条件
この操作を行うと、ユーザーデータが削除されますのでご注意ください。
APIは、以下の場合にユーザーリージョンを削除することができます。
ユーザーが無効状態
出力
成功すると、APIはレスポンス(JSON)を返します:
{removed : true}
エラー事例
リクエスト例 :本文 (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test@idrivee2.com"
}
Curl リクエスト例:
curl --request POST 'https://api.idrivee2.com/api/reseller/v1/remove_user_region'
--data '{
"email":"e2reseller+1@idrivee2.com",
"storage_dn": "abcd.test@idrivee2.com"
}' --header 'token: <your api key>'
方法だ: ポスト
URL: https://api.idrivee2.com/api/reseller/v1/storage/set_corsクリックしてコピーコピーされたリンク
この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を "*"に設定することができます。
出力
成功すると、APIはResponse(application/JSON)を返す:
{
cors_updated: true
}
エラー事例
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",
}'
ポスト
https://api.idrivee2.com/api/reseller/v1/create_access_keyクリックしてコピーコピーされたリンク
このAPIは、ストレージアクセス用のAccess Keyを作成し、Access Key IDとSecret Keyを返す。
インプット
{
string email;
string storage_dn;
string name;
int permissions;
array buckets; //buckets is an optional parameter
}
バケット:ストレージにアクセスするための、指定したバケツに対するアクセスキーを作成するために、バケツ名のリストを指定します。アクセスキーがすべてのバケツに対するものである場合は、'buckets' の入力は不要です。
前提条件
長さパラメータ
アクセスキーのパーミッション列挙:
{
0: Read access
1: Write access
2: Read/Write access
}
出力
成功すると、APIはResponse(application/JSON)を返す:
{
created: true,
data: {
access_key: /access key/
secret_key: /* secret key*/
}
}
エラー事例
リクエスト例 :本文 (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"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@idrivee2.com",
"storage_dn":"abcd.test@idrivee2.com",
"name":"myaccesskeyname",
"permissions":0
}' --header 'token: <your api key>'
ポスト
https://api.idrivee2.com/api/reseller/v1/list_access_keysクリックしてコピーコピーされたリンク
このAPIは、ストレージのすべてのアクセスキーを一覧表示する。
インプット
{
string email;
string storage_dn;
}
storage_dn' は、すべてのアクセス・キーを一覧表示したいユーザーに割り当てられたストレージ・ドメインである。
長さパラメータ
前提条件
出力
成功すると、APIはResponse(application/JSON)を返す:
{
'storage_dn' : /*user_storage_dns*/,
'access_keys' : [
{
'key_id' : /*key_id*/,
'name' : /*key_name*/,
'creation_date' : /*date_of_key_creation*/,
'description' : /*description_of_access_key_permissions*/
},
{...},
…
]
}
エラー事例
リクエスト例 : 本体 (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@idrivee2.com",
"storage_dn":"abcd.test.idrivee2.com",
}' --header 'token:<your api key>'
ポスト
https://api.idrivee2.com/api/reseller/v1/storage/cname/updateクリックしてコピーコピーされたリンク
このAPIは、ストレージのアクセスキーを削除する。
インプット
{
string email;
string storage_dn;
string access_key;
}
長さパラメータ
- メール [255]
- storage_dn[128]
- アクセスキー[128]
前提条件
- ユーザーがサインアップ/作成され、有効になりました。
- ユーザーに割り当てられたストレージ。
- ストレージにアクセスキーが存在する。
出力
成功すると、APIはResponse(application/JSON)を返す:
{removed : 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: 'storage_non_existant',
message: 'Storage does not exists'
}
} - ユーザーは使用不可。
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
} - アクセスキーが存在しない。
{
error:{
type: 'invalid_request_error',
code: 'access_key_non_existant',
message: 'Access key does not exist, please provide a valid access key'
}
}
- アカウントが存在しない。
リクエスト例 :本文 (application/JSON)
{
"email":"e2reseller+1@idrivee2.com",
"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@idrivee2.com",
"storage_dn":"abcd.test@idrivee2.com",
"access_key":"<your access key>"
}' --header 'token: <your api key>'
ホワイトラベル業務
- CNAMEを追加する
ポスト
https://api.idrivee2.com/api/reseller/v1/storage/cname/addクリックしてコピーコピーされたリンク このAPIは、指定されたストレージのDNSにCNAMEを追加する。
インプット
{
string email;
string storage_dn;
string cname;
string public_key;
string private_key;
string file_index;
string passphrase; // optional, need to be sent only in case of encrypted private key
}storage_dn」は、ユーザーに割り当てられたストレージ・ドメインである。
'CNAME'は新しいCNAMEを割り当てる必要がある。
file_index' はオプションのパラメータである。
長さパラメータ
- email[255]
- storage_dn[128]
- CNAME[128]
- パブリックキー[10000]
- private_key[6000]
- ファイルインデックス[64]
- パスフレーズ[255]
前提条件
- ユーザーがサインアップ/作成され、有効になりました。
- ユーザーに割り当てられたストレージ。
出力
成功すると、APIはResponse(application/JSON)を返す:
{ 'cname_added' : true }
エラー事例
- 無効なリクエスト (HTTP 403)
- アカウントが存在しない。
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - CNAMEは使用できません
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'this CNAME cannot be used, please try changing your CNAME'
}
} - ストレージ・ドメインが存在しないstorage_ dnsが間違っている場合
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - CNAMEがすでに設定されている場合
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'CNAME already configure'
}
} - 無効なCNAMEまたは証明書公開秘密鍵が間違っている場合
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Could not verify CNAME or certificates. Please try again'
}
}
- アカウントが存在しない。
- サーバーエラー(HTTP 500)
- このリクエストを処理できません
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - 指定されたDNSのデータが見つからない
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- このリクエストを処理できません
リクエスト例 : 本体 (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>' - リストCNAME
ポスト
https://api.idrivee2.com/api/reseller/v1/storage/cnameクリックしてコピーコピーされたリンク このAPIはストレージの全てのCNAMEをリストアップする。
インプット
{
string email;
string storage_dn;
}storage_dn' はすべてのCNAMEをリストアップしたいユーザーに割り当てられたストレージドメインです。
長さパラメータ
- email[255]
- storage_dn[128]
前提条件
- ユーザーがサインアップ/作成され、有効になりました。
- ユーザーに割り当てられたストレージ。
出力
成功すると、APIはResponse(application/JSON)を返す:
{
'cname_list' : [
{
file_index: /*file_index*/,
cname: /*cname*/,
certificate_info: /*isValidSsl.certInfo*/
creation_date: /*creation_date*/
}
{...},
]
}
エラー事例
- 無効なリクエスト (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: 'user_disabled',
message: 'User Disabled'
}
}
- アカウントが存在しない。
- サーバーエラー(HTTP 500)
- このリクエストを処理できません
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - 指定されたDNSのデータが見つからない
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- このリクエストを処理できません
リクエスト例 : 本体 (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>' - CNAMEの更新
ポスト
https://api.idrivee2.com/api/reseller/v1/storage/cname/updateクリックしてコピーコピーされたリンク このAPIは、指定されたストレージのDNSのCNAMEを更新する。
インプット
{
string region_key;
string email;
string storage_dn;
string cname;
string public_key;
string private_key;
string file_index;
string passphrase; // optional, need to be sent only in case of encrypted private key
}storage_dn」は、ユーザーに割り当てられたストレージ・ドメインである。
'CNAME'はすでに存在するCNAMEと置き換える必要のある新しいCNAMEである。
'file_indexはオプションのパラメータです。
長さパラメータ
- email[255]
- storage_dn[128]
- CNAME[128]
- パブリックキー[10000]
- private_key[6000]
- ファイルインデックス[64]
- パスフレーズ[255]
前提条件
- ユーザーがサインアップ/作成され、有効になりました。
- ユーザーに割り当てられたストレージ。
出力
成功すると、APIはResponse(application/JSON)を返す:
{ 'cname_updated' : true }
エラー事例
- 無効なリクエスト (HTTP 403)
- アカウントが存在しない。
{
error:{
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - CNAMEは使用できませんCNAMEがidriveドメインの場合
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'this CNAME cannot be used, please try changing your CNAME'
}
} - ストレージ・ドメインが存在しないstorage_ dnsが間違っている場合
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - storage_dn が間違っている場合
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - ストレージサーバーに到達できないドメインが存在しないストレージ_dnsが利用できない場合
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Storage server cannot be reached right now, please try again later'
}
} - CNAMEがすでに設定されている場合
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'CNAME already configured'
}
} - 無効なCNAMEまたは証明書公開秘密鍵が間違っている場合
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Could not verify CNAME or certificates. Please try again'
}
} - ユーザー無効
{
error:{
type: 'invalid_request_error',
code: 'user_disabled',
message: 'User Disabled'
}
}
- アカウントが存在しない。
- サーバーエラー(HTTP 500)
- このリクエストを処理できません
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - 指定されたDNSのデータが見つからない
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- このリクエストを処理できません
リクエスト例 : 本体 (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>' - CNAMEを削除する
ポスト
https://api.idrivee2.com/api/reseller/v1/storage/cname/removeクリックしてコピーコピーされたリンク このAPIはストレージdnsのCNAMEを削除する。
インプット
{
string email;
string storage_dn;
string cname;
}storage_dn」は、ユーザーに割り当てられたストレージ・ドメインである。
CNAME: 削除が必要なCNAMEを指定する。
長さパラメータ
- email[255]
- storage_dn[128]
- CNAME[128]
前提条件
- ユーザーがサインアップ/作成され、有効になりました。
- ユーザーに割り当てられたストレージ。
- CNAMEはストレージドメインにマッピングされるべきである。
出力
成功すると、APIはResponse(application/JSON)を返す:
{ 'cname_removed' : 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: 'user_disabled',
message: 'User Disabled'
}
} - CNAMEは使用できません
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'this CNAME cannot be used, please try changing your CNAME'
}
} - ストレージ・ドメインが存在しない
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Unable to retrieve storage info for given storage_dn'
}
} - ストレージサーバーにアクセスできない
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'Storage server cannot be reached right now, please try again later'
}
} - ストレージドメインにCNAMEが存在しない
{
error:{
type: 'invalid_request_error',
code: 'request_processing_failed',
message: 'cannot get cname details'
}
} - CNAMEの削除に失敗しましたCNAMEを削除できません
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
}
- アカウントが存在しない。
- サーバーエラー(HTTP 500)
- このリクエストを処理できません
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'Unable to process this request, please try again later'
}
} - 指定されたDNSのデータが見つからない
{
error:{
type: 'api_error',
code: 'request_processing_failed',
message: 'data not found for given dns'
}
}
- このリクエストを処理できません
リクエスト例 : 本体 (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 Subuser APIはリセラーアカウントでサポートされています。リセラー管理者は自分のアカウント下にいるユーザーの代理としてこれらのAPIを呼び出すことができます。言い換えると、リセラー管理者はAPIキーを使用して関連するユーザーのサブユーザー管理操作を実行することができます。
この機能を有効にするには、すべてのAPIリクエストにadmin_emailという追加の必須パラメータを含める必要があります。リクエスト本文にadmin_emailパラメータを含めないと、APIはリセラーアカウントからのリクエストを処理しません。
列挙:
Subuser Permissions:
{
0: Read access,
1: Write access,
2: Read/Write access
}
- サブユーザーを招待する
プット
https://api.idrivee2.com/api/subusers/v1/inviteクリックしてコピーコピーされたリンク このAPIは、リクエストに記載されたサブユーザのメールアドレスに、サブユーザのアカウント作成招待を送信する。
インプット
文字列 subuser_email;
boolean disable_delete_object; // オプション
int パーミッション
boolean is_admin;
boolean sso_login; // 任意
boolean allow_session_timeout_settings;
int idle_timeout;
boolean concurrent_sessions;
boolean allow_concurrent_session_settings; int idle_timeout; boolean concurrent_sessions; // オプション;
オブジェクト[] ストレージ・アクセス; // オプション
文字列 admin_email;
注:
- 「subuser_email"- 招待状を送りたいサブユーザーのメールアドレス。
- 「disable_delete_object"- falseとして送られた場合、サブユーザーにオブジェクトの削除を実行させるブール値。
- 「pemissions"- 列挙型パラメータ。0 = 読み取りのみ許可、1 = アップロードのみ許可、2 = 読み取りと書き込みの許可。
- "is_admin"- trueとして送信された場合、サブユーザを管理サブユーザとするために使用されるブール値です。このフラグをtrueに設定すると、サブユーザに全てのストレージアクセス(Read & Write)パーミッションが与えられます。
- "sso_login"- サブユーザーに対してSSOログインが有効かどうかを設定するブール値。
- 「allow_session_timeout_settings"- trueとして送られた場合、サブユーザーにセッションのタイムアウト設定を許可するブール値。
- 「idle_timeout"- 管理者ユーザがサブユーザのセッション・タイムアウト(秒単位)を設定したい場合。最大許容値は3600秒(1時間)です。
- 「concurrent_sessions"- trueと送信された場合、サブユーザーが複数の同時セッションを持つことを許可するブール値。
- 「allow_concurrent_session_settings"- trueとして送られた場合、サブユーザーに複数の同時セッション設定を許可するブール値。
- "storage_access" - 管理者が、サブユーザが限られたバケットにしかアクセスできないようにしたい場合。たとえば、管理者がサブユーザに対して、Chicago Region の "bucket1" と "bucket2" 、Ireland Region の "bucket3" と "bucket4" へのアクセスを許可したい場合、admin は storage_access 配列を以下のように設定します:
[
{
"storage_dn": "h4l1.ch.idrivee2-29.com", // S3 endpoint of your Chicago Region
"buckets": [
"bucket1", "bucket2"
]
},
{
"storage_dn": "r8l2.ie.idrivee2-44.com", // S3 endpoint of your Ireland Region
"buckets": [
"bucket3", "bucket4"
]
}
]storage_access "はオプションのパラメータであり、管理者ユーザがサブユーザへのバケツレベルのアクセスを制御したい場合にのみ送信されることに注意してください。
出力
成功時のAPIレスポンス(application/JSON)は:
{
result: "invite successful",
invite_url: "invitation url string"
}長さパラメータ
- email[255]
- アカウントに許可されたサブユーザー数の上限を超えた場合
Response (application/JSON) :{
error: {
type: 'invalid_request_error',
code: 'maximum_limit_reached',
message: <information about your limit>
}
} -
sso_loginがtrueとして送信され、SSOが設定されていない場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'sso_not_configured',
message: 'SSO is not configured'
}
}リクエスト例 :本文 (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>' -
すべてのサブユーザをリストする
ポスト
https://api.idrivee2.com/api/subusers/v1/listクリックしてコピーコピーされたリンク あなたのプロフィールの下に追加されたすべてのサブユーザが表示されます。
インプット
文字列 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;
}注
ユーザオブジェクトパラメータは、invitation 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>' -
サブユーザーの作成
プット
https://api.idrivee2.com/api/subusers/v1/create_accountクリックしてコピーコピーされたリンク これにより、あなたのアカウントにリンクされるサブユーザーアカウントが作成されます。
インプット
文字列 subuser_email;
boolean disable_delete_object; // オプション
int パーミッション
boolean is_admin;
boolean sso_login; // 任意
boolean allow_session_timeout_settings;
int idle_timeout;
boolean concurrent_sessions;
boolean allow_concurrent_session_settings; int idle_timeout; boolean concurrent_sessions; // オプション;
オブジェクト[] ストレージ・アクセス; // オプション
文字列 admin_email;
文字列 first_name;
string last_name; // オプション // オプション
文字列パスワード; // base64エンコードされた文字列
注
リクエストボディパラメータの詳細については、Invite subuser APIを参照してください。長さパラメータ
- メール [255]
- パスワード [100]
- ファーストネーム【64
- ラストネーム【64
出力
成功時のAPIレスポンス(application/JSON)は:{ success: true }
特定のエラーケース
- アカウントに許可されたサブユーザー数の上限を超えた場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'maximum_limit_reached',
message: 'information about your limit'
}
} - ストレージは存在しない。
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exist'
}
} - ユーザーが既に存在する
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_already_signedup',
message: 'User signed up'
}
} -
sso_loginがtrueとして送信され、SSOが設定されていない場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'sso_not_configured',
message: 'SSO is not configured'
}
}
リクエスト例 :本文 (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>' - サブユーザーを無効にする
ポスト
https://api.idrivee2.com/api/subusers/v1/disableクリックしてコピーコピーされたリンク このAPIはサブユーザーアカウントを無効にします。サブユーザはログインやデータへのアクセス、操作を行うことができなくなります。
インプット
文字列 subuser_email;
文字列 admin_email;
bool email_notification; // このパラメータがtrueに設定されている場合のみ、サブユーザへのメール通知が送信されます。
長さパラメータ
- メール [255]
前提条件
- ユーザーが登録しました。
- アカウントが有効。
出力
成功時のAPIレスポンス(application/JSON)は:{ success: true }
特定のエラーケース
- サブユーザーが登録されていない場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_not_signed_up',
message: 'Subuser is not signed up'
}
} - サブユーザーアカウントがすでに無効になっている場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_account_already_disabled',
message: 'Account already disabled for the user'
}
} - アカウントが存在しない
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>' - サブユーザーを有効にする
ポスト
https://api.idrivee2.com/api/subusers/v1/enableクリックしてコピーコピーされたリンク このAPIは、無効化されたサブユーザーアカウントを再び有効化する。サブユーザは、有効化された後、ログイン、データへのアクセス、および通常の操作を行うことができます。
インプット
文字列 subuser_email;
文字列 admin_email;
bool email_notification; // このパラメータがtrueに設定されている場合のみ、サブユーザへのメール通知が送信されます。
出力
成功時のAPIレスポンス(application/JSON)は:{ success: true }
長さパラメータ
- メール [255]
前提条件
- ユーザーがサインアップ/作成されました。
- ユーザーアカウントは以前に無効化されています。
特定のエラーケース
- サブユーザーが登録されていない場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_not_signed_up',
message: 'Subuser is not signed up'
}
} - サブユーザーアカウントがすでに有効になっている場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_account_already_enabled',
message: 'Account already enabled for the user'
}
} - アカウントが存在しない。
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>' - サブユーザーの削除
ポスト
https://api.idrivee2.com/api/subusers/v1/removeクリックしてコピーコピーされたリンク このAPIはIDrive®e2からユーザーを完全に削除します。
注意:この操作を行うと、ユーザーデータは永久に失われます。インプット
文字列 subuser_email;
文字列 admin_email;
bool email_notification; // このパラメータがtrueに設定されている場合のみ、サブユーザへのメール通知が送信されます。
長さパラメータ
- メール [255]
前提条件
- ユーザーを無効にしなければならない。
出力
成功時のAPIレスポンス(application/JSON)は:{ success: true }
長さパラメータ
- メール [255]
特定のエラーケース
- サブユーザーが登録されていない場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_not_signed_up',
message: 'Subuser is not signed up'
} } - サブユーザーアカウントが無効でない場合
Response (application/JSON) : { error: {
type: 'invalid_request_error',
code: 'user_account_not_disabled',
message: 'User account not disabled'
} } - アカウントが存在しない
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/remove'
--data '{
"subuser_email": "abc1@example.com",
"admin_email": "admin1@example.com",
"email_notification": true
}' --header 'token: <your api key>' - 招待のキャンセル
ポスト
https://api.idrivee2.com/api/subusers/v1/invite/cancelクリックしてコピーコピーされたリンク このAPIは、サブユーザーに送られた招待をキャンセルする。
インプット
文字列 subuser_email;
文字列 admin_email;
長さパラメータ
- メール [255]
前提条件
- ユーザーはまだサインアップしていない必要があります。
出力
成功時のAPIレスポンス(application/JSON)は:{ success: true }
特定のエラーケース
- サブユーザーが既にサインアップしている場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'user_already_signedup',
message: 'User signed up'
}
}
リクエスト例 :本文 (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>' - サブユーザーの更新
ポスト
https://api.idrivee2.com/api/subusers/v1/updateクリックしてコピーコピーされたリンク このAPIはサブユーザのアクセス、パーミッション、SSO、セッションコントロールを更新します。このAPIは、招待されたサブユーザとサインアップしたサブユーザの両方を更新するために使用できます。
インプット
文字列 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; // オプション; // オプション
オブジェクト[] ストレージアクセス; // オプション
文字列 admin_email;
boolean expire_subuser_sessions; // オプション、trueの場合は既存のユーザーセッションを期限切れにする
注
リクエスト・ボディ・パラメータの詳細については、Invite subuser APIを参照されたい。更新が必要なパラメータのみをリクエスト・ボディに含める必要がある。
出力
成功時のAPIレスポンス(application/JSON)は:{ success: true }
長さパラメータ
- メール [255]
特定のエラーケース
- ストレージが存在しない
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'storage_non_existant',
message: 'Storage does not exist'
}
} - アカウントが存在しない
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'account_non_existant',
message: 'Account with this email does not exist'
}
} - sso_loginがtrueとして送信され、SSOが設定されていない場合
Response (application/JSON) : {
error: {
type: 'invalid_request_error',
code: 'sso_not_configured',
message: 'SSO is not configured'
}
}
リクエスト例 :本文 (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>' - アクティビティログの取得
ポスト
https://api.idrivee2.com/api/subusers/v1/user_activity_historyクリックしてコピーコピーされたリンク このAPIは、ある日付範囲のサブユーザーのアクティビティ・ログを取得する。
インプット
文字列 subuser_email;
文字列admin_email;
文字列 start_date;
文字列 end_date;
int page_no;長さパラメータ
- メール [255]
注
開始日 (ISO8601) - 開始日
終了日 (ISO8601) - 終了日
ページ番号 - APIはページ分割され、各ページは200レコードで構成される
page_noは 1以降から始まる出力
成功時の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;
}特定のエラーケース
- サブユーザーが登録されていない場合
Response (application/JSON) : {
error:{
type: 'invalid_request_error',
code: 'user_not_signed_up',
message: 'Subuser is not signed up'
}
} - アカウントが存在しない
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>'
特定のエラーケース