Update
|
|||||
|
|
Updates a file's metadata and/or content with patch semantics
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 its own configuration data in your Google Drive
- 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
- Modify your Google Apps Script scripts' behavior
Input
This building block consumes 171 input parameters
Name | Format | Description |
---|---|---|
fileId Required |
STRING |
The ID of the file |
addParents |
STRING |
A comma-separated list of parent IDs to add |
keepRevisionForever |
BOOLEAN |
Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive |
ocrLanguage |
STRING |
A language hint for OCR processing during image import (ISO 639-1 code) |
removeParents |
STRING |
A comma-separated list of parent IDs to remove |
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 |
useContentAsIndexableText |
BOOLEAN |
Whether to use the uploaded content as indexable text |
appProperties |
OBJECT |
A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests |
appProperties.customKey.value Required |
STRING |
A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests |
capabilities |
OBJECT |
Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take |
capabilities.canAddChildren |
BOOLEAN |
Whether the current user can add children to this folder. This is always false when the item is not a folder |
capabilities.canChangeCopyRequiresWriterPermission |
BOOLEAN |
Whether the current user can change the copyRequiresWriterPermission restriction of this file |
capabilities.canChangeViewersCanCopyContent |
BOOLEAN |
Deprecated |
capabilities.canComment |
BOOLEAN |
Whether the current user can comment on this file |
capabilities.canCopy |
BOOLEAN |
Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder |
capabilities.canDelete |
BOOLEAN |
Whether the current user can delete this file |
capabilities.canDeleteChildren |
BOOLEAN |
Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canDownload |
BOOLEAN |
Whether the current user can download this file |
capabilities.canEdit |
BOOLEAN |
Whether the current user can edit this file |
capabilities.canListChildren |
BOOLEAN |
Whether the current user can list the children of this folder. This is always false when the item is not a folder |
capabilities.canMoveChildrenOutOfDrive |
BOOLEAN |
Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canMoveChildrenOutOfTeamDrive |
BOOLEAN |
Deprecated - use canMoveChildrenOutOfDrive instead |
capabilities.canMoveChildrenWithinDrive |
BOOLEAN |
Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canMoveChildrenWithinTeamDrive |
BOOLEAN |
Deprecated - use canMoveChildrenWithinDrive instead |
capabilities.canMoveItemIntoTeamDrive |
BOOLEAN |
Deprecated - use canMoveItemOutOfDrive instead |
capabilities.canMoveItemOutOfDrive |
BOOLEAN |
Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added |
capabilities.canMoveItemOutOfTeamDrive |
BOOLEAN |
Deprecated - use canMoveItemOutOfDrive instead |
capabilities.canMoveItemWithinDrive |
BOOLEAN |
Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives |
capabilities.canMoveItemWithinTeamDrive |
BOOLEAN |
Deprecated - use canMoveItemWithinDrive instead |
capabilities.canMoveTeamDriveItem |
BOOLEAN |
Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead |
capabilities.canReadDrive |
BOOLEAN |
Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives |
capabilities.canReadRevisions |
BOOLEAN |
Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read |
capabilities.canReadTeamDrive |
BOOLEAN |
Deprecated - use canReadDrive instead |
capabilities.canRemoveChildren |
BOOLEAN |
Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead |
capabilities.canRename |
BOOLEAN |
Whether the current user can rename this file |
capabilities.canShare |
BOOLEAN |
Whether the current user can modify the sharing settings for this file |
capabilities.canTrash |
BOOLEAN |
Whether the current user can move this file to trash |
capabilities.canTrashChildren |
BOOLEAN |
Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canUntrash |
BOOLEAN |
Whether the current user can restore this file from trash |
contentHints |
OBJECT |
Additional information about the content of the file. These fields are never populated in responses |
contentHints.indexableText |
STRING |
Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements |
contentHints.thumbnail |
OBJECT |
A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail |
contentHints.thumbnail.image |
BINARY |
The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5) |
contentHints.thumbnail.mimeType |
STRING |
The MIME type of the thumbnail |
copyRequiresWriterPermission |
BOOLEAN |
Whether the options to copy, print, or download this file, should be disabled for readers and commenters |
createdTime |
DATE_TIME |
The time at which the file was created (RFC 3339 date-time) |
description |
STRING |
A short description of the file |
driveId |
STRING |
ID of the shared drive the file resides in. Only populated for items in shared drives |
explicitlyTrashed |
BOOLEAN |
Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder |
exportLinks |
OBJECT |
Links for exporting Google Docs to specific formats |
exportLinks.customKey.value Required |
STRING |
Links for exporting Google Docs to specific formats |
fileExtension |
STRING |
The final component of fullFileExtension. This is only available for files with binary content in Google Drive |
folderColorRgb |
STRING |
The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. If an unsupported color is specified, the closest color in the palette will be used instead |
fullFileExtension |
STRING |
The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension |
hasAugmentedPermissions |
BOOLEAN |
Whether any users are granted file access directly on this file. This field is only populated for shared drive files |
hasThumbnail |
BOOLEAN |
Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field |
headRevisionId |
STRING |
The ID of the file's head revision. This is currently only available for files with binary content in Google Drive |
iconLink |
STRING |
A static, unauthenticated link to the file's icon |
id |
STRING |
The ID of the file |
imageMediaMetadata |
OBJECT |
Additional metadata about image media, if available |
imageMediaMetadata.aperture |
FLOAT |
The aperture used to create the photo (f-number) |
imageMediaMetadata.cameraMake |
STRING |
The make of the camera used to create the photo |
imageMediaMetadata.cameraModel |
STRING |
The model of the camera used to create the photo |
imageMediaMetadata.colorSpace |
STRING |
The color space of the photo |
imageMediaMetadata.exposureBias |
FLOAT |
The exposure bias of the photo (APEX value) |
imageMediaMetadata.exposureMode |
STRING |
The exposure mode used to create the photo |
imageMediaMetadata.exposureTime |
FLOAT |
The length of the exposure, in seconds |
imageMediaMetadata.flashUsed |
BOOLEAN |
Whether a flash was used to create the photo |
imageMediaMetadata.focalLength |
FLOAT |
The focal length used to create the photo, in millimeters |
imageMediaMetadata.height |
INTEGER |
The height of the image in pixels |
imageMediaMetadata.isoSpeed |
INTEGER |
The ISO speed used to create the photo |
imageMediaMetadata.lens |
STRING |
The lens used to create the photo |
imageMediaMetadata.location |
OBJECT |
Geographic location information stored in the image |
imageMediaMetadata.location.altitude |
NUMBER |
The altitude stored in the image |
imageMediaMetadata.location.latitude |
NUMBER |
The latitude stored in the image |
imageMediaMetadata.location.longitude |
NUMBER |
The longitude stored in the image |
imageMediaMetadata.maxApertureValue |
FLOAT |
The smallest f-number of the lens at the focal length used to create the photo (APEX value) |
imageMediaMetadata.meteringMode |
STRING |
The metering mode used to create the photo |
imageMediaMetadata.rotation |
INTEGER |
The rotation in clockwise degrees from the image's original orientation |
imageMediaMetadata.sensor |
STRING |
The type of sensor used to create the photo |
imageMediaMetadata.subjectDistance |
INTEGER |
The distance to the subject of the photo, in meters |
imageMediaMetadata.time |
STRING |
The date and time the photo was taken (EXIF DateTime) |
imageMediaMetadata.whiteBalance |
STRING |
The white balance mode used to create the photo |
imageMediaMetadata.width |
INTEGER |
The width of the image in pixels |
isAppAuthorized |
BOOLEAN |
Whether the file was created or opened by the requesting app |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#file" |
lastModifyingUser |
OBJECT |
Information about a Drive user |
lastModifyingUser.displayName |
STRING |
A plain text displayable name for this user |
lastModifyingUser.emailAddress |
STRING |
The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
lastModifyingUser.kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#user" |
lastModifyingUser.me |
BOOLEAN |
Whether this user is the requesting user |
lastModifyingUser.permissionId |
STRING |
The user's ID as visible in Permission resources |
lastModifyingUser.photoLink |
STRING |
A link to the user's profile photo, if available |
md5Checksum |
STRING |
The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive |
mimeType |
STRING |
The MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource |
modifiedByMe |
BOOLEAN |
Whether the file has been modified by this user |
modifiedByMeTime |
DATE_TIME |
The last time the file was modified by the user (RFC 3339 date-time) |
modifiedTime |
DATE_TIME |
The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user |
name |
STRING |
The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant |
originalFilename |
STRING |
The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive |
ownedByMe |
BOOLEAN |
Whether the user owns the file. Not populated for items in shared drives |
owners[] |
OBJECT |
Information about a Drive user |
owners[].displayName |
STRING |
A plain text displayable name for this user |
owners[].emailAddress |
STRING |
The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
owners[].kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#user" |
owners[].me |
BOOLEAN |
Whether this user is the requesting user |
owners[].permissionId |
STRING |
The user's ID as visible in Permission resources |
owners[].photoLink |
STRING |
A link to the user's profile photo, if available |
parents[] |
STRING |
|
permissionIds[] |
STRING |
|
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:
|
properties |
OBJECT |
A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests |
properties.customKey.value Required |
STRING |
A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests |
quotaBytesUsed |
INTEGER |
The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled |
shared |
BOOLEAN |
Whether the file has been shared. Not populated for items in shared drives |
sharedWithMeTime |
DATE_TIME |
The time at which the file was shared with the user, if applicable (RFC 3339 date-time) |
sharingUser |
OBJECT |
Information about a Drive user |
sharingUser.displayName |
STRING |
A plain text displayable name for this user |
sharingUser.emailAddress |
STRING |
The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
sharingUser.kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#user" |
sharingUser.me |
BOOLEAN |
Whether this user is the requesting user |
sharingUser.permissionId |
STRING |
The user's ID as visible in Permission resources |
sharingUser.photoLink |
STRING |
A link to the user's profile photo, if available |
size |
INTEGER |
The size of the file's content in bytes. This is only applicable to files with binary content in Google Drive |
spaces[] |
STRING |
|
starred |
BOOLEAN |
Whether the user has starred the file |
teamDriveId |
STRING |
Deprecated - use driveId instead |
thumbnailLink |
STRING |
A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content |
thumbnailVersion |
INTEGER |
The thumbnail version for use in thumbnail cache invalidation |
trashed |
BOOLEAN |
Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash |
trashedTime |
DATE_TIME |
The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives |
trashingUser |
OBJECT |
Information about a Drive user |
trashingUser.displayName |
STRING |
A plain text displayable name for this user |
trashingUser.emailAddress |
STRING |
The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
trashingUser.kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#user" |
trashingUser.me |
BOOLEAN |
Whether this user is the requesting user |
trashingUser.permissionId |
STRING |
The user's ID as visible in Permission resources |
trashingUser.photoLink |
STRING |
A link to the user's profile photo, if available |
version |
INTEGER |
A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user |
videoMediaMetadata |
OBJECT |
Additional metadata about video media. This may not be available immediately upon upload |
videoMediaMetadata.durationMillis |
INTEGER |
The duration of the video in milliseconds |
videoMediaMetadata.height |
INTEGER |
The height of the video in pixels |
videoMediaMetadata.width |
INTEGER |
The width of the video in pixels |
viewedByMe |
BOOLEAN |
Whether the file has been viewed by this user |
viewedByMeTime |
DATE_TIME |
The last time the file was viewed by the user (RFC 3339 date-time) |
viewersCanCopyContent |
BOOLEAN |
Deprecated - use copyRequiresWriterPermission instead |
webContentLink |
STRING |
A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive |
webViewLink |
STRING |
A link for opening the file in a relevant Google editor or viewer in a browser |
writersCanShare |
BOOLEAN |
Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives |
= Parameter name
= Format
fileId STRING Required The ID of the file |
addParents STRING A comma-separated list of parent IDs to add |
keepRevisionForever BOOLEAN Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive |
ocrLanguage STRING A language hint for OCR processing during image import (ISO 639-1 code) |
removeParents STRING A comma-separated list of parent IDs to remove |
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 |
useContentAsIndexableText BOOLEAN Whether to use the uploaded content as indexable text |
appProperties OBJECT A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests |
appProperties.customKey.value STRING Required A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests |
capabilities OBJECT Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take |
capabilities.canAddChildren BOOLEAN Whether the current user can add children to this folder. This is always false when the item is not a folder |
capabilities.canChangeCopyRequiresWriterPermission BOOLEAN Whether the current user can change the copyRequiresWriterPermission restriction of this file |
capabilities.canChangeViewersCanCopyContent BOOLEAN Deprecated |
capabilities.canComment BOOLEAN Whether the current user can comment on this file |
capabilities.canCopy BOOLEAN Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder |
capabilities.canDelete BOOLEAN Whether the current user can delete this file |
capabilities.canDeleteChildren BOOLEAN Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canDownload BOOLEAN Whether the current user can download this file |
capabilities.canEdit BOOLEAN Whether the current user can edit this file |
capabilities.canListChildren BOOLEAN Whether the current user can list the children of this folder. This is always false when the item is not a folder |
capabilities.canMoveChildrenOutOfDrive BOOLEAN Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canMoveChildrenOutOfTeamDrive BOOLEAN Deprecated - use canMoveChildrenOutOfDrive instead |
capabilities.canMoveChildrenWithinDrive BOOLEAN Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canMoveChildrenWithinTeamDrive BOOLEAN Deprecated - use canMoveChildrenWithinDrive instead |
capabilities.canMoveItemIntoTeamDrive BOOLEAN Deprecated - use canMoveItemOutOfDrive instead |
capabilities.canMoveItemOutOfDrive BOOLEAN Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added |
capabilities.canMoveItemOutOfTeamDrive BOOLEAN Deprecated - use canMoveItemOutOfDrive instead |
capabilities.canMoveItemWithinDrive BOOLEAN Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives |
capabilities.canMoveItemWithinTeamDrive BOOLEAN Deprecated - use canMoveItemWithinDrive instead |
capabilities.canMoveTeamDriveItem BOOLEAN Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead |
capabilities.canReadDrive BOOLEAN Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives |
capabilities.canReadRevisions BOOLEAN Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read |
capabilities.canReadTeamDrive BOOLEAN Deprecated - use canReadDrive instead |
capabilities.canRemoveChildren BOOLEAN Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead |
capabilities.canRename BOOLEAN Whether the current user can rename this file |
capabilities.canShare BOOLEAN Whether the current user can modify the sharing settings for this file |
capabilities.canTrash BOOLEAN Whether the current user can move this file to trash |
capabilities.canTrashChildren BOOLEAN Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canUntrash BOOLEAN Whether the current user can restore this file from trash |
contentHints OBJECT Additional information about the content of the file. These fields are never populated in responses |
contentHints.indexableText STRING Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements |
contentHints.thumbnail OBJECT A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail |
contentHints.thumbnail.image BINARY The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5) |
contentHints.thumbnail.mimeType STRING The MIME type of the thumbnail |
copyRequiresWriterPermission BOOLEAN Whether the options to copy, print, or download this file, should be disabled for readers and commenters |
createdTime DATE_TIME The time at which the file was created (RFC 3339 date-time) |
description STRING A short description of the file |
driveId STRING ID of the shared drive the file resides in. Only populated for items in shared drives |
explicitlyTrashed BOOLEAN Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder |
exportLinks OBJECT Links for exporting Google Docs to specific formats |
exportLinks.customKey.value STRING Required Links for exporting Google Docs to specific formats |
fileExtension STRING The final component of fullFileExtension. This is only available for files with binary content in Google Drive |
folderColorRgb STRING The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. If an unsupported color is specified, the closest color in the palette will be used instead |
fullFileExtension STRING The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension |
hasAugmentedPermissions BOOLEAN Whether any users are granted file access directly on this file. This field is only populated for shared drive files |
hasThumbnail BOOLEAN Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field |
headRevisionId STRING The ID of the file's head revision. This is currently only available for files with binary content in Google Drive |
iconLink STRING A static, unauthenticated link to the file's icon |
id STRING The ID of the file |
imageMediaMetadata OBJECT Additional metadata about image media, if available |
imageMediaMetadata.aperture FLOAT The aperture used to create the photo (f-number) |
imageMediaMetadata.cameraMake STRING The make of the camera used to create the photo |
imageMediaMetadata.cameraModel STRING The model of the camera used to create the photo |
imageMediaMetadata.colorSpace STRING The color space of the photo |
imageMediaMetadata.exposureBias FLOAT The exposure bias of the photo (APEX value) |
imageMediaMetadata.exposureMode STRING The exposure mode used to create the photo |
imageMediaMetadata.exposureTime FLOAT The length of the exposure, in seconds |
imageMediaMetadata.flashUsed BOOLEAN Whether a flash was used to create the photo |
imageMediaMetadata.focalLength FLOAT The focal length used to create the photo, in millimeters |
imageMediaMetadata.height INTEGER The height of the image in pixels |
imageMediaMetadata.isoSpeed INTEGER The ISO speed used to create the photo |
imageMediaMetadata.lens STRING The lens used to create the photo |
imageMediaMetadata.location OBJECT Geographic location information stored in the image |
imageMediaMetadata.location.altitude NUMBER The altitude stored in the image |
imageMediaMetadata.location.latitude NUMBER The latitude stored in the image |
imageMediaMetadata.location.longitude NUMBER The longitude stored in the image |
imageMediaMetadata.maxApertureValue FLOAT The smallest f-number of the lens at the focal length used to create the photo (APEX value) |
imageMediaMetadata.meteringMode STRING The metering mode used to create the photo |
imageMediaMetadata.rotation INTEGER The rotation in clockwise degrees from the image's original orientation |
imageMediaMetadata.sensor STRING The type of sensor used to create the photo |
imageMediaMetadata.subjectDistance INTEGER The distance to the subject of the photo, in meters |
imageMediaMetadata.time STRING The date and time the photo was taken (EXIF DateTime) |
imageMediaMetadata.whiteBalance STRING The white balance mode used to create the photo |
imageMediaMetadata.width INTEGER The width of the image in pixels |
isAppAuthorized BOOLEAN Whether the file was created or opened by the requesting app |
kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#file" |
lastModifyingUser OBJECT Information about a Drive user |
lastModifyingUser.displayName STRING A plain text displayable name for this user |
lastModifyingUser.emailAddress STRING The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
lastModifyingUser.kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#user" |
lastModifyingUser.me BOOLEAN Whether this user is the requesting user |
lastModifyingUser.permissionId STRING The user's ID as visible in Permission resources |
lastModifyingUser.photoLink STRING A link to the user's profile photo, if available |
md5Checksum STRING The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive |
mimeType STRING The MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource |
modifiedByMe BOOLEAN Whether the file has been modified by this user |
modifiedByMeTime DATE_TIME The last time the file was modified by the user (RFC 3339 date-time) |
modifiedTime DATE_TIME The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user |
name STRING The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant |
originalFilename STRING The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive |
ownedByMe BOOLEAN Whether the user owns the file. Not populated for items in shared drives |
owners[] OBJECT Information about a Drive user |
owners[].displayName STRING A plain text displayable name for this user |
owners[].emailAddress STRING The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
owners[].kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#user" |
owners[].me BOOLEAN Whether this user is the requesting user |
owners[].permissionId STRING The user's ID as visible in Permission resources |
owners[].photoLink STRING A link to the user's profile photo, if available |
parents[] STRING |
permissionIds[] STRING |
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:
|
properties OBJECT A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests |
properties.customKey.value STRING Required A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests |
quotaBytesUsed INTEGER The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled |
shared BOOLEAN Whether the file has been shared. Not populated for items in shared drives |
sharedWithMeTime DATE_TIME The time at which the file was shared with the user, if applicable (RFC 3339 date-time) |
sharingUser OBJECT Information about a Drive user |
sharingUser.displayName STRING A plain text displayable name for this user |
sharingUser.emailAddress STRING The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
sharingUser.kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#user" |
sharingUser.me BOOLEAN Whether this user is the requesting user |
sharingUser.permissionId STRING The user's ID as visible in Permission resources |
sharingUser.photoLink STRING A link to the user's profile photo, if available |
size INTEGER The size of the file's content in bytes. This is only applicable to files with binary content in Google Drive |
spaces[] STRING |
starred BOOLEAN Whether the user has starred the file |
teamDriveId STRING Deprecated - use driveId instead |
thumbnailLink STRING A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content |
thumbnailVersion INTEGER The thumbnail version for use in thumbnail cache invalidation |
trashed BOOLEAN Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash |
trashedTime DATE_TIME The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives |
trashingUser OBJECT Information about a Drive user |
trashingUser.displayName STRING A plain text displayable name for this user |
trashingUser.emailAddress STRING The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
trashingUser.kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#user" |
trashingUser.me BOOLEAN Whether this user is the requesting user |
trashingUser.permissionId STRING The user's ID as visible in Permission resources |
trashingUser.photoLink STRING A link to the user's profile photo, if available |
version INTEGER A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user |
videoMediaMetadata OBJECT Additional metadata about video media. This may not be available immediately upon upload |
videoMediaMetadata.durationMillis INTEGER The duration of the video in milliseconds |
videoMediaMetadata.height INTEGER The height of the video in pixels |
videoMediaMetadata.width INTEGER The width of the video in pixels |
viewedByMe BOOLEAN Whether the file has been viewed by this user |
viewedByMeTime DATE_TIME The last time the file was viewed by the user (RFC 3339 date-time) |
viewersCanCopyContent BOOLEAN Deprecated - use copyRequiresWriterPermission instead |
webContentLink STRING A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive |
webViewLink STRING A link for opening the file in a relevant Google editor or viewer in a browser |
writersCanShare BOOLEAN Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives |
Output
This building block provides 163 output parameters
Name | Format | Description |
---|---|---|
appProperties |
OBJECT |
A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests |
appProperties.customKey.value |
STRING |
A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests |
capabilities |
OBJECT |
Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take |
capabilities.canAddChildren |
BOOLEAN |
Whether the current user can add children to this folder. This is always false when the item is not a folder |
capabilities.canChangeCopyRequiresWriterPermission |
BOOLEAN |
Whether the current user can change the copyRequiresWriterPermission restriction of this file |
capabilities.canChangeViewersCanCopyContent |
BOOLEAN |
Deprecated |
capabilities.canComment |
BOOLEAN |
Whether the current user can comment on this file |
capabilities.canCopy |
BOOLEAN |
Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder |
capabilities.canDelete |
BOOLEAN |
Whether the current user can delete this file |
capabilities.canDeleteChildren |
BOOLEAN |
Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canDownload |
BOOLEAN |
Whether the current user can download this file |
capabilities.canEdit |
BOOLEAN |
Whether the current user can edit this file |
capabilities.canListChildren |
BOOLEAN |
Whether the current user can list the children of this folder. This is always false when the item is not a folder |
capabilities.canMoveChildrenOutOfDrive |
BOOLEAN |
Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canMoveChildrenOutOfTeamDrive |
BOOLEAN |
Deprecated - use canMoveChildrenOutOfDrive instead |
capabilities.canMoveChildrenWithinDrive |
BOOLEAN |
Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canMoveChildrenWithinTeamDrive |
BOOLEAN |
Deprecated - use canMoveChildrenWithinDrive instead |
capabilities.canMoveItemIntoTeamDrive |
BOOLEAN |
Deprecated - use canMoveItemOutOfDrive instead |
capabilities.canMoveItemOutOfDrive |
BOOLEAN |
Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added |
capabilities.canMoveItemOutOfTeamDrive |
BOOLEAN |
Deprecated - use canMoveItemOutOfDrive instead |
capabilities.canMoveItemWithinDrive |
BOOLEAN |
Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives |
capabilities.canMoveItemWithinTeamDrive |
BOOLEAN |
Deprecated - use canMoveItemWithinDrive instead |
capabilities.canMoveTeamDriveItem |
BOOLEAN |
Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead |
capabilities.canReadDrive |
BOOLEAN |
Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives |
capabilities.canReadRevisions |
BOOLEAN |
Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read |
capabilities.canReadTeamDrive |
BOOLEAN |
Deprecated - use canReadDrive instead |
capabilities.canRemoveChildren |
BOOLEAN |
Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead |
capabilities.canRename |
BOOLEAN |
Whether the current user can rename this file |
capabilities.canShare |
BOOLEAN |
Whether the current user can modify the sharing settings for this file |
capabilities.canTrash |
BOOLEAN |
Whether the current user can move this file to trash |
capabilities.canTrashChildren |
BOOLEAN |
Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canUntrash |
BOOLEAN |
Whether the current user can restore this file from trash |
contentHints |
OBJECT |
Additional information about the content of the file. These fields are never populated in responses |
contentHints.indexableText |
STRING |
Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements |
contentHints.thumbnail |
OBJECT |
A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail |
contentHints.thumbnail.image |
BINARY |
The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5) |
contentHints.thumbnail.mimeType |
STRING |
The MIME type of the thumbnail |
copyRequiresWriterPermission |
BOOLEAN |
Whether the options to copy, print, or download this file, should be disabled for readers and commenters |
createdTime |
DATE_TIME |
The time at which the file was created (RFC 3339 date-time) |
description |
STRING |
A short description of the file |
driveId |
STRING |
ID of the shared drive the file resides in. Only populated for items in shared drives |
explicitlyTrashed |
BOOLEAN |
Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder |
exportLinks |
OBJECT |
Links for exporting Google Docs to specific formats |
exportLinks.customKey.value |
STRING |
Links for exporting Google Docs to specific formats |
fileExtension |
STRING |
The final component of fullFileExtension. This is only available for files with binary content in Google Drive |
folderColorRgb |
STRING |
The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. If an unsupported color is specified, the closest color in the palette will be used instead |
fullFileExtension |
STRING |
The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension |
hasAugmentedPermissions |
BOOLEAN |
Whether any users are granted file access directly on this file. This field is only populated for shared drive files |
hasThumbnail |
BOOLEAN |
Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field |
headRevisionId |
STRING |
The ID of the file's head revision. This is currently only available for files with binary content in Google Drive |
iconLink |
STRING |
A static, unauthenticated link to the file's icon |
id |
STRING |
The ID of the file |
imageMediaMetadata |
OBJECT |
Additional metadata about image media, if available |
imageMediaMetadata.aperture |
FLOAT |
The aperture used to create the photo (f-number) |
imageMediaMetadata.cameraMake |
STRING |
The make of the camera used to create the photo |
imageMediaMetadata.cameraModel |
STRING |
The model of the camera used to create the photo |
imageMediaMetadata.colorSpace |
STRING |
The color space of the photo |
imageMediaMetadata.exposureBias |
FLOAT |
The exposure bias of the photo (APEX value) |
imageMediaMetadata.exposureMode |
STRING |
The exposure mode used to create the photo |
imageMediaMetadata.exposureTime |
FLOAT |
The length of the exposure, in seconds |
imageMediaMetadata.flashUsed |
BOOLEAN |
Whether a flash was used to create the photo |
imageMediaMetadata.focalLength |
FLOAT |
The focal length used to create the photo, in millimeters |
imageMediaMetadata.height |
INTEGER |
The height of the image in pixels |
imageMediaMetadata.isoSpeed |
INTEGER |
The ISO speed used to create the photo |
imageMediaMetadata.lens |
STRING |
The lens used to create the photo |
imageMediaMetadata.location |
OBJECT |
Geographic location information stored in the image |
imageMediaMetadata.location.altitude |
NUMBER |
The altitude stored in the image |
imageMediaMetadata.location.latitude |
NUMBER |
The latitude stored in the image |
imageMediaMetadata.location.longitude |
NUMBER |
The longitude stored in the image |
imageMediaMetadata.maxApertureValue |
FLOAT |
The smallest f-number of the lens at the focal length used to create the photo (APEX value) |
imageMediaMetadata.meteringMode |
STRING |
The metering mode used to create the photo |
imageMediaMetadata.rotation |
INTEGER |
The rotation in clockwise degrees from the image's original orientation |
imageMediaMetadata.sensor |
STRING |
The type of sensor used to create the photo |
imageMediaMetadata.subjectDistance |
INTEGER |
The distance to the subject of the photo, in meters |
imageMediaMetadata.time |
STRING |
The date and time the photo was taken (EXIF DateTime) |
imageMediaMetadata.whiteBalance |
STRING |
The white balance mode used to create the photo |
imageMediaMetadata.width |
INTEGER |
The width of the image in pixels |
isAppAuthorized |
BOOLEAN |
Whether the file was created or opened by the requesting app |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#file" |
lastModifyingUser |
OBJECT |
Information about a Drive user |
lastModifyingUser.displayName |
STRING |
A plain text displayable name for this user |
lastModifyingUser.emailAddress |
STRING |
The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
lastModifyingUser.kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#user" |
lastModifyingUser.me |
BOOLEAN |
Whether this user is the requesting user |
lastModifyingUser.permissionId |
STRING |
The user's ID as visible in Permission resources |
lastModifyingUser.photoLink |
STRING |
A link to the user's profile photo, if available |
md5Checksum |
STRING |
The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive |
mimeType |
STRING |
The MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource |
modifiedByMe |
BOOLEAN |
Whether the file has been modified by this user |
modifiedByMeTime |
DATE_TIME |
The last time the file was modified by the user (RFC 3339 date-time) |
modifiedTime |
DATE_TIME |
The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user |
name |
STRING |
The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant |
originalFilename |
STRING |
The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive |
ownedByMe |
BOOLEAN |
Whether the user owns the file. Not populated for items in shared drives |
owners[] |
OBJECT |
Information about a Drive user |
owners[].displayName |
STRING |
A plain text displayable name for this user |
owners[].emailAddress |
STRING |
The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
owners[].kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#user" |
owners[].me |
BOOLEAN |
Whether this user is the requesting user |
owners[].permissionId |
STRING |
The user's ID as visible in Permission resources |
owners[].photoLink |
STRING |
A link to the user's profile photo, if available |
parents[] |
STRING |
|
permissionIds[] |
STRING |
|
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:
|
properties |
OBJECT |
A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests |
properties.customKey.value |
STRING |
A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests |
quotaBytesUsed |
INTEGER |
The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled |
shared |
BOOLEAN |
Whether the file has been shared. Not populated for items in shared drives |
sharedWithMeTime |
DATE_TIME |
The time at which the file was shared with the user, if applicable (RFC 3339 date-time) |
sharingUser |
OBJECT |
Information about a Drive user |
sharingUser.displayName |
STRING |
A plain text displayable name for this user |
sharingUser.emailAddress |
STRING |
The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
sharingUser.kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#user" |
sharingUser.me |
BOOLEAN |
Whether this user is the requesting user |
sharingUser.permissionId |
STRING |
The user's ID as visible in Permission resources |
sharingUser.photoLink |
STRING |
A link to the user's profile photo, if available |
size |
INTEGER |
The size of the file's content in bytes. This is only applicable to files with binary content in Google Drive |
spaces[] |
STRING |
|
starred |
BOOLEAN |
Whether the user has starred the file |
teamDriveId |
STRING |
Deprecated - use driveId instead |
thumbnailLink |
STRING |
A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content |
thumbnailVersion |
INTEGER |
The thumbnail version for use in thumbnail cache invalidation |
trashed |
BOOLEAN |
Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash |
trashedTime |
DATE_TIME |
The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives |
trashingUser |
OBJECT |
Information about a Drive user |
trashingUser.displayName |
STRING |
A plain text displayable name for this user |
trashingUser.emailAddress |
STRING |
The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
trashingUser.kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "drive#user" |
trashingUser.me |
BOOLEAN |
Whether this user is the requesting user |
trashingUser.permissionId |
STRING |
The user's ID as visible in Permission resources |
trashingUser.photoLink |
STRING |
A link to the user's profile photo, if available |
version |
INTEGER |
A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user |
videoMediaMetadata |
OBJECT |
Additional metadata about video media. This may not be available immediately upon upload |
videoMediaMetadata.durationMillis |
INTEGER |
The duration of the video in milliseconds |
videoMediaMetadata.height |
INTEGER |
The height of the video in pixels |
videoMediaMetadata.width |
INTEGER |
The width of the video in pixels |
viewedByMe |
BOOLEAN |
Whether the file has been viewed by this user |
viewedByMeTime |
DATE_TIME |
The last time the file was viewed by the user (RFC 3339 date-time) |
viewersCanCopyContent |
BOOLEAN |
Deprecated - use copyRequiresWriterPermission instead |
webContentLink |
STRING |
A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive |
webViewLink |
STRING |
A link for opening the file in a relevant Google editor or viewer in a browser |
writersCanShare |
BOOLEAN |
Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives |
= Parameter name
= Format
appProperties OBJECT A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests |
appProperties.customKey.value STRING A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests |
capabilities OBJECT Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take |
capabilities.canAddChildren BOOLEAN Whether the current user can add children to this folder. This is always false when the item is not a folder |
capabilities.canChangeCopyRequiresWriterPermission BOOLEAN Whether the current user can change the copyRequiresWriterPermission restriction of this file |
capabilities.canChangeViewersCanCopyContent BOOLEAN Deprecated |
capabilities.canComment BOOLEAN Whether the current user can comment on this file |
capabilities.canCopy BOOLEAN Whether the current user can copy this file. For an item in a shared drive, whether the current user can copy non-folder descendants of this item, or this item itself if it is not a folder |
capabilities.canDelete BOOLEAN Whether the current user can delete this file |
capabilities.canDeleteChildren BOOLEAN Whether the current user can delete children of this folder. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canDownload BOOLEAN Whether the current user can download this file |
capabilities.canEdit BOOLEAN Whether the current user can edit this file |
capabilities.canListChildren BOOLEAN Whether the current user can list the children of this folder. This is always false when the item is not a folder |
capabilities.canMoveChildrenOutOfDrive BOOLEAN Whether the current user can move children of this folder outside of the shared drive. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canMoveChildrenOutOfTeamDrive BOOLEAN Deprecated - use canMoveChildrenOutOfDrive instead |
capabilities.canMoveChildrenWithinDrive BOOLEAN Whether the current user can move children of this folder within the shared drive. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canMoveChildrenWithinTeamDrive BOOLEAN Deprecated - use canMoveChildrenWithinDrive instead |
capabilities.canMoveItemIntoTeamDrive BOOLEAN Deprecated - use canMoveItemOutOfDrive instead |
capabilities.canMoveItemOutOfDrive BOOLEAN Whether the current user can move this item outside of this drive by changing its parent. Note that a request to change the parent of the item may still fail depending on the new parent that is being added |
capabilities.canMoveItemOutOfTeamDrive BOOLEAN Deprecated - use canMoveItemOutOfDrive instead |
capabilities.canMoveItemWithinDrive BOOLEAN Whether the current user can move this item within this shared drive. Note that a request to change the parent of the item may still fail depending on the new parent that is being added. Only populated for items in shared drives |
capabilities.canMoveItemWithinTeamDrive BOOLEAN Deprecated - use canMoveItemWithinDrive instead |
capabilities.canMoveTeamDriveItem BOOLEAN Deprecated - use canMoveItemWithinDrive or canMoveItemOutOfDrive instead |
capabilities.canReadDrive BOOLEAN Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives |
capabilities.canReadRevisions BOOLEAN Whether the current user can read the revisions resource of this file. For a shared drive item, whether revisions of non-folder descendants of this item, or this item itself if it is not a folder, can be read |
capabilities.canReadTeamDrive BOOLEAN Deprecated - use canReadDrive instead |
capabilities.canRemoveChildren BOOLEAN Whether the current user can remove children from this folder. This is always false when the item is not a folder. For a folder in a shared drive, use canDeleteChildren or canTrashChildren instead |
capabilities.canRename BOOLEAN Whether the current user can rename this file |
capabilities.canShare BOOLEAN Whether the current user can modify the sharing settings for this file |
capabilities.canTrash BOOLEAN Whether the current user can move this file to trash |
capabilities.canTrashChildren BOOLEAN Whether the current user can trash children of this folder. This is false when the item is not a folder. Only populated for items in shared drives |
capabilities.canUntrash BOOLEAN Whether the current user can restore this file from trash |
contentHints OBJECT Additional information about the content of the file. These fields are never populated in responses |
contentHints.indexableText STRING Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements |
contentHints.thumbnail OBJECT A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail |
contentHints.thumbnail.image BINARY The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5) |
contentHints.thumbnail.mimeType STRING The MIME type of the thumbnail |
copyRequiresWriterPermission BOOLEAN Whether the options to copy, print, or download this file, should be disabled for readers and commenters |
createdTime DATE_TIME The time at which the file was created (RFC 3339 date-time) |
description STRING A short description of the file |
driveId STRING ID of the shared drive the file resides in. Only populated for items in shared drives |
explicitlyTrashed BOOLEAN Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder |
exportLinks OBJECT Links for exporting Google Docs to specific formats |
exportLinks.customKey.value STRING Links for exporting Google Docs to specific formats |
fileExtension STRING The final component of fullFileExtension. This is only available for files with binary content in Google Drive |
folderColorRgb STRING The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource. If an unsupported color is specified, the closest color in the palette will be used instead |
fullFileExtension STRING The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Google Drive. This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension |
hasAugmentedPermissions BOOLEAN Whether any users are granted file access directly on this file. This field is only populated for shared drive files |
hasThumbnail BOOLEAN Whether this file has a thumbnail. This does not indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field |
headRevisionId STRING The ID of the file's head revision. This is currently only available for files with binary content in Google Drive |
iconLink STRING A static, unauthenticated link to the file's icon |
id STRING The ID of the file |
imageMediaMetadata OBJECT Additional metadata about image media, if available |
imageMediaMetadata.aperture FLOAT The aperture used to create the photo (f-number) |
imageMediaMetadata.cameraMake STRING The make of the camera used to create the photo |
imageMediaMetadata.cameraModel STRING The model of the camera used to create the photo |
imageMediaMetadata.colorSpace STRING The color space of the photo |
imageMediaMetadata.exposureBias FLOAT The exposure bias of the photo (APEX value) |
imageMediaMetadata.exposureMode STRING The exposure mode used to create the photo |
imageMediaMetadata.exposureTime FLOAT The length of the exposure, in seconds |
imageMediaMetadata.flashUsed BOOLEAN Whether a flash was used to create the photo |
imageMediaMetadata.focalLength FLOAT The focal length used to create the photo, in millimeters |
imageMediaMetadata.height INTEGER The height of the image in pixels |
imageMediaMetadata.isoSpeed INTEGER The ISO speed used to create the photo |
imageMediaMetadata.lens STRING The lens used to create the photo |
imageMediaMetadata.location OBJECT Geographic location information stored in the image |
imageMediaMetadata.location.altitude NUMBER The altitude stored in the image |
imageMediaMetadata.location.latitude NUMBER The latitude stored in the image |
imageMediaMetadata.location.longitude NUMBER The longitude stored in the image |
imageMediaMetadata.maxApertureValue FLOAT The smallest f-number of the lens at the focal length used to create the photo (APEX value) |
imageMediaMetadata.meteringMode STRING The metering mode used to create the photo |
imageMediaMetadata.rotation INTEGER The rotation in clockwise degrees from the image's original orientation |
imageMediaMetadata.sensor STRING The type of sensor used to create the photo |
imageMediaMetadata.subjectDistance INTEGER The distance to the subject of the photo, in meters |
imageMediaMetadata.time STRING The date and time the photo was taken (EXIF DateTime) |
imageMediaMetadata.whiteBalance STRING The white balance mode used to create the photo |
imageMediaMetadata.width INTEGER The width of the image in pixels |
isAppAuthorized BOOLEAN Whether the file was created or opened by the requesting app |
kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#file" |
lastModifyingUser OBJECT Information about a Drive user |
lastModifyingUser.displayName STRING A plain text displayable name for this user |
lastModifyingUser.emailAddress STRING The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
lastModifyingUser.kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#user" |
lastModifyingUser.me BOOLEAN Whether this user is the requesting user |
lastModifyingUser.permissionId STRING The user's ID as visible in Permission resources |
lastModifyingUser.photoLink STRING A link to the user's profile photo, if available |
md5Checksum STRING The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive |
mimeType STRING The MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded. If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource |
modifiedByMe BOOLEAN Whether the file has been modified by this user |
modifiedByMeTime DATE_TIME The last time the file was modified by the user (RFC 3339 date-time) |
modifiedTime DATE_TIME The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user |
name STRING The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant |
originalFilename STRING The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive |
ownedByMe BOOLEAN Whether the user owns the file. Not populated for items in shared drives |
owners[] OBJECT Information about a Drive user |
owners[].displayName STRING A plain text displayable name for this user |
owners[].emailAddress STRING The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
owners[].kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#user" |
owners[].me BOOLEAN Whether this user is the requesting user |
owners[].permissionId STRING The user's ID as visible in Permission resources |
owners[].photoLink STRING A link to the user's profile photo, if available |
parents[] STRING |
permissionIds[] STRING |
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:
|
properties OBJECT A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests |
properties.customKey.value STRING A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests |
quotaBytesUsed INTEGER The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled |
shared BOOLEAN Whether the file has been shared. Not populated for items in shared drives |
sharedWithMeTime DATE_TIME The time at which the file was shared with the user, if applicable (RFC 3339 date-time) |
sharingUser OBJECT Information about a Drive user |
sharingUser.displayName STRING A plain text displayable name for this user |
sharingUser.emailAddress STRING The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
sharingUser.kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#user" |
sharingUser.me BOOLEAN Whether this user is the requesting user |
sharingUser.permissionId STRING The user's ID as visible in Permission resources |
sharingUser.photoLink STRING A link to the user's profile photo, if available |
size INTEGER The size of the file's content in bytes. This is only applicable to files with binary content in Google Drive |
spaces[] STRING |
starred BOOLEAN Whether the user has starred the file |
teamDriveId STRING Deprecated - use driveId instead |
thumbnailLink STRING A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Only populated when the requesting app can access the file's content |
thumbnailVersion INTEGER The thumbnail version for use in thumbnail cache invalidation |
trashed BOOLEAN Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash |
trashedTime DATE_TIME The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives |
trashingUser OBJECT Information about a Drive user |
trashingUser.displayName STRING A plain text displayable name for this user |
trashingUser.emailAddress STRING The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester |
trashingUser.kind STRING Identifies what kind of resource this is. Value: the fixed string "drive#user" |
trashingUser.me BOOLEAN Whether this user is the requesting user |
trashingUser.permissionId STRING The user's ID as visible in Permission resources |
trashingUser.photoLink STRING A link to the user's profile photo, if available |
version INTEGER A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user |
videoMediaMetadata OBJECT Additional metadata about video media. This may not be available immediately upon upload |
videoMediaMetadata.durationMillis INTEGER The duration of the video in milliseconds |
videoMediaMetadata.height INTEGER The height of the video in pixels |
videoMediaMetadata.width INTEGER The width of the video in pixels |
viewedByMe BOOLEAN Whether the file has been viewed by this user |
viewedByMeTime DATE_TIME The last time the file was viewed by the user (RFC 3339 date-time) |
viewersCanCopyContent BOOLEAN Deprecated - use copyRequiresWriterPermission instead |
webContentLink STRING A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive |
webViewLink STRING A link for opening the file in a relevant Google editor or viewer in a browser |
writersCanShare BOOLEAN Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives |