Permissions

For a list of methods for this resource, see the end of this page.

Resource representations

A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.

{
  "kind": "drive#permission",
  "id": string,
  "type": string,
  "emailAddress": string,
  "domain": string,
  "role": string,
  "allowFileDiscovery": boolean,
  "displayName": string,
  "photoLink": string,
  "expirationTime": datetime,
  "teamDrivePermissionDetails": [
    {
      "teamDrivePermissionType": string,
      "role": string,
      "inheritedFrom": string,
      "inherited": boolean
    }
  ],
  "deleted": boolean
}
Property name Value Description Notes
kind string Identifies what kind of resource this is. Value: the fixed string "drive#permission".
id string The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId.
type string The type of the grantee. Valid values are:
  • user
  • group
  • domain
  • anyone
writable
emailAddress string The email address of the user or group to which this permission refers. writable
domain string The domain to which this permission refers. writable
role string The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
  • organizer
  • owner
  • writer
  • commenter
  • reader
writable
allowFileDiscovery boolean Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. writable
displayName string A displayable name for users, groups or domains.
expirationTime datetime The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
  • They can only be set on user and group permissions
  • The time must be in the future
  • The time cannot be more than a year in the future
writable
teamDrivePermissionDetails[] list Details of whether the permissions on this Team Drive item are inherited or directly on this item. This is an output-only field which is present only for Team Drive items.
teamDrivePermissionDetails[].teamDrivePermissionType string The Team Drive permission type for this user. While new values may be added in future, the following are currently possible:
  • file
  • member
teamDrivePermissionDetails[].role string The primary role for this user. While new values may be added in the future, the following are currently possible:
  • organizer
  • writer
  • commenter
  • reader
teamDrivePermissionDetails[].inheritedFrom string The ID of the item from which this permission is inherited. This is an output-only field and is only populated for members of the Team Drive.
teamDrivePermissionDetails[].inherited boolean Whether this permission is inherited. This field is always populated. This is an output-only field.
deleted boolean Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.

Methods

create
Creates a permission for a file or Team Drive.
delete
Deletes a permission.
get
Gets a permission by ID.
list
Lists a file's or Team Drive's permissions.
update
Updates a permission with patch semantics.

Send feedback about...

Drive REST API
Drive REST API