drive.permissions.update
Update an existing permission on a file or shared drive using patch semantics to change role, expiration, or ownership settings.
Instructions
Updates a permission with patch semantics. For more information, see Share files, folders, and drives. Warning: Concurrent permission modifications (such as update or delete) on the same file, folder, or shared drive aren't supported across any users or clients; only the last update is applied [HTTP PATCH] — updates the resource; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON Permission object accepting allowFileDiscovery, deleted, displayName, domain, emailAddress, expirationTime, id, inheritedPermissionsDisabled and 8 more fields; pass it via params or whole via body_file Siblings over the same resource: create, delete, get, list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| fileId | Yes | [URL path segment] The ID of the file or shared drive. | |
| params | No | Parameter map merged into the request; typed parameters win. | |
| dry_run | No | Return the request that would be sent, without sending it. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON Permission object. | |
| permissionId | Yes | [URL path segment] The ID of the permission. | |
| request_body | No | Request body of type Permission: pass it via `params` (merged into the built body) or whole via `body_file`. | |
| removeExpiration | No | [query parameter] Whether to remove the expiration date. | false |
| supportsAllDrives | No | [query parameter] Whether the requesting application supports both My Drives and shared drives. | false |
| transferOwnership | No | [query parameter] 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 ef | false |
| supportsTeamDrives | No | [query parameter] Deprecated: Use `supportsAllDrives` instead. | false |
| useDomainAdminAccess | No | [query parameter] Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file | false |
| enforceExpansiveAccess | No | [query parameter] Deprecated: All requests use the expansive access rules. | false |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| kind | No | ||
| role | No | ||
| type | No | ||
| view | No | ||
| domain | No | ||
| deleted | No | ||
| photoLink | No | ||
| displayName | No | ||
| emailAddress | No | ||
| pendingOwner | No | ||
| expirationTime | No | ||
| permissionDetails | No | ||
| allowFileDiscovery | No | ||
| teamDrivePermissionDetails | No | ||
| inheritedPermissionsDisabled | No |