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 的情況下,擷取網域或使用者的所有群組 (分頁)。 |
|
更新群組的屬性。 |
|
更新群組的屬性。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-24 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]