Permissions: update

Requires authorization

Updates a permission with patch semantics. Try it now.

Request

HTTP request

PATCH https://www.googleapis.com/drive/v3/files/fileId/permissions/permissionId

Parameters

Parameter name Value Description
Path parameters
fileId string The ID of the file or Team Drive.
permissionId string The ID of the permission.
Optional query parameters
removeExpiration boolean Whether to remove the expiration date. (Default: false)
supportsTeamDrives boolean Whether the requesting application supports Team Drives. (Default: false)
transferOwnership boolean Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. (Default: false)
useDomainAdminAccess boolean Whether the request should be treated as if it was issued by a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the item belongs. (Default: false)

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file

Request body

In the request body, supply the relevant portions of a Permissions resource, according to the rules of patch semantics, with the following properties:

Property name Value Description Notes
Optional Properties
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
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

Response

If successful, this method returns a Permissions resource in the response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Send feedback about...

Drive REST API
Drive REST API