REST Resource: groups
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tài nguyên: Nhóm
Google Groups cho phép người dùng gửi thư đến các nhóm người bằng địa chỉ email của nhóm. Để biết thêm thông tin về các tác vụ phổ biến, hãy xem Hướng dẫn dành cho nhà phát triển.
Để biết thông tin về các loại nhóm khác, hãy xem tài liệu về Cloud Identity Groups API.
Lưu ý: Người dùng gọi API (hoặc bị tài khoản dịch vụ mạo danh) phải có vai trò được chỉ định bao gồm các quyền đối với Nhóm API quản trị, chẳng hạn như Quản trị viên cấp cao hoặc Quản trị viên nhóm.
Biểu diễn dưới dạng JSON |
{
"id": string,
"email": string,
"name": string,
"description": string,
"adminCreated": boolean,
"directMembersCount": string,
"kind": string,
"etag": string,
"aliases": [
string
],
"nonEditableAliases": [
string
]
} |
Trường |
id |
string
Chỉ có thể đọc. Mã nhận dạng duy nhất của một nhóm. Bạn có thể sử dụng id của nhóm làm groupKey của URI yêu cầu nhóm.
|
email |
string
Địa chỉ email của nhóm. Nếu tài khoản của bạn có nhiều miền, hãy chọn miền phù hợp cho địa chỉ email. email phải là duy nhất. Thuộc tính này là bắt buộc khi tạo nhóm. Địa chỉ email nhóm tuân theo các quy tắc sử dụng ký tự giống như tên người dùng. Hãy xem trung tâm trợ giúp để biết thông tin chi tiết.
|
name |
string
Tên hiển thị của nhóm.
|
description |
string
Nội dung mô tả mở rộng để giúp người dùng xác định mục đích của một nhóm. Ví dụ: bạn có thể thêm thông tin về những người nên tham gia nhóm, loại tin nhắn cần gửi đến nhóm, đường liên kết đến các câu hỏi thường gặp về nhóm hoặc các nhóm có liên quan. Độ dài tối đa là 4,096 ký tự.
|
adminCreated |
boolean
Chỉ có thể đọc. Giá trị là true nếu nhóm này do quản trị viên tạo thay vì người dùng.
|
directMembersCount |
string (int64 format)
Số lượng người dùng là thành viên trực tiếp của nhóm. Nếu một nhóm là thành viên (con) của nhóm này (mẹ), thì các thành viên của nhóm con sẽ không được tính trong thuộc tính directMembersCount của nhóm mẹ.
|
kind |
string
Loại tài nguyên API. Đối với tài nguyên Groups, giá trị là admin#directory#group .
|
etag |
string
ETag của tài nguyên.
|
aliases[] |
string
Chỉ có thể đọc. Danh sách địa chỉ email bí danh của một nhóm. Để thêm, cập nhật hoặc xoá bí danh của một nhóm, hãy sử dụng các phương thức groups.aliases . Nếu được chỉnh sửa trong yêu cầu POST hoặc PUT của một nhóm, nội dung chỉnh sửa sẽ bị bỏ qua.
|
nonEditableAliases[] |
string
Chỉ có thể đọc. Danh sách địa chỉ email đại diện không chỉnh sửa được của nhóm nằm ngoài miền chính hoặc miền con của tài khoản. Đây là những địa chỉ email đang hoạt động mà nhóm sử dụng. Đây là thuộc tính chỉ có thể đọc được trả về trong phản hồi của API cho một nhóm. Nếu được chỉnh sửa trong yêu cầu POST hoặc PUT của một nhóm, thì nội dung chỉnh sửa sẽ bị bỏ qua.
|
Phương thức |
|
Xoá một nhóm. |
|
Truy xuất các thuộc tính của một nhóm. |
|
Tạo một nhóm. |
|
Truy xuất tất cả các nhóm của một miền hoặc của một người dùng dựa trên userKey (được phân trang). |
|
Cập nhật các thuộc tính của một nhóm. |
|
Cập nhật các thuộc tính của một nhóm. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-24 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-24 UTC."],[],[],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. |"]]