Method: privileges.list
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
GET https://admin.googleapis.com/admin/directory/v1/customer/{customer}/roles/ALL/privileges
网址采用 gRPC 转码语法。
路径参数
参数 |
customer |
string
客户 Google Workspace 账号的唯一 ID。如果是多网域账号,如需提取客户的所有群组,请使用此字段,而不是 domain 。您还可以使用 my_customer 别名来表示账号的 customerId 。customerId 也会作为 Users 资源的一部分返回。您必须提供 customer 或 domain 参数。
|
响应正文
JSON 表示法 |
{
"kind": string,
"etag": string,
"items": [
{
object (Privilege )
}
]
} |
字段 |
kind |
string
API 资源的类型。此值始终为 admin#directory#privileges 。
|
etag |
string
资源的 ETag。
|
items[] |
object (Privilege )
Privilege 资源的列表。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/admin.directory.rolemanagement
https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly
如需了解详情,请参阅授权指南。
私人定制游
JSON 表示法 |
{
"serviceId": string,
"kind": string,
"etag": string,
"isOuScopable": boolean,
"childPrivileges": [
{
object (Privilege )
}
],
"privilegeName": string,
"serviceName": string
} |
字段 |
serviceId |
string
此特权所适用的服务的经过混淆处理的 ID。此值随 Privileges.list() 一起返回。
|
kind |
string
API 资源的类型。此值始终为 admin#directory#privilege 。
|
etag |
string
资源的 ETag。
|
isOuScopable |
boolean
是否可以将此权限限制为仅适用于某个组织部门。
|
childPrivileges[] |
object (Privilege )
子级特权列表。服务的权限会形成一个树状结构。每个特权都可以有一个子特权列表;对于叶级特权,此列表为空。
|
privilegeName |
string
特权的名称。
|
serviceName |
string
此特权所适用的服务的名称。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[],[],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. |"]]