REST Resource: groups
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:群组
JSON 表示法 |
{
"id": string,
"email": string,
"name": string,
"description": string,
"adminCreated": boolean,
"directMembersCount": string,
"kind": string,
"etag": string,
"aliases": [
string
],
"nonEditableAliases": [
string
]
} |
字段 |
id |
string
只读。群组的唯一 ID。群组 id 可用作群组请求 URI 的 groupKey 。
|
email |
string
群组的电子邮件地址。如果您的账号有多个网域,请为电子邮件地址选择合适的网域。email 必须是唯一的。创建组时,此属性是必需的。群组电子邮件地址的字符使用规则与用户名相同,如需了解详情,请访问帮助中心。
|
name |
string
群组的显示名称。
|
description |
string
详细说明,可帮助用户确定群组的用途。举例来说,您可以说明哪些人应该加入该群组、应向群组发送哪些类型的邮件,还可以提供群组常见问题解答的链接或相关群组等信息。长度上限为 4,096 个字符。
|
adminCreated |
boolean
只读。如果此群组是由管理员(而非用户)创建的,则值为 true 。
|
directMembersCount |
string (int64 format)
群组的直接成员数量。如果某个群组是此群组(父级群组)的成员(子群组),则子群组的成员不会计入父级群组的 directMembersCount 属性。
|
kind |
string
API 资源的类型。对于“群组”资源,该值为 admin#directory#group 。
|
etag |
string
资源的 ETag。
|
aliases[] |
string
只读。群组的别名电子邮件地址列表。如需添加、更新或移除群组的别名,请使用 groups.aliases 方法。如果在群组的 POST 或 PUT 请求中进行修改,系统会忽略相应修改。
|
nonEditableAliases[] |
string
只读。群组的不可修改别名电子邮件地址列表(这些地址不在账号的主域名或子网域内)。这些是群组使用的有效电子邮件地址。这是 API 针对组返回的只读属性。如果在群组的 POST 或 PUT 请求中进行修改,系统会忽略相应修改。
|
方法 |
|
删除组。 |
|
检索群组的属性。 |
|
创建群组。 |
|
指定 userKey 后,检索网域或用户的所有群组(分页)。 |
|
更新群组的属性。 |
|
更新群组的属性。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-24。
[null,null,["最后更新时间 (UTC):2025-07-24。"],[],[],null,["# REST Resource: groups\n\nResource: Group\n---------------\n\nGoogle Groups provide your users the ability to send messages to groups of people using the group's email address. For more information about common tasks, see the [Developer's Guide](https://developers.google.com/workspace/admin/directory/v1/guides/manage-groups).\n\nFor information about other types of groups, see the [Cloud Identity Groups API documentation](https://cloud.google.com/identity/docs/groups).\n\nNote: The user calling the API (or being impersonated by a service account) must have an assigned [role](https://developers.google.com/workspace/admin/directory/v1/guides/manage-roles) that includes Admin API Groups permissions, such as Super Admin or Groups Admin.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"email\": string, \"name\": string, \"description\": string, \"adminCreated\": boolean, \"directMembersCount\": string, \"kind\": string, \"etag\": string, \"aliases\": [ string ], \"nonEditableAliases\": [ string ] } ``` |\n\n| Fields ||\n|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` Read-only. The unique ID of a group. A group `id` can be used as a group request URI's `groupKey`. |\n| `email` | `string` The group's email address. If your account has multiple domains, select the appropriate domain for the email address. The `email` must be unique. This property is required when creating a group. Group email addresses are subject to the same character usage rules as usernames, see the [help center](https://support.google.com/a/answer/9193374) for details. |\n| `name` | `string` The group's display name. |\n| `description` | `string` An extended description to help users determine the purpose of a group. For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. Maximum length is `4,096` characters. |\n| `adminCreated` | `boolean` Read-only. Value is `true` if this group was created by an administrator rather than a user. |\n| `directMembersCount` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The number of users that are direct members of the group. If a group is a member (child) of this group (the parent), members of the child group are not counted in the `directMembersCount` property of the parent group. |\n| `kind` | `string` The type of the API resource. For Groups resources, the value is `admin#directory#group`. |\n| `etag` | `string` ETag of the resource. |\n| `aliases[]` | `string` Read-only. The list of a group's alias email addresses. To add, update, or remove a group's aliases, use the `groups.aliases` methods. If edited in a group's POST or PUT request, the edit is ignored. |\n| `nonEditableAliases[]` | `string` Read-only. The list of the group's non-editable alias email addresses that are outside of the account's primary domain or subdomains. These are functioning email addresses used by the group. This is a read-only property returned in the API's response for a group. If edited in a group's POST or PUT request, the edit is ignored. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------------|----------------------------------------------------------------------------|\n| ### [delete](/workspace/admin/directory/reference/rest/v1/groups/delete) | Deletes a group. |\n| ### [get](/workspace/admin/directory/reference/rest/v1/groups/get) | Retrieves a group's properties. |\n| ### [insert](/workspace/admin/directory/reference/rest/v1/groups/insert) | Creates a group. |\n| ### [list](/workspace/admin/directory/reference/rest/v1/groups/list) | Retrieves all groups of a domain or of a user given a userKey (paginated). |\n| ### [patch](/workspace/admin/directory/reference/rest/v1/groups/patch) | Updates a group's properties. |\n| ### [update](/workspace/admin/directory/reference/rest/v1/groups/update) | Updates a group's properties. |"]]