Method: privileges.list
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.
Truy xuất danh sách phân trang tất cả đặc quyền cho một khách hàng.
Yêu cầu HTTP
GET https://admin.googleapis.com/admin/directory/v1/customer/{customer}/roles/ALL/privileges
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
customer |
string
Mã nhận dạng duy nhất cho tài khoản Google Workspace của khách hàng. Trong trường hợp tài khoản nhiều miền, để tìm nạp tất cả các nhóm cho một khách hàng, hãy sử dụng trường này thay vì domain . Bạn cũng có thể sử dụng bí danh my_customer để đại diện cho customerId của tài khoản. customerId cũng được trả về trong tài nguyên Người dùng. Bạn phải cung cấp tham số customer hoặc domain .
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"kind": string,
"etag": string,
"items": [
{
object (Privilege )
}
]
} |
Trường |
kind |
string
Loại tài nguyên API. Giá trị này luôn là admin#directory#privileges .
|
etag |
string
ETag của tài nguyên.
|
items[] |
object (Privilege )
Danh sách tài nguyên đặc quyền.
|
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/admin.directory.rolemanagement
https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Vé Đặc quyền
Biểu diễn dưới dạng JSON |
{
"serviceId": string,
"kind": string,
"etag": string,
"isOuScopable": boolean,
"childPrivileges": [
{
object (Privilege )
}
],
"privilegeName": string,
"serviceName": string
} |
Trường |
serviceId |
string
Mã nhận dạng đã làm rối mã của dịch vụ mà đặc quyền này dành cho. Giá trị này được trả về bằng Privileges.list() .
|
kind |
string
Loại tài nguyên API. Giá trị này luôn là admin#directory#privilege .
|
etag |
string
ETag của tài nguyên.
|
isOuScopable |
boolean
Liệu đặc quyền có thể bị hạn chế cho một đơn vị tổ chức hay không.
|
childPrivileges[] |
object (Privilege )
Danh sách các đặc quyền của phần tử con. Các đặc quyền cho một dịch vụ tạo thành một cây. Mỗi đặc quyền có thể có một danh sách các đặc quyền con; danh sách này sẽ trống đối với đặc quyền lá.
|
privilegeName |
string
Tên đặc quyền.
|
serviceName |
string
Tên của dịch vụ mà đặc quyền này dành cho.
|
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-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# Method: privileges.list\n\nRetrieves a paginated list of all privileges for a customer.\n\n### HTTP request\n\n`GET https://admin.googleapis.com/admin/directory/v1/customer/{customer}/roles/ALL/privileges`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customer` | `string` The unique ID for the customer's Google Workspace account. In case of a multi-domain account, to fetch all groups for a customer, use this field instead of `domain`. You can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users](https://developers.google.com/workspace/admin/directory/v1/reference/users) resource. You must provide either the `customer` or the `domain` parameter. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"etag\": string, \"items\": [ { object (/workspace/admin/directory/reference/rest/v1/privileges/list#Privilege) } ] } ``` |\n\n| Fields ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------------|\n| `kind` | `string` The type of the API resource. This is always `admin#directory#privileges`. |\n| `etag` | `string` ETag of the resource. |\n| `items[]` | `object (`[Privilege](/workspace/admin/directory/reference/rest/v1/privileges/list#Privilege)`)` A list of Privilege resources. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/admin.directory.rolemanagement`\n- `\n https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nPrivilege\n---------\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"serviceId\": string, \"kind\": string, \"etag\": string, \"isOuScopable\": boolean, \"childPrivileges\": [ { object (/workspace/admin/directory/reference/rest/v1/privileges/list#Privilege) } ], \"privilegeName\": string, \"serviceName\": string } ``` |\n\n| Fields ||\n|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `serviceId` | `string` The obfuscated ID of the service this privilege is for. This value is returned with [`Privileges.list()`](https://developers.google.com/workspace/admin/directory/v1/reference/privileges/list). |\n| `kind` | `string` The type of the API resource. This is always `admin#directory#privilege`. |\n| `etag` | `string` ETag of the resource. |\n| `isOuScopable` | `boolean` If the privilege can be restricted to an organization unit. |\n| `childPrivileges[]` | `object (`[Privilege](/workspace/admin/directory/reference/rest/v1/privileges/list#Privilege)`)` A list of child privileges. Privileges for a service form a tree. Each privilege can have a list of child privileges; this list is empty for a leaf privilege. |\n| `privilegeName` | `string` The name of the privilege. |\n| `serviceName` | `string` The name of the service this privilege is for. |"]]