Permissions

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

Resource representations

A permission for a file.

{
  "kind": "drive#permission",
  "etag": etag,
  "id": string,
  "selfLink": string,
  "name": string,
  "emailAddress": string,
  "domain": string,
  "role": string,
  "additionalRoles": [
    string
  ],
  "type": string,
  "value": string,
  "authKey": string,
  "withLink": boolean,
  "photoLink": string,
  "expirationDate": datetime,
  "teamDrivePermissionDetails": [
    {
      "teamDrivePermissionType": string,
      "role": string,
      "additionalRoles": [
        string
      ],
      "inheritedFrom": string,
      "inherited": boolean
    }
  ],
  "deleted": boolean
}
Property name Value Description Notes
kind string This is always drive#permission.
etag etag The ETag of the permission.
id string The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. writable
name string The name for this permission.
role string The primary role for this user. While new values may be supported in the future, the following are currently allowed:
  • organizer
  • owner
  • reader
  • writer
writable
additionalRoles[] list Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future. writable
type string The account type. Allowed values are:
  • user
  • group
  • domain
  • anyone
writable
authKey string Deprecated.
value string The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored. writable
emailAddress string 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 user or group.
domain string The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.
expirationDate datetime The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions:
  • They can only be set on user and group permissions
  • The date must be in the future
  • The date cannot be more than a year in the future
  • The date can only be set on drive.permissions.update requests
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
  • reader
  • writer
teamDrivePermissionDetails[].additionalRoles[] list Additional roles for this user. Only commenter is currently possible, though more may be supported in the future.
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

delete
Deletes a permission from a file or Team Drive.
get
Gets a permission by ID.
insert
Inserts a permission for a file or Team Drive.
list
Lists a file's or Team Drive's permissions.
patch
Updates a permission using patch semantics.
update
Updates a permission.
getIdForEmail
Returns the permission ID for an email address.

Send feedback about...

Drive REST API v2
Drive REST API v2