Resource: Permission
A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy.
Some resource methods (such as permissions.update
) require a permissionId
. Use the permissions.list
method to retrieve the ID for a file, folder, or shared drive.
JSON representation |
---|
{ "id": string, "name": string, "type": string, "role": string, "additionalRoles": [ string ], "authKey": string, "value": string, "kind": string, "withLink": boolean, "photoLink": string, "selfLink": string, "emailAddress": string, "domain": string, "etag": string, "permissionDetails": [ { "permissionType": string, "role": string, "additionalRoles": [ string ], "inheritedFrom": string, "inherited": boolean } ], "expirationDate": string, "teamDrivePermissionDetails": [ { "teamDrivePermissionType": string, "role": string, "additionalRoles": [ string ], "inheritedFrom": string, "inherited": boolean } ], "deleted": boolean, "view": string, "pendingOwner": boolean } |
Fields | |
---|---|
id |
The ID of the user this permission refers to, and identical to the |
name |
Output only. The name for this permission. |
type |
The account type. Allowed values are:
|
role |
The primary role for this user. While new values may be supported in the future, the following are currently allowed:
|
additionalRoles[] |
Additional roles for this user. Only |
authKey |
Output only. Deprecated. |
value |
The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a |
kind |
Output only. This is always |
withLink |
Whether the link is required for this permission. |
photoLink |
Output only. A link to the profile photo, if available. |
selfLink |
Output only. A link back to this permission. |
emailAddress |
Output only. The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is |
domain |
Output only. The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is |
etag |
Output only. The ETag of the permission. |
permissionDetails[] |
Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items. |
permissionDetails[].permissionType |
Output only. The permission type for this user. While new values may be added in future, the following are currently possible:
|
permissionDetails[].role |
Output only. The primary role for this user. While new values may be added in the future, the following are currently possible:
|
permissionDetails[].additionalRoles[] |
Output only. Additional roles for this user. Only |
permissionDetails[].inheritedFrom |
Output only. The ID of the item from which this permission is inherited. This is an output-only field. |
permissionDetails[].inherited |
Output only. Whether this permission is inherited. This field is always populated. This is an output-only field. |
expirationDate |
The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
|
teamDrivePermissionDetails[] |
Output only. Deprecated: Use |
teamDrivePermissionDetails[] |
Output only. Deprecated: Use |
teamDrivePermissionDetails[] |
Output only. Deprecated: Use |
teamDrivePermissionDetails[] |
Output only. Deprecated: Use |
teamDrivePermissionDetails[] |
Output only. Deprecated: Use |
teamDrivePermissionDetails[] |
Output only. Deprecated: Use |
deleted |
Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
view |
Indicates the view for this permission. Only populated for permissions that belong to a view. |
pendingOwner |
Whether the account associated with this permission is a pending owner. Only populated for |
Methods |
|
---|---|
|
Deletes a permission from a file or shared drive. |
|
Gets a permission by ID. |
|
Returns the permission ID for an email address. |
|
Inserts a permission for a file or shared drive. |
|
Lists a file's or shared drive's permissions. |
|
Updates a permission using patch semantics. |
|
Updates a permission. |