メインコンテンツまでスキップ

AddWorkspaceUsers

特定ワークスペース内のグループに新規ユーザーを作成する

Description

指定したワークスペース内のグループに複数ユーザーを追加します。

Executive Authority

  • ワークスペース管理者
    • 各グループに追加可能
  • グループ管理者
    • 自身が所属しているグループまたは、配下のグループに追加可能
  • その他一般ユーザー
    • 使用不可能

Method

POST

Request URL Format

/api/v0/workspaces/:workspace-id/users

URL Params

workspace-id    : ワークスペースID

Payload

Content-Type : application/json

パラメータ1説明データ型必須備考
usersグループに追加したいユーザーの情報を記載オブジェクト配列必須AddUserAPI のPayloadを複数セット可能

Payload Example

{
"users": [
{
"email": "[email protected]",
"g_id": "xxxxxxxxxxxxxxx",
"username": "xxxxxxxx",
"send_password_to_email": true,
"sender_address": "[email protected]",
"conf_email_template_id": "xxxxxxxxxxxxxxx",
"confirm_email_ack": true,
"exclusive_w_id": "xxxxxxxxxxxxxxx",
"user_code": "xxxxxxxxxx"
},
{
"email": "[email protected]",
"g_id": "xxxxxxxxxxxxxxx",
"username": "xxxxxxxx",
"no_confirm_email": true,
"tmp_password": "xxxxxxxx",
"invitor_id": "xxxxxxxxxxxxxxx",
"confirm_email_ack": false
}
]
}

Response Example

正常時

{
"errors": null,
"result": [
{
"added": false, //("bool 追加済みかどうか")
"exists": false, //("b0ol 既に存在するユーザー false=新規で存在しない新しいユーザー")
"user_profile": { //("ユーザープロファイルオブジェクト")
"confirmed": false, //("bool ユーザーemail確認済み false=email上確認されていない")
"email": "登録されたユーザーのemail",
"email_sent": false, //("bool emailが送られたかどうか false=既に対象emailにemailが送られている")
"profile_pics": [//("ユーザープロファイル画像オブジェクト")
{
"mediaLink": "https://storage.googleapis.com/linker/pub/default.png" //("ユーザープロファイルに使用されている画像の保存先")
}
],
"u_id": "登録されたユーザーのID",
"username": "登録されたユーザー名"
}
}
]
}

エラー発生時

リクエストパラメーター不足等

{
"error_code": "INVALID_PARAMS",
"message": "invalid parameter"
}

一括ユーザー登録上限数超え

{
"error": "the maximum registration limit has been exceeded",
"error_code": "INVALID_PARAMS"
}

API操作者の権限不足

{
"errors": [
// 追加操作者がワークスペース管理者、グループ管理者のいずれでもなかった場合
{
"email": {追加対象メールアドレス},
"message": "not admin or group admin to workspace with given workspace_id",
"user_code": {追加対象ユーザーコード(存在したら)},
},
// その他エラー
{
"email": {追加対象メールアドレス},
"message": "InternalServerError",
"user_code": {追加対象ユーザーコード(存在したら)},
}
],
"result": [
{
"added": false, //("bool 追加済みかどうか")
"exists": false, //("b0ol 既に存在するユーザー false=新規で存在しない新しいユーザー")
"user_profile": { //("ユーザープロファイルオブジェクト")
"confirmed": false, //("bool ユーザーemail確認済み false=email上確認されていない")
"email": "登録されたユーザーのemail",
"email_sent": false, //("bool emailが送られたかどうか false=既に対象emailにemailが送られている")
"profile_pics": [//("ユーザープロファイル画像オブジェクト")
{
"mediaLink": "https://storage.googleapis.com/linker/pub/default.png" //("ユーザープロファイルに使用されている画像の保存先")
}
],
"u_id": "登録されたユーザーのID",
"username": "登録されたユーザー名"
}
}
]
}