REST Resource: roles
Stay organized with collections
Save and categorize content based on your preferences.
Resource: Role
JSON representation |
{
"roleId": string,
"roleName": string,
"roleDescription": string,
"rolePrivileges": [
{
"serviceId": string,
"privilegeName": string
}
],
"isSystemRole": boolean,
"isSuperAdminRole": boolean,
"kind": string,
"etag": string
} |
Fields |
roleId |
string (int64 format)
ID of the role.
|
roleName |
string
Name of the role.
|
roleDescription |
string
A short description of the role.
|
rolePrivileges[] |
object
The set of privileges that are granted to this role.
|
rolePrivileges[].serviceId |
string
The obfuscated ID of the service this privilege is for. This value is returned with Privileges.list() .
|
rolePrivileges[].privilegeName |
string
The name of the privilege.
|
isSystemRole |
boolean
Returns true if this is a pre-defined system role.
|
isSuperAdminRole |
boolean
Returns true if the role is a super admin role.
|
kind |
string
The type of the API resource. This is always admin#directory#role .
|
etag |
string
ETag of the resource.
|
Methods |
|
Deletes a role. |
|
Retrieves a role. |
|
Creates a role. |
|
Retrieves a paginated list of all the roles in a domain. |
|
Patches a role. |
|
Updates a role. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-25 UTC.
[null,null,["Last updated 2025-03-25 UTC."],[],[],null,["# REST Resource: roles\n\nResource: Role\n--------------\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"roleId\": string, \"roleName\": string, \"roleDescription\": string, \"rolePrivileges\": [ { \"serviceId\": string, \"privilegeName\": string } ], \"isSystemRole\": boolean, \"isSuperAdminRole\": boolean, \"kind\": string, \"etag\": string } ``` |\n\n| Fields ||\n|----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `roleId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` ID of the role. |\n| `roleName` | `string` Name of the role. |\n| `roleDescription` | `string` A short description of the role. |\n| `rolePrivileges[]` | `object` The set of privileges that are granted to this role. |\n| `rolePrivileges[].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| `rolePrivileges[].privilegeName` | `string` The name of the privilege. |\n| `isSystemRole` | `boolean` Returns `true` if this is a pre-defined system role. |\n| `isSuperAdminRole` | `boolean` Returns `true` if the role is a super admin role. |\n| `kind` | `string` The type of the API resource. This is always `admin#directory#role`. |\n| `etag` | `string` ETag of the resource. |\n\n| Methods ------- ||\n|-------------------------------------------------------------------------|----------------------------------------------------------|\n| ### [delete](/workspace/admin/directory/reference/rest/v1/roles/delete) | Deletes a role. |\n| ### [get](/workspace/admin/directory/reference/rest/v1/roles/get) | Retrieves a role. |\n| ### [insert](/workspace/admin/directory/reference/rest/v1/roles/insert) | Creates a role. |\n| ### [list](/workspace/admin/directory/reference/rest/v1/roles/list) | Retrieves a paginated list of all the roles in a domain. |\n| ### [patch](/workspace/admin/directory/reference/rest/v1/roles/patch) | Patches a role. |\n| ### [update](/workspace/admin/directory/reference/rest/v1/roles/update) | Updates a role. |"]]