younifyd
Menu

Drive.permissions.update

Updates a permission with patch semantics.

PATCH/files/{fileId}/permissions/{permissionId}

Use it in a workflow

  1. Add a step and choose the Google Drive connector.
  2. Pick the Drive.permissions.update action (under permissions).
  3. Fill in the fields below, then reference the result from later steps as {{drivePermissionsUpdate.response.data}}.

Request

Path parameters

fileIdstringrequired

The ID of the file or shared drive.

permissionIdstringrequired

The ID of the permission.

Query parameters

altstring

Data format for the response.

One ofjson

fieldsstring

Selector specifying which fields to include in a partial response.

keystring

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_tokenstring

OAuth 2.0 token for the current user.

prettyPrintboolean

Returns response with indentations and line breaks.

quotaUserstring

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

userIpstring

Deprecated. Please use quotaUser instead.

removeExpirationboolean

Whether to remove the expiration date.

supportsAllDrivesboolean

Whether the requesting application supports both My Drives and shared drives.

supportsTeamDrivesboolean

Deprecated use supportsAllDrives instead.

transferOwnershipboolean

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. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.

useDomainAdminAccessboolean

Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.

Request body

Enter the body as JSON in the step's Body field.

allowFileDiscoveryboolean

Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.

deletedboolean

Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.

displayNamestring

The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: - user - User's full name, as defined for their Google Account, such as "Joe Smith." - group - Name of the Google Group, such as "The Company Administrators." - domain - String domain name, such as "your-company.com." - anyone - No displayName is present.

domainstring

The domain to which this permission refers. The following options are currently allowed: - The entire domain, such as "your-company.com." - A target audience, such as "ID.audience.googledomains.com."

emailAddressstring

The email address of the user or group to which this permission refers.

expirationTimestring (date-time)

The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: - They cannot be set on shared drive items. - They can only be set on user and group permissions. - The time must be in the future. - The time cannot be more than one year in the future.

idstring

The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.

kindstring

Identifies what kind of resource this is. Value: the fixed string "drive#permission".

Default "drive#permission"

pendingOwnerboolean

Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that aren't in a shared drive.

permissionDetailsarray<object>

Details of whether the permissions on this shared drive item are inherited or are directly on this item. This is an output-only field that's present only for shared drive items.

inheritedboolean

Whether this permission is inherited. This field is always populated. This is an output-only field.

inheritedFromstring

The ID of the item from which this permission is inherited. This is an output-only field.

permissionTypestring

The permission type for this user. While new values may be added in future, the following are currently allowed: - file - member

rolestring

The primary role for this user. While new values may be added in the future, the following are currently allowed: - organizer - fileOrganizer - writer - commenter - reader

photoLinkstring

A link to the user's profile photo, if available.

rolestring

The role granted by this permission. While new values may be supported in the future, the following are currently allowed: - owner - organizer - fileOrganizer - writer - commenter - reader

teamDrivePermissionDetailsarray<object>

Deprecated - use permissionDetails instead.

inheritedboolean

Deprecated - use permissionDetails/inherited instead.

inheritedFromstring

Deprecated - use permissionDetails/inheritedFrom instead.

rolestring

Deprecated - use permissionDetails/role instead.

teamDrivePermissionTypestring

Deprecated - use permissionDetails/permissionType instead.

typestring

The type of the grantee. Valid values are: - user - group - domain - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for the anyone type.

viewstring

Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.

json
{
  "allowFileDiscovery": false,
  "deleted": false,
  "displayName": "string",
  "domain": "string",
  "emailAddress": "string",
  "expirationTime": "2025-01-01T00:00:00Z",
  "id": "string",
  "kind": "drive#permission",
  "pendingOwner": false,
  "permissionDetails": [
    {
      "inherited": false,
      "inheritedFrom": "string",
      "permissionType": "string",
      "role": "string"
    }
  ],
  "photoLink": "string",
  "role": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{drivePermissionsUpdate.response.data.<field>}}.

allowFileDiscoveryboolean

Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.

deletedboolean

Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.

displayNamestring

The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: - user - User's full name, as defined for their Google Account, such as "Joe Smith." - group - Name of the Google Group, such as "The Company Administrators." - domain - String domain name, such as "your-company.com." - anyone - No displayName is present.

domainstring

The domain to which this permission refers. The following options are currently allowed: - The entire domain, such as "your-company.com." - A target audience, such as "ID.audience.googledomains.com."

emailAddressstring

The email address of the user or group to which this permission refers.

expirationTimestring (date-time)

The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: - They cannot be set on shared drive items. - They can only be set on user and group permissions. - The time must be in the future. - The time cannot be more than one year in the future.

idstring

The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.

kindstring

Identifies what kind of resource this is. Value: the fixed string "drive#permission".

Default "drive#permission"

pendingOwnerboolean

Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that aren't in a shared drive.

permissionDetailsarray<object>

Details of whether the permissions on this shared drive item are inherited or are directly on this item. This is an output-only field that's present only for shared drive items.

inheritedboolean

Whether this permission is inherited. This field is always populated. This is an output-only field.

inheritedFromstring

The ID of the item from which this permission is inherited. This is an output-only field.

permissionTypestring

The permission type for this user. While new values may be added in future, the following are currently allowed: - file - member

rolestring

The primary role for this user. While new values may be added in the future, the following are currently allowed: - organizer - fileOrganizer - writer - commenter - reader

photoLinkstring

A link to the user's profile photo, if available.

rolestring

The role granted by this permission. While new values may be supported in the future, the following are currently allowed: - owner - organizer - fileOrganizer - writer - commenter - reader

teamDrivePermissionDetailsarray<object>

Deprecated - use permissionDetails instead.

inheritedboolean

Deprecated - use permissionDetails/inherited instead.

inheritedFromstring

Deprecated - use permissionDetails/inheritedFrom instead.

rolestring

Deprecated - use permissionDetails/role instead.

teamDrivePermissionTypestring

Deprecated - use permissionDetails/permissionType instead.

typestring

The type of the grantee. Valid values are: - user - group - domain - anyone When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. When type is domain, you must provide a domain. There isn't extra information required for the anyone type.

viewstring

Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.

json
{
  "allowFileDiscovery": false,
  "deleted": false,
  "displayName": "string",
  "domain": "string",
  "emailAddress": "string",
  "expirationTime": "2025-01-01T00:00:00Z",
  "id": "string",
  "kind": "drive#permission",
  "pendingOwner": false,
  "permissionDetails": [
    {
      "inherited": false,
      "inheritedFrom": "string",
      "permissionType": "string",
      "role": "string"
    }
  ],
  "photoLink": "string",
  "role": "string"
}

Need more? See the Google Drive guide for connection setup and behaviour shared by every action.