Model tree
Permission
A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy.| Field | Type | Description |
|---|---|---|
type * | PermissionType | The type of the grantee. Supported values include: user, group, domain, anyone. When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. If type is domain, you must provide a domain. If type is anyone, no extra information is required. |
role * | PermissionRole | The role granted by this permission. Supported values include: owner, organizer, fileOrganizer, writer, commenter, reader. For more information, see Roles and permissions. |
emailAddress | string | The email address of the user or group to which this permission refers. Required when creating a permission of type user or group. |
domain | string | The domain to which this permission refers. Required when creating a permission of type domain. |
allowFileDiscovery | boolean | Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
expirationTime | string | 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. |
pendingOwner | boolean | Whether the account associated with this permission is a pending owner. Only populated for permissions of type user for files that aren’t in a shared drive. |
view | PermissionView | Indicates the view for this permission. Only populated for permissions that belong to a view. The only supported values are published and metadata: published — the permission’s role is publishedReader; metadata — the item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. The metadata view is only supported on folders. |
inheritedPermissionsDisabled | boolean | When true, only organizers, owners, and users with permissions added directly on the item can access it. |
PatchPermission
Request body for Drivepermissions.update.
| Field | Type | Description |
|---|---|---|
type | PermissionType | The type of the grantee. Supported values include: user, group, domain, anyone. When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. If type is domain, you must provide a domain. If type is anyone, no extra information is required. |
role | PermissionRole | The role granted by this permission. Supported values include: owner, organizer, fileOrganizer, writer, commenter, reader. For more information, see Roles and permissions. |
emailAddress | string | The email address of the user or group to which this permission refers. Required when creating a permission of type user or group. |
domain | string | The domain to which this permission refers. Required when creating a permission of type domain. |
allowFileDiscovery | boolean | Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone. |
expirationTime | string | 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. |
pendingOwner | boolean | Whether the account associated with this permission is a pending owner. Only populated for permissions of type user for files that aren’t in a shared drive. |
view | PermissionView | Indicates the view for this permission. Only populated for permissions that belong to a view. The only supported values are published and metadata: published — the permission’s role is publishedReader; metadata — the item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. The metadata view is only supported on folders. |
inheritedPermissionsDisabled | boolean | When true, only organizers, owners, and users with permissions added directly on the item can access it. |
PermissionType
| Value |
|---|
user |
group |
domain |
anyone |
PermissionRole
| Value |
|---|
owner |
organizer |
fileOrganizer |
writer |
commenter |
reader |
publishedReader |
PermissionView
| Value |
|---|
published |
metadata |