List
|
|||||
|
|
Lists a file's or shared drive's permissions
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- See, edit, create, and delete all of your Google Drive files
- View and manage Google Drive files and folders that you have opened or created with this app
- View and manage metadata of files in your Google Drive
- View metadata for files in your Google Drive
- View the photos, videos and albums in your Google Photos
- See and download all your Google Drive files
Input
This building block consumes 6 input parameters
Name | Format | Description |
---|---|---|
fileId Required |
STRING |
The ID of the file or shared drive |
pageSize |
INTEGER |
The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned |
pageToken |
STRING |
The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response |
supportsAllDrives |
BOOLEAN |
Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives |
supportsTeamDrives |
BOOLEAN |
Deprecated use supportsAllDrives instead |
useDomainAdminAccess |
BOOLEAN |
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 |
= Parameter name
= Format
fileId STRING Required The ID of the file or shared drive |
pageSize INTEGER The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned |
pageToken STRING The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response |
supportsAllDrives BOOLEAN Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives |
supportsTeamDrives BOOLEAN Deprecated use supportsAllDrives instead |
useDomainAdminAccess BOOLEAN 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 |
Output
This building block provides 24 output parameters
Name | Format | Description |
---|---|---|
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#permissionList" |
nextPageToken |
STRING |
The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results |
permissions[] |
OBJECT |
A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy |
permissions[].allowFileDiscovery |
BOOLEAN |
Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone |
permissions[].deleted |
BOOLEAN |
Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions |
permissions[].displayName |
STRING |
A displayable name for users, groups or domains |
permissions[].domain |
STRING |
The domain to which this permission refers |
permissions[].emailAddress |
STRING |
The email address of the user or group to which this permission refers |
permissions[].expirationTime |
DATE_TIME |
The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
|
permissions[].id |
STRING |
The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId |
permissions[].kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#permission" |
permissions[].permissionDetails[] |
OBJECT |
|
permissions[].permissionDetails[].inherited |
BOOLEAN |
Whether this permission is inherited. This field is always populated. This is an output-only field |
permissions[].permissionDetails[].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 shared drive |
permissions[].permissionDetails[].permissionType |
STRING |
The permission type for this user. While new values may be added in future, the following are currently possible:
|
permissions[].permissionDetails[].role |
STRING |
The primary role for this user. While new values may be added in the future, the following are currently possible:
|
permissions[].photoLink |
STRING |
A link to the user's profile photo, if available |
permissions[].role |
STRING |
The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
|
permissions[].teamDrivePermissionDetails[] |
OBJECT |
|
permissions[].teamDrivePermissionDetails[].inherited |
BOOLEAN |
Deprecated - use permissionDetails/inherited instead |
permissions[].teamDrivePermissionDetails[].inheritedFrom |
STRING |
Deprecated - use permissionDetails/inheritedFrom instead |
permissions[].teamDrivePermissionDetails[].role |
STRING |
Deprecated - use permissionDetails/role instead |
permissions[].teamDrivePermissionDetails[].teamDrivePermissionType |
STRING |
Deprecated - use permissionDetails/permissionType instead |
permissions[].type |
STRING |
The type of the grantee. Valid values are:
|
= Parameter name
= Format
kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#permissionList" |
nextPageToken STRING The page token for the next page of permissions. This field will be absent if the end of the permissions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results |
permissions[] OBJECT A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy |
permissions[].allowFileDiscovery BOOLEAN Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone |
permissions[].deleted BOOLEAN Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions |
permissions[].displayName STRING A displayable name for users, groups or domains |
permissions[].domain STRING The domain to which this permission refers |
permissions[].emailAddress STRING The email address of the user or group to which this permission refers |
permissions[].expirationTime DATE_TIME The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
|
permissions[].id STRING The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId |
permissions[].kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#permission" |
permissions[].permissionDetails[] OBJECT |
permissions[].permissionDetails[].inherited BOOLEAN Whether this permission is inherited. This field is always populated. This is an output-only field |
permissions[].permissionDetails[].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 shared drive |
permissions[].permissionDetails[].permissionType STRING The permission type for this user. While new values may be added in future, the following are currently possible:
|
permissions[].permissionDetails[].role STRING The primary role for this user. While new values may be added in the future, the following are currently possible:
|
permissions[].photoLink STRING A link to the user's profile photo, if available |
permissions[].role STRING The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
|
permissions[].teamDrivePermissionDetails[] OBJECT |
permissions[].teamDrivePermissionDetails[].inherited BOOLEAN Deprecated - use permissionDetails/inherited instead |
permissions[].teamDrivePermissionDetails[].inheritedFrom STRING Deprecated - use permissionDetails/inheritedFrom instead |
permissions[].teamDrivePermissionDetails[].role STRING Deprecated - use permissionDetails/role instead |
permissions[].teamDrivePermissionDetails[].teamDrivePermissionType STRING Deprecated - use permissionDetails/permissionType instead |
permissions[].type STRING The type of the grantee. Valid values are:
|