グループ APIGroups API
Groups API を使用すると、ユーザーのグループを管理できます。The Groups API allows you to manage groups of users.
注意
この API を呼び出すには、Azure Databricks 管理者 である必要があります。You must be an Azure Databricks administrator to invoke this API.
重要
Databricks REST API にアクセスするには、認証する必要があります。To access Databricks REST APIs, you must authenticate.
メンバーの追加 Add member
エンドポイントEndpoint | HTTP メソッドHTTP Method |
---|---|
2.0/groups/add-member |
POST |
グループにユーザーまたはグループを追加します。Add a user or group to a group. この呼び出しは RESOURCE_DOES_NOT_EXIST
、指定された名前のユーザーまたはグループが存在しない場合、または指定された親名を持つグループが存在しない場合に、エラーを返します。This call returns an error RESOURCE_DOES_NOT_EXIST
if a user or group with the given name does not exist, or if a group with the given parent name does not exist.
要求の例:Example requests:
{
"user_name": "hermione@hogwarts.edu",
"parent_name": "Gryffindor"
}
{
"group_name": "Dumbledore's Army",
"parent_name": "Students"
}
要求構造 Request structure
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
user_name または group_nameuser_name OR group_name | STRING もしくは STRING STRING OR STRING |
User_name の場合、ユーザー名です。If user_name, the user name. Group_name 場合は、グループ名。If group_name, the group name. |
parent_nameparent_name | STRING |
新しいメンバーの追加先となる親グループの名前。Name of the parent group to which the new member will be added. このフィールドは必須です。This field is required. |
作成 Create
エンドポイントEndpoint | HTTP メソッドHTTP Method |
---|---|
2.0/groups/create |
POST |
指定された名前の新しいグループを作成します。Create a new group with the given name. この呼び出しは、 RESOURCE_ALREADY_EXISTS
指定された名前のグループが既に存在する場合にエラーを返します。This call returns an error RESOURCE_ALREADY_EXISTS
if a group with the given name already exists.
要求の例:Example request:
{
"group_name": "Muggles"
}
応答の例:Example response:
{
"group_name": "Muggles"
}
要求構造 Request structure
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
group_namegroup_name | STRING |
グループの名前。この組織が所有するグループ間で一意である必要があります。Name for the group; must be unique among groups owned by this organization. このフィールドは必須です。This field is required. |
応答構造体 Response structure
グループを作成します。Creates a group.
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
group_namegroup_name | STRING |
グループ名。The group name. |
メンバーの一覧表示 List members
エンドポイントEndpoint | HTTP メソッドHTTP Method |
---|---|
2.0/groups/list-members |
GET |
特定のグループのすべてのメンバーを返します。Return all of the members of a particular group. この呼び出しは、 RESOURCE_DOES_NOT_EXIST
指定された名前のグループが存在しない場合にエラーを返します。This call returns an error RESOURCE_DOES_NOT_EXIST
if a group with the given name does not exist.
要求の例:Example request:
{
"group_name": "Gryffindor"
}
応答の例:Example response:
{
"members": [
{ "user_name": "hjp@hogwarts.edu" },
{ "user_name": "hermione@hogwarts.edu" },
{ "user_name": "rweasley@hogwarts.edu" },
{ "group_name": "Gryffindor Faculty" }
]
}
要求構造 Request structure
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
group_namegroup_name | STRING |
メンバーを取得するグループ。The group whose members we want to retrieve. このフィールドは必須です。This field is required. |
応答構造体 Response structure
特定のグループに属するすべてのユーザーとグループを取得します。Retrieve all users and groups that belong to a given group. このメソッドは非再帰的です。このメソッドは、指定されたグループに属しているが、それらの子グループに属しているプリンシパルを含まないすべてのグループを返します。This method is non-recursive; it return all groups that belong to the given group but not the principals that belong to those child groups.
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
membersmembers | PrincipalNameの配列An array of PrincipalName | 指定されたグループに属するユーザーおよびグループ。The users and groups that belong to the given group. |
リスト List
エンドポイントEndpoint | HTTP メソッドHTTP Method |
---|---|
2.0/groups/list |
GET |
組織内のすべてのグループを返します。Return all of the groups in an organization.
応答の例:Example response:
{
"group_names": [
"admin",
"Gryffindor",
"Hufflepuff",
"Ravenclaw",
"Slytherin"
]
}
応答構造体 Response structure
この組織内のすべてのグループの一覧を返します。Return a list of all groups in this organization.
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
group_namesgroup_names | STRING の配列です。An array of STRING |
この組織内のグループ。The groups in this organization. |
親の一覧表示 List parents
エンドポイントEndpoint | HTTP メソッドHTTP Method |
---|---|
2.0/groups/list-parents |
GET |
特定のユーザーまたはグループがメンバーとなっているすべてのグループを取得します。Retrieve all groups in which a given user or group is a member. このメソッドは非再帰的です。このメソッドは、指定されたユーザーまたはグループがメンバーであるが、それらのグループがメンバーであるグループを含まないすべてのグループを返します。This method is non-recursive; it returns all groups in which the given user or group is a member but not the groups in which those groups are members. この呼び出しは RESOURCE_DOES_NOT_EXIST
、指定された名前のユーザーまたはグループが存在しない場合にエラーを返します。This call returns an error RESOURCE_DOES_NOT_EXIST
if a user or group with the given name does not exist.
要求の例:Example request:
{
"user_name": "hermione@hogwarts.edu"
}
応答の例:Example response:
{
"group_names": [
"users",
"Wizards",
"Gryffindor",
"Dumbledore's Army"
]
}
要求の例:Example request:
{
"group_name": "Gryffindor Faculty"
}
応答の例:Example response:
{
"group_names": [
"Faculty",
"Gryffindor"
]
}
要求構造 Request structure
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
user_name または group_nameuser_name OR group_name | STRING もしくは STRING STRING OR STRING |
User_name の場合、ユーザー名です。If user_name, the user name. Group_name 場合は、グループ名。If group_name, the group name. |
応答構造体 Response structure
特定のユーザーまたはグループがメンバーとなっているすべてのグループを取得します。Retrieve all groups in which a given user or group is a member. このメソッドは非再帰的です。このメソッドは、指定されたユーザーまたはグループがメンバーであるが、それらのグループがメンバーであるグループを含まないすべてのグループを返します。This method is non-recursive; it returns all groups in which the given user or group is a member but not the groups in which those groups are members.
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
group_namesgroup_names | STRING の配列です。An array of STRING |
指定されたユーザーまたはグループがメンバーとなっているグループ。The groups in which the given user or group is a member. |
メンバーの削除 Remove member
エンドポイントEndpoint | HTTP メソッドHTTP Method |
---|---|
2.0/groups/remove-member |
POST |
グループからユーザーまたはグループを削除します。Remove a user or group from a group. この呼び出しは RESOURCE_DOES_NOT_EXIST
、指定された名前のユーザーまたはグループが存在しない場合、または指定された親名を持つグループが存在しない場合に、エラーを返します。This call returns an error RESOURCE_DOES_NOT_EXIST
if a user or group with the given name does not exist or if a group with the given parent name does not exist.
要求の例:Example requests:
{
"user_name": "quirrell@hogwarts.edu",
"parent_name": "Faculty"
}
{
"group_name": "Inquisitorial Squad",
"parent_name": "Students"
}
要求構造 Request structure
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
user_name または group_nameuser_name OR group_name | STRING もしくは STRING STRING OR STRING |
User_name の場合、ユーザー名です。If user_name, the user name. Group_name 場合は、グループ名。If group_name, the group name. |
parent_nameparent_name | STRING |
メンバーの削除元となる親グループの名前。Name of the parent group from which the member will be removed. このフィールドは必須です。This field is required. |
削除 Delete
エンドポイントEndpoint | HTTP メソッドHTTP Method |
---|---|
2.0/groups/delete |
POST |
この組織からグループを削除します。Remove a group from this organization. この呼び出しは、 RESOURCE_DOES_NOT_EXIST
指定された名前のグループが存在しない場合にエラーを返します。This call returns an error RESOURCE_DOES_NOT_EXIST
if a group with the given name does not exist.
要求の例:Example request:
{
"group_name": "Inquisitorial Squad"
}
要求構造 Request structure
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
group_namegroup_name | STRING |
削除するグループ。The group to remove. このフィールドは必須です。This field is required. |
データ構造 Data structures
このセクションの内容は次のとおりです。In this section:
PrincipalName PrincipalName
ユーザー名またはグループ名のいずれかである名前のコンテナーの種類。Container type for a name that is either a user name or a group name.
フィールド名Field Name | TypeType | 説明Description |
---|---|---|
user_name または group_nameuser_name OR group_name | STRING もしくは STRING STRING OR STRING |
User_name の場合、ユーザー名です。If user_name, the user name. Group_name 場合は、グループ名。If group_name, the group name. |