Skip to content

Google: Drive files schemas

25 Google schemas with complete fields and constraints.

← Drive files operations · All schemas

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — request body — body

FieldTypePresenceDescription and constraints
$objectRootThe metadata for a file. Some resource methods (such as `files.update`) require a `fileId`. Use the `files.list` method to retrieve the ID for a file.
appPropertiesobjectOptionalA collection of arbitrary key-value pairs which are private to the requesting app.
Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Additional keys: see wildcard field
appProperties.*stringAdditional keys
capabilitiesModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — capabilities
clientEncryptionDetailsModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — client Encryption Details
Client Side Encryption related details. Contains details about the encryption state of the file and details regarding the encryption mechanism that clients need to use when decrypting the contents of this item. This will only be present on files and not on folders or shortcuts.
contentHintsModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Hints
contentRestrictionsarrayOptionalRestrictions for accessing the content of the file. Only populated if such a restriction exists.
contentRestrictions[]ModelEach itemExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Restrictions item
copyRequiresWriterPermissionbooleanOptionalWhether the options to copy, print, or download this file should be disabled for readers and commenters.
createdTimestringOptionalThe time at which the file was created (RFC 3339 date-time).
Format: date-time
descriptionstringOptionalA short description of the file.
downloadRestrictionsModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — download Restrictions
Download restrictions applied on the file.
driveIdstringOptionalOutput only. ID of the shared drive the file resides in. Only populated for items in shared drives.
explicitlyTrashedbooleanOptionalOutput only. Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
exportLinksobjectOptionalOutput only. Links for exporting Docs Editors files to specific formats.
Read only: true
Additional keys: see wildcard field
exportLinks.*stringAdditional keys
fileExtensionstringOptionalOutput only. The final component of `fullFileExtension`. This is only available for files with binary content in Google Drive.
folderColorRgbstringOptionalThe color for a folder or a shortcut to a folder as an RGB hex string. The supported colors are published in the `folderColorPalette` field of the [`about`](/workspace/drive/api/reference/rest/v3/about) resource. If an unsupported color is specified, the closest color in the palette is used instead.
fullFileExtensionstringOptionalOutput only. 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's not cleared if the new name doesn't contain a valid extension.
hasAugmentedPermissionsbooleanOptionalOutput only. Whether there are permissions directly on this file. This field is only populated for items in shared drives.
hasThumbnailbooleanOptionalOutput only. Whether this file has a thumbnail. This doesn't indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
headRevisionIdstringOptionalOutput only. The ID of the file's head revision. This is currently only available for files with binary content in Google Drive.
iconLinkstringOptionalOutput only. A static, unauthenticated link to the file's icon.
idstringOptionalThe ID of the file.
imageMediaMetadataModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — request body — body image Media Metadata
inheritedPermissionsDisabledbooleanOptionalWhether this file has inherited permissions disabled. Inherited permissions are enabled by default.
isAppAuthorizedbooleanOptionalOutput only. Whether the file was created or opened by the requesting app.
kindstringOptionalOutput only. Identifies what kind of resource this is. Value: the fixed string `"drive#file"`.
Default: drive#file
labelInfoobjectOptionalLabel information on the file.
labelInfo.labelsarrayOptionalOutput only. The set of labels on the file as requested by the label IDs in the `includeLabels` parameter. By default, no labels are returned.
labelInfo.labels[]ModelEach itemExpand Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item
lastModifyingUserModelOptionalExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
Output only. The last user to modify the file. This field is only populated when the last modification was performed by a signed-in user.
linkShareMetadataobjectOptionalContains details about the link URLs that clients are using to refer to this item.
linkShareMetadata.securityUpdateEligiblebooleanOptionalOutput only. Whether the file is eligible for security update.
linkShareMetadata.securityUpdateEnabledbooleanOptionalOutput only. Whether the security update is enabled for this file.
md5ChecksumstringOptionalOutput only. The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
mimeTypestringOptionalThe MIME type of the file. Google Drive attempts 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 is imported, if possible. The supported import formats are published in the [`about`](/workspace/drive/api/reference/rest/v3/about) resource.
modifiedByMebooleanOptionalOutput only. Whether the file has been modified by this user.
modifiedByMeTimestringOptionalThe last time the file was modified by the user (RFC 3339 date-time).
Format: date-time
modifiedTimestringOptionalhe last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user.
Format: date-time
namestringOptionalThe name of the file. This isn't necessarily unique within a folder. Note that for immutable items such as the top-level folders of shared drives, the My Drive root folder, and the Application Data folder, the name is constant.
originalFilenamestringOptionalThe 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.
ownedByMebooleanOptionalOutput only. Whether the user owns the file. Not populated for items in shared drives.
ownersarrayOptionalOutput only. The owner of this file. Only certain legacy files may have more than one owner. This field isn't populated for items in shared drives.
owners[]ModelEach itemExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
parentsarrayOptionalThe ID of the parent folder containing the file. A file can only have one parent folder; specifying multiple parents isn't supported. If not specified as part of a create request, the file is placed directly in the user's My Drive folder. If not specified as part of a copy request, the file inherits any discoverable parent of the source file. Update requests must use the `addParents` and `removeParents` parameters to modify the parents list.
parents[]stringEach item
permissionIdsarrayOptionalOutput only. List of permission IDs for users with access to this file.
permissionIds[]stringEach item
permissionsarrayOptionalOutput only. The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
permissions[]ModelEach itemExpand Gets a permission by ID For more information, see Share files, folders, and drives (https: developers google com workspace drive api guides manage-sharing) — response body
propertiesobjectOptionalA collection of arbitrary key-value pairs which are visible to all apps.
Entries with null values are cleared in update and copy requests.
Additional keys: see wildcard field
properties.*stringAdditional keys
quotaBytesUsedstringOptionalOutput only. The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with `keepForever` enabled.
Format: int64
resourceKeystringOptionalOutput only. A key needed to access the item via a shared link.
sha1ChecksumstringOptionalOutput only. The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or shortcut files.
sha256ChecksumstringOptionalOutput only. The SHA256 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or shortcut files.
sharedbooleanOptionalOutput only. Whether the file has been shared. Not populated for items in shared drives.
sharedWithMeTimestringOptionalThe time at which the file was shared with the user, if applicable (RFC 3339 date-time).
Format: date-time
sharingUserModelOptionalExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
Output only. The user who shared the file with the requesting user, if applicable.
shortcutDetailsModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — shortcut Details
sizestringOptionalOutput only. Size in bytes of blobs and Google Workspace editor files. Won't be populated for files that have no size, like shortcuts and folders.
Format: int64
spacesarrayOptionalOutput only. The list of spaces which contain the file. The currently supported values are `drive`, `appDataFolder`, and `photos`.
spaces[]stringEach item
starredbooleanOptionalWhether the user has starred the file.
teamDriveIdstringOptionalDeprecated: Output only. Use `driveId` instead.
thumbnailLinkstringOptionalOutput only. A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Not intended for direct usage on web applications due to [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies. Consider using a proxy server. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in `files.thumbnailLink` must be fetched using a credentialed request.
thumbnailVersionstringOptionalOutput only. The thumbnail version for use in thumbnail cache invalidation.
Format: int64
trashedbooleanOptionalWhether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, but other users can still access the file in the owner's trash until it's permanently deleted.
trashedTimestringOptionalThe time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
Format: date-time
trashingUserModelOptionalExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
Output only. If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
versionstringOptionalOutput only. 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.
Format: int64
videoMediaMetadataModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — request body — body video Media Metadata
viewedByMebooleanOptionalOutput only. Whether the file has been viewed by this user.
viewedByMeTimestringOptionalThe last time the file was viewed by the user (RFC 3339 date-time).
Format: date-time
viewersCanCopyContentbooleanOptionalDeprecated: Use `copyRequiresWriterPermission` instead.
webContentLinkstringOptionalOutput only. A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
webViewLinkstringOptionalOutput only. A link for opening the file in a relevant Google editor or viewer in a browser.
writersCanSharebooleanOptionalWhether users with only `writer` permission can modify the file's permissions. Not populated for items in shared drives.

Referenced models: Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — client Encryption Details, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Restrictions item, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — download Restrictions, Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item, Gets a permission by ID For more information, see Share files, folders, and drives (https: developers google com workspace drive api guides manage-sharing) — response body, Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — capabilities, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Hints, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — request body — body image Media Metadata, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — shortcut Details, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — request body — body video Media Metadata

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — request body — body image Media Metadata

FieldTypePresenceDescription and constraints
$objectRootOutput only. Additional metadata about image media, if available.
aperturenumberOptionalOutput only. The aperture used to create the photo (f-number).
Format: float
cameraMakestringOptionalOutput only. The make of the camera used to create the photo.
cameraModelstringOptionalOutput only. The model of the camera used to create the photo.
colorSpacestringOptionalOutput only. The color space of the photo.
exposureBiasnumberOptionalOutput only. The exposure bias of the photo (APEX value).
Format: float
exposureModestringOptionalOutput only. The exposure mode used to create the photo.
exposureTimenumberOptionalOutput only. The length of the exposure, in seconds.
Format: float
flashUsedbooleanOptionalOutput only. Whether a flash was used to create the photo.
focalLengthnumberOptionalOutput only. The focal length used to create the photo, in millimeters.
Format: float
heightintegerOptionalOutput only. The height of the image in pixels.
Format: int32
isoSpeedintegerOptionalOutput only. The ISO speed used to create the photo.
Format: int32
lensstringOptionalOutput only. The lens used to create the photo.
locationobjectOptionalOutput only. Geographic location information stored in the image.
location.altitudenumberOptionalOutput only. The altitude stored in the image.
Format: double
location.latitudenumberOptionalOutput only. The latitude stored in the image.
Format: double
location.longitudenumberOptionalOutput only. The longitude stored in the image.
Format: double
maxApertureValuenumberOptionalOutput only. The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Format: float
meteringModestringOptionalOutput only. The metering mode used to create the photo.
rotationintegerOptionalOutput only. The number of clockwise 90 degree rotations applied from the image's original orientation.
Format: int32
sensorstringOptionalOutput only. The type of sensor used to create the photo.
subjectDistanceintegerOptionalOutput only. The distance to the subject of the photo, in meters.
Format: int32
timestringOptionalOutput only. The date and time the photo was taken (EXIF DateTime).
whiteBalancestringOptionalOutput only. The white balance mode used to create the photo.
widthintegerOptionalOutput only. The width of the image in pixels.
Format: int32

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — request body — body video Media Metadata

FieldTypePresenceDescription and constraints
$objectRootOutput only. Additional metadata about video media. This may not be available immediately upon upload.
durationMillisstringOptionalOutput only. The duration of the video in milliseconds.
Format: int64
heightintegerOptionalOutput only. The height of the video in pixels.
Format: int32
widthintegerOptionalOutput only. The width of the video in pixels.
Format: int32

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body

FieldTypePresenceDescription and constraints
$objectRootThe metadata for a file. Some resource methods (such as `files.update`) require a `fileId`. Use the `files.list` method to retrieve the ID for a file.
appPropertiesobjectOptionalA collection of arbitrary key-value pairs which are private to the requesting app.
Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties.
Additional keys: see wildcard field
appProperties.*stringAdditional keys
capabilitiesModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — capabilities
clientEncryptionDetailsModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — client Encryption Details
Client Side Encryption related details. Contains details about the encryption state of the file and details regarding the encryption mechanism that clients need to use when decrypting the contents of this item. This will only be present on files and not on folders or shortcuts.
contentHintsModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Hints
contentRestrictionsarrayOptionalRestrictions for accessing the content of the file. Only populated if such a restriction exists.
contentRestrictions[]ModelEach itemExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Restrictions item
copyRequiresWriterPermissionbooleanOptionalWhether the options to copy, print, or download this file should be disabled for readers and commenters.
createdTimestringOptionalThe time at which the file was created (RFC 3339 date-time).
Format: date-time
descriptionstringOptionalA short description of the file.
downloadRestrictionsModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — download Restrictions
Download restrictions applied on the file.
driveIdstringOptionalOutput only. ID of the shared drive the file resides in. Only populated for items in shared drives.
explicitlyTrashedbooleanOptionalOutput only. Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
exportLinksobjectOptionalOutput only. Links for exporting Docs Editors files to specific formats.
Read only: true
Additional keys: see wildcard field
exportLinks.*stringAdditional keys
fileExtensionstringOptionalOutput only. The final component of `fullFileExtension`. This is only available for files with binary content in Google Drive.
folderColorRgbstringOptionalThe color for a folder or a shortcut to a folder as an RGB hex string. The supported colors are published in the `folderColorPalette` field of the [`about`](/workspace/drive/api/reference/rest/v3/about) resource. If an unsupported color is specified, the closest color in the palette is used instead.
fullFileExtensionstringOptionalOutput only. 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's not cleared if the new name doesn't contain a valid extension.
hasAugmentedPermissionsbooleanOptionalOutput only. Whether there are permissions directly on this file. This field is only populated for items in shared drives.
hasThumbnailbooleanOptionalOutput only. Whether this file has a thumbnail. This doesn't indicate whether the requesting app has access to the thumbnail. To check access, look for the presence of the thumbnailLink field.
headRevisionIdstringOptionalOutput only. The ID of the file's head revision. This is currently only available for files with binary content in Google Drive.
iconLinkstringOptionalOutput only. A static, unauthenticated link to the file's icon.
idstringOptionalThe ID of the file.
imageMediaMetadataobjectOptionalOutput only. Additional metadata about image media, if available.
imageMediaMetadata.apertureJSONOptional
imageMediaMetadata.aperture (anyOf 1)numberAlternativeOutput only. The aperture used to create the photo (f-number).
Format: float
imageMediaMetadata.aperture (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.cameraMakestringOptionalOutput only. The make of the camera used to create the photo.
imageMediaMetadata.cameraModelstringOptionalOutput only. The model of the camera used to create the photo.
imageMediaMetadata.colorSpacestringOptionalOutput only. The color space of the photo.
imageMediaMetadata.exposureBiasJSONOptional
imageMediaMetadata.exposureBias (anyOf 1)numberAlternativeOutput only. The exposure bias of the photo (APEX value).
Format: float
imageMediaMetadata.exposureBias (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.exposureModestringOptionalOutput only. The exposure mode used to create the photo.
imageMediaMetadata.exposureTimeJSONOptional
imageMediaMetadata.exposureTime (anyOf 1)numberAlternativeOutput only. The length of the exposure, in seconds.
Format: float
imageMediaMetadata.exposureTime (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.flashUsedbooleanOptionalOutput only. Whether a flash was used to create the photo.
imageMediaMetadata.focalLengthJSONOptional
imageMediaMetadata.focalLength (anyOf 1)numberAlternativeOutput only. The focal length used to create the photo, in millimeters.
Format: float
imageMediaMetadata.focalLength (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.heightJSONOptional
imageMediaMetadata.height (anyOf 1)integerAlternativeOutput only. The height of the image in pixels.
Format: int32
imageMediaMetadata.height (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.isoSpeedJSONOptional
imageMediaMetadata.isoSpeed (anyOf 1)integerAlternativeOutput only. The ISO speed used to create the photo.
Format: int32
imageMediaMetadata.isoSpeed (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.lensstringOptionalOutput only. The lens used to create the photo.
imageMediaMetadata.locationobjectOptionalOutput only. Geographic location information stored in the image.
imageMediaMetadata.location.altitudeJSONOptional
imageMediaMetadata.location.altitude (anyOf 1)numberAlternativeOutput only. The altitude stored in the image.
Format: double
imageMediaMetadata.location.altitude (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.location.latitudeJSONOptional
imageMediaMetadata.location.latitude (anyOf 1)numberAlternativeOutput only. The latitude stored in the image.
Format: double
imageMediaMetadata.location.latitude (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.location.longitudeJSONOptional
imageMediaMetadata.location.longitude (anyOf 1)numberAlternativeOutput only. The longitude stored in the image.
Format: double
imageMediaMetadata.location.longitude (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.maxApertureValueJSONOptional
imageMediaMetadata.maxApertureValue (anyOf 1)numberAlternativeOutput only. The smallest f-number of the lens at the focal length used to create the photo (APEX value).
Format: float
imageMediaMetadata.maxApertureValue (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.meteringModestringOptionalOutput only. The metering mode used to create the photo.
imageMediaMetadata.rotationJSONOptional
imageMediaMetadata.rotation (anyOf 1)integerAlternativeOutput only. The number of clockwise 90 degree rotations applied from the image's original orientation.
Format: int32
imageMediaMetadata.rotation (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.sensorstringOptionalOutput only. The type of sensor used to create the photo.
imageMediaMetadata.subjectDistanceJSONOptional
imageMediaMetadata.subjectDistance (anyOf 1)integerAlternativeOutput only. The distance to the subject of the photo, in meters.
Format: int32
imageMediaMetadata.subjectDistance (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
imageMediaMetadata.timestringOptionalOutput only. The date and time the photo was taken (EXIF DateTime).
imageMediaMetadata.whiteBalancestringOptionalOutput only. The white balance mode used to create the photo.
imageMediaMetadata.widthJSONOptional
imageMediaMetadata.width (anyOf 1)integerAlternativeOutput only. The width of the image in pixels.
Format: int32
imageMediaMetadata.width (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
inheritedPermissionsDisabledbooleanOptionalWhether this file has inherited permissions disabled. Inherited permissions are enabled by default.
isAppAuthorizedbooleanOptionalOutput only. Whether the file was created or opened by the requesting app.
kindstringOptionalOutput only. Identifies what kind of resource this is. Value: the fixed string `"drive#file"`.
Default: drive#file
labelInfoobjectOptionalLabel information on the file.
labelInfo.labelsarrayOptionalOutput only. The set of labels on the file as requested by the label IDs in the `includeLabels` parameter. By default, no labels are returned.
labelInfo.labels[]ModelEach itemExpand Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item
lastModifyingUserModelOptionalExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
Output only. The last user to modify the file. This field is only populated when the last modification was performed by a signed-in user.
linkShareMetadataobjectOptionalContains details about the link URLs that clients are using to refer to this item.
linkShareMetadata.securityUpdateEligiblebooleanOptionalOutput only. Whether the file is eligible for security update.
linkShareMetadata.securityUpdateEnabledbooleanOptionalOutput only. Whether the security update is enabled for this file.
md5ChecksumstringOptionalOutput only. The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive.
mimeTypestringOptionalThe MIME type of the file. Google Drive attempts 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 is imported, if possible. The supported import formats are published in the [`about`](/workspace/drive/api/reference/rest/v3/about) resource.
modifiedByMebooleanOptionalOutput only. Whether the file has been modified by this user.
modifiedByMeTimestringOptionalThe last time the file was modified by the user (RFC 3339 date-time).
Format: date-time
modifiedTimestringOptionalhe last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user.
Format: date-time
namestringOptionalThe name of the file. This isn't necessarily unique within a folder. Note that for immutable items such as the top-level folders of shared drives, the My Drive root folder, and the Application Data folder, the name is constant.
originalFilenamestringOptionalThe 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.
ownedByMebooleanOptionalOutput only. Whether the user owns the file. Not populated for items in shared drives.
ownersarrayOptionalOutput only. The owner of this file. Only certain legacy files may have more than one owner. This field isn't populated for items in shared drives.
owners[]ModelEach itemExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
parentsarrayOptionalThe ID of the parent folder containing the file. A file can only have one parent folder; specifying multiple parents isn't supported. If not specified as part of a create request, the file is placed directly in the user's My Drive folder. If not specified as part of a copy request, the file inherits any discoverable parent of the source file. Update requests must use the `addParents` and `removeParents` parameters to modify the parents list.
parents[]stringEach item
permissionIdsarrayOptionalOutput only. List of permission IDs for users with access to this file.
permissionIds[]stringEach item
permissionsarrayOptionalOutput only. The full list of permissions for the file. This is only available if the requesting user can share the file. Not populated for items in shared drives.
permissions[]ModelEach itemExpand Gets a permission by ID For more information, see Share files, folders, and drives (https: developers google com workspace drive api guides manage-sharing) — response body
propertiesobjectOptionalA collection of arbitrary key-value pairs which are visible to all apps.
Entries with null values are cleared in update and copy requests.
Additional keys: see wildcard field
properties.*stringAdditional keys
quotaBytesUsedstringOptionalOutput only. The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with `keepForever` enabled.
Format: int64
resourceKeystringOptionalOutput only. A key needed to access the item via a shared link.
sha1ChecksumstringOptionalOutput only. The SHA1 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or shortcut files.
sha256ChecksumstringOptionalOutput only. The SHA256 checksum associated with this file, if available. This field is only populated for files with content stored in Google Drive; it's not populated for Docs Editors or shortcut files.
sharedbooleanOptionalOutput only. Whether the file has been shared. Not populated for items in shared drives.
sharedWithMeTimestringOptionalThe time at which the file was shared with the user, if applicable (RFC 3339 date-time).
Format: date-time
sharingUserModelOptionalExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
Output only. The user who shared the file with the requesting user, if applicable.
shortcutDetailsModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — shortcut Details
sizestringOptionalOutput only. Size in bytes of blobs and Google Workspace editor files. Won't be populated for files that have no size, like shortcuts and folders.
Format: int64
spacesarrayOptionalOutput only. The list of spaces which contain the file. The currently supported values are `drive`, `appDataFolder`, and `photos`.
spaces[]stringEach item
starredbooleanOptionalWhether the user has starred the file.
teamDriveIdstringOptionalDeprecated: Output only. Use `driveId` instead.
thumbnailLinkstringOptionalOutput only. A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours. Not intended for direct usage on web applications due to [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies. Consider using a proxy server. Only populated when the requesting app can access the file's content. If the file isn't shared publicly, the URL returned in `files.thumbnailLink` must be fetched using a credentialed request.
thumbnailVersionstringOptionalOutput only. The thumbnail version for use in thumbnail cache invalidation.
Format: int64
trashedbooleanOptionalWhether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, but other users can still access the file in the owner's trash until it's permanently deleted.
trashedTimestringOptionalThe time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives.
Format: date-time
trashingUserModelOptionalExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
Output only. If the file has been explicitly trashed, the user who trashed it. Only populated for items in shared drives.
versionstringOptionalOutput only. 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.
Format: int64
videoMediaMetadataobjectOptionalOutput only. Additional metadata about video media. This may not be available immediately upon upload.
videoMediaMetadata.durationMillisstringOptionalOutput only. The duration of the video in milliseconds.
Format: int64
videoMediaMetadata.heightJSONOptional
videoMediaMetadata.height (anyOf 1)integerAlternativeOutput only. The height of the video in pixels.
Format: int32
videoMediaMetadata.height (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
videoMediaMetadata.widthJSONOptional
videoMediaMetadata.width (anyOf 1)integerAlternativeOutput only. The width of the video in pixels.
Format: int32
videoMediaMetadata.width (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
viewedByMebooleanOptionalOutput only. Whether the file has been viewed by this user.
viewedByMeTimestringOptionalThe last time the file was viewed by the user (RFC 3339 date-time).
Format: date-time
viewersCanCopyContentbooleanOptionalDeprecated: Use `copyRequiresWriterPermission` instead.
webContentLinkstringOptionalOutput only. A link for downloading the content of the file in a browser. This is only available for files with binary content in Google Drive.
webViewLinkstringOptionalOutput only. A link for opening the file in a relevant Google editor or viewer in a browser.
writersCanSharebooleanOptionalWhether users with only `writer` permission can modify the file's permissions. Not populated for items in shared drives.

Referenced models: Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — client Encryption Details, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Restrictions item, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — download Restrictions, Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item, Gets a permission by ID For more information, see Share files, folders, and drives (https: developers google com workspace drive api guides manage-sharing) — response body, Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — capabilities, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Hints, Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — shortcut Details

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — capabilities

FieldTypePresenceDescription and constraints
$objectRootOutput only. Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. For more information, see [Understand file capabilities](https://developers.google.com/workspace/drive/api/guides/manage-sharing#capabilities).
canAcceptOwnershipbooleanOptionalOutput only. Whether the current user is the pending owner of the file. Not populated for shared drive files.
canAccessViaGenAibooleanOptionalWhether the current user can access this file via Gen AI features. For more information, see [Drive MCP file eligibility](https://developers.google.com/workspace/drive/api/guides/drive-mcp-server-file-eligibility).
canAddChildrenbooleanOptionalOutput only. Whether the current user can add children to this folder. This is always `false` when the item isn't a folder.
canAddFolderFromAnotherDrivebooleanOptionalOutput only. Whether the current user can add a folder from another drive (different shared drive or My Drive) to this folder. This is `false` when the item isn't a folder. Only populated for items in shared drives.
canAddMyDriveParentbooleanOptionalOutput only. Whether the current user can add a parent for the item without removing an existing parent in the same request. Not populated for shared drive files.
canChangeCopyRequiresWriterPermissionbooleanOptionalOutput only. Whether the current user can change the `copyRequiresWriterPermission` restriction of this file.
canChangeItemDownloadRestrictionbooleanOptionalOutput only. Whether the current user can change the owner or organizer-applied download restrictions of the file.
canChangeSecurityUpdateEnabledbooleanOptionalOutput only. Whether the current user can change the `securityUpdateEnabled` field on link share metadata.
canChangeViewersCanCopyContentbooleanOptionalDeprecated: Output only.
canCommentbooleanOptionalOutput only. Whether the current user can comment on this file.
canCopybooleanOptionalOutput only. 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 if it's not a folder.
canDeletebooleanOptionalOutput only. Whether the current user can delete this file.
canDeleteChildrenbooleanOptionalOutput only. Whether the current user can delete children of this folder. This is `false` when the item isn't a folder. Only populated for items in shared drives.
canDisableInheritedPermissionsbooleanOptionalWhether a user can disable inherited permissions.
canDownloadbooleanOptionalOutput only. Whether the current user can download this file.
canEditbooleanOptionalOutput only. Whether the current user can edit this file. Other factors may limit the type of changes a user can make to a file. For example, see `canChangeCopyRequiresWriterPermission` or `canModifyContent`.
canEnableInheritedPermissionsbooleanOptionalWhether a user can re-enable inherited permissions.
canListChildrenbooleanOptionalOutput only. Whether the current user can list the children of this folder. This is always `false` when the item isn't a folder.
canModifyContentbooleanOptionalOutput only. Whether the current user can modify the content of this file.
canModifyContentRestrictionbooleanOptionalDeprecated: Output only. Use one of `canModifyEditorContentRestriction`, `canModifyOwnerContentRestriction`, or `canRemoveContentRestriction`.
canModifyEditorContentRestrictionbooleanOptionalOutput only. Whether the current user can add or modify content restrictions on the file which are editor restricted.
canModifyLabelsbooleanOptionalOutput only. Whether the current user can modify the labels on the file.
canModifyOwnerContentRestrictionbooleanOptionalOutput only. Whether the current user can add or modify content restrictions which are owner restricted.
canMoveChildrenOutOfDrivebooleanOptionalOutput only. Whether the current user can move children of this folder outside of the shared drive. This is `false` when the item isn't a folder. Only populated for items in shared drives.
canMoveChildrenOutOfTeamDrivebooleanOptionalDeprecated: Output only. Use `canMoveChildrenOutOfDrive` instead.
canMoveChildrenWithinDrivebooleanOptionalOutput only. Whether the current user can move children of this folder within this drive. This is `false` when the item isn't a folder. Note that a request to move the child may still fail depending on the current user's access to the child and to the destination folder.
canMoveChildrenWithinTeamDrivebooleanOptionalDeprecated: Output only. Use `canMoveChildrenWithinDrive` instead.
canMoveItemIntoTeamDrivebooleanOptionalDeprecated: Output only. Use `canMoveItemOutOfDrive` instead.
canMoveItemOutOfDrivebooleanOptionalOutput only. 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's being added.
canMoveItemOutOfTeamDrivebooleanOptionalDeprecated: Output only. Use `canMoveItemOutOfDrive` instead.
canMoveItemWithinDrivebooleanOptionalOutput only. Whether the current user can move this item within this drive. Note that a request to change the parent of the item may still fail depending on the new parent that's being added and the parent that is being removed.
canMoveItemWithinTeamDrivebooleanOptionalDeprecated: Output only. Use `canMoveItemWithinDrive` instead.
canMoveTeamDriveItembooleanOptionalDeprecated: Output only. Use `canMoveItemWithinDrive` or `canMoveItemOutOfDrive` instead.
canReadDrivebooleanOptionalOutput only. Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives.
canReadLabelsbooleanOptionalOutput only. Whether the current user can read the labels on the file.
canReadRevisionsbooleanOptionalOutput only. 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 if it's not a folder, can be read.
canReadTeamDrivebooleanOptionalDeprecated: Output only. Use `canReadDrive` instead.
canRemoveChildrenbooleanOptionalOutput only. Whether the current user can remove children from this folder. This is always `false` when the item isn't a folder. For a folder in a shared drive, use `canDeleteChildren` or `canTrashChildren` instead.
canRemoveContentRestrictionbooleanOptionalOutput only. Whether there's a content restriction on the file that can be removed by the current user.
canRemoveMyDriveParentbooleanOptionalOutput only. Whether the current user can remove a parent from the item without adding another parent in the same request. Not populated for shared drive files.
canRenamebooleanOptionalOutput only. Whether the current user can rename this file.
canSharebooleanOptionalOutput only. Whether the current user can modify the sharing settings for this file.
canStartApprovalbooleanOptionalWhether the current user can start an approval on the file.
canTrashbooleanOptionalOutput only. Whether the current user can move this file to trash.
canTrashChildrenbooleanOptionalOutput only. Whether the current user can trash children of this folder. This is `false` when the item isn't a folder. Only populated for items in shared drives.
canUntrashbooleanOptionalOutput only. Whether the current user can restore this file from trash.

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — client Encryption Details

FieldTypePresenceDescription and constraints
$objectRootDetails about the client-side encryption applied to the file.
decryptionMetadataModelOptionalExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — client Encryption Details decryption Metadata
The metadata used for client-side operations.
encryptionStatestringOptionalThe encryption state of the file. The values expected here are: - encrypted - unencrypted

Referenced models: Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — client Encryption Details decryption Metadata

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — client Encryption Details decryption Metadata

FieldTypePresenceDescription and constraints
$objectRootRepresentation of the CSE DecryptionMetadata.
aes256GcmChunkSizestringOptionalChunk size used if content was encrypted with the AES 256 GCM Cipher. Possible values are: - default - small
encryptionResourceKeyHashstringOptionalThe URL-safe Base64 encoded HMAC-SHA256 digest of the resource metadata with its DEK (Data Encryption Key); see https://developers.google.com/workspace/cse/reference
jwtstringOptionalThe signed JSON Web Token (JWT) which can be used to authorize the requesting user with the Key ACL Service (KACLS). The JWT asserts that the requesting user has at least read permissions on the file.
kaclsIdstringOptionalThe ID of the KACLS (Key ACL Service) used to encrypt the file.
Format: int64
kaclsNamestringOptionalThe name of the KACLS (Key ACL Service) used to encrypt the file.
keyFormatstringOptionalKey format for the unwrapped key. Must be `tinkAesGcmKey`.
wrappedKeystringOptionalThe URL-safe Base64 encoded wrapped key used to encrypt the contents of the file.

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Hints

FieldTypePresenceDescription and constraints
$objectRootAdditional information about the content of the file. These fields are never populated in responses.
indexableTextstringOptionalText to be indexed for the file to improve fullText queries. This is limited to 128 KB in length and may contain HTML elements.
thumbnailobjectOptionalA thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
thumbnail.imagestringOptionalThe thumbnail data encoded with URL-safe Base64 ([RFC 4648 section 5](https://datatracker.ietf.org/doc/html/rfc4648#section-5)).
Format: byte
thumbnail.mimeTypestringOptionalThe MIME type of the thumbnail.

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — content Restrictions item

FieldTypePresenceDescription and constraints
$objectRootA restriction for accessing the content of the file.
ownerRestrictedbooleanOptionalWhether the content restriction can only be modified or removed by a user who owns the file. For files in shared drives, any user with `organizer` capabilities can modify or remove this content restriction.
readOnlybooleanOptionalWhether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified.
reasonstringOptionalReason for why the content of the file is restricted. This is only mutable on requests that also set `readOnly=true`.
restrictingUserModelOptionalExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
Output only. The user who set the content restriction. Only populated if `readOnly=true`.
restrictionTimestringOptionalThe time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true.
Format: date-time
systemRestrictedbooleanOptionalOutput only. Whether the content restriction was applied by the system, for example due to an esignature. Users cannot modify or remove system restricted content restrictions.
typestringOptionalOutput only. The type of the content restriction. Currently the only possible value is `globalContentRestriction`.

Referenced models: Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — download Restrictions

FieldTypePresenceDescription and constraints
$objectRootDownload restrictions applied to the file.
effectiveDownloadRestrictionWithContextModelOptionalExpand Deprecated: Use `drives get` instead — response body — restrictions download Restriction
Output only. The effective download restriction applied to this file. This considers all restriction settings and DLP rules.
itemDownloadRestrictionModelOptionalExpand Deprecated: Use `drives get` instead — response body — restrictions download Restriction
The download restriction of the file applied directly by the owner or organizer. This doesn't take into account shared drive settings or DLP rules.

Referenced models: Deprecated: Use `drives get` instead — response body — restrictions download Restriction

Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body — shortcut Details

FieldTypePresenceDescription and constraints
$objectRootInformation about a shortcut file.
targetIdstringOptionalThe ID of the file that this shortcut points to. Can only be set on `files.create` requests.
targetMimeTypestringOptionalOutput only. The MIME type of the file that this shortcut points to. The value of this field is a snapshot of the target's MIME type, captured when the shortcut is created.
targetResourceKeystringOptionalOutput only. The `resourceKey` for the target file.

Creates a file. For more information, see [Create and manage files](https://developers.google.com/workspace/drive/api/guides/create-file). This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:* `* *` (Specify a valid MIME type, rather than the literal `* *` value The literal `* *` is only used to indicate that any valid MIME type can be uploaded For more information, see Google Workspace and Google Drive supported MIME types (https: developers google com workspace drive api guides mime-types) ) For more information on uploading files, see Upload file data (https: developers google com workspace drive api guides manage-uploads) Apps creating shortcuts with the `create` method must specify the MIME type `application vnd google-apps shortcut` Apps should specify a file extension in the `name` property when inserting files with the API For example, an operation to insert a JPEG file should specify something like `"name": "cat jpg"` in the metadata Subsequent `GET` requests include the read-only `file Extension` property populated with the extension originally specified in the `name` property When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the name In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type — request body — query

FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
fieldsstringOptionalSelector specifying which fields to include in a partial response.
prettyPrintbooleanOptionalReturns response with indentations and line breaks.
Default: true
quotaUserstringOptionalAvailable to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
enforceSingleParentbooleanOptionalDeprecated: Creating files in multiple folders is no longer supported.
Default: false
ignoreDefaultVisibilitybooleanOptionalWhether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.
Default: false
includeLabelsstringOptionalA comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
includePermissionsForViewstringOptionalSpecifies which additional view's permissions to include in the response. Only `published` is supported.
keepRevisionForeverbooleanOptionalWhether to set the `keepForever` field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
Default: false
ocrLanguagestringOptionalA language hint for OCR processing during image import (ISO 639-1 code).
supportsAllDrivesbooleanOptionalWhether the requesting application supports both My Drives and shared drives.
Default: false
supportsTeamDrivesbooleanOptionalDeprecated: Use `supportsAllDrives` instead.
Default: false
useContentAsIndexableTextbooleanOptionalWhether to use the uploaded content as indexable text.
Default: false

Generates a CSE token which can be used to create or update CSE files — response body

FieldTypePresenceDescription and constraints
$objectRootJWT and associated metadata used to generate CSE files.
currentKaclsIdstringOptionalThe current Key ACL Service (KACLS) ID associated with the JWT.
Format: int64
currentKaclsNamestringOptionalName of the KACLs that the returned KACLs ID points to.
fileIdstringOptionalThe fileId for which the JWT was generated.
jwtstringOptionalThe signed JSON Web Token (JWT) for the file.
kindstringOptionalOutput only. Identifies what kind of resource this is. Value: the fixed string `"drive#generateCseTokenResponse"`.

Generates a set of file I Ds which can be provided in create or copy requests For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body

FieldTypePresenceDescription and constraints
$objectRootA list of generated file IDs which can be provided in create requests.
idsarrayOptionalThe IDs generated for the requesting user in the specified space.
ids[]stringEach item
kindstringOptionalIdentifies what kind of resource this is. Value: the fixed string `"drive#generatedIds"`.
Default: drive#generatedIds
spacestringOptionalThe type of file that can be created with these IDs.

Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body

FieldTypePresenceDescription and constraints
$objectRootA list of labels applied to a file.
kindstringOptionalThis is always `"drive#labelList"`.
labelsarrayOptionalThe list of labels.
labels[]ModelEach itemExpand Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item
nextPageTokenstringOptionalThe page token for the next page of labels. This field will be absent if the end of the 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. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ.

Referenced models: Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item

Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item

FieldTypePresenceDescription and constraints
$objectRootRepresentation of label and label fields.
fieldsobjectOptionalA map of the fields on the label, keyed by the field's ID.
Additional keys: see wildcard field
fields.*ModelAdditional keysExpand Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item fields value
idstringOptionalThe ID of the label.
kindstringOptionalThis is always drive#label
revisionIdstringOptionalThe revision ID of the label.

Referenced models: Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item fields value

Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item fields value

FieldTypePresenceDescription and constraints
$objectRootRepresentation of field, which is a typed key-value pair.
dateStringarrayOptionalOnly present if valueType is dateString. RFC 3339 formatted date: YYYY-MM-DD.
dateString[]stringEach itemFormat: date
idstringOptionalThe identifier of this label field.
integerarrayOptionalOnly present if `valueType` is `integer`.
integer[]stringEach itemFormat: int64
kindstringOptionalThis is always drive#labelField.
selectionarrayOptionalOnly present if `valueType` is `selection`
selection[]stringEach item
textarrayOptionalOnly present if `valueType` is `text`.
text[]stringEach item
userarrayOptionalOnly present if `valueType` is `user`.
user[]ModelEach itemExpand Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user
valueTypestringOptionalThe field type. While new values may be supported in the future, the following are currently allowed: * `dateString` * `integer` * `selection` * `text` * `user`

Referenced models: Gets information about the user, the user's Drive, and system capabilities. For more information, see [Return user info](https://developers.google.com/workspace/drive/api/guides/user-info). Required: The `fields` parameter must be set To return the exact fields you need, see Return specific fields (https: developers google com workspace drive api guides fields-parameter) — response body — user

Lists the user's files For more information, see Search for files and folders (https: developers google com workspace drive api guides search-files) This method accepts the `q` parameter, which is a search query combining one or more search terms This method returns *all* files by default, including trashed files If you don't want trashed files to appear in the list, use the `trashed=false` query parameter to remove trashed files from the results — response body

FieldTypePresenceDescription and constraints
$objectRootA list of files.
filesarrayOptionalThe list of files. If `nextPageToken` is populated, then this list may be incomplete and an additional page of results should be fetched.
files[]ModelEach itemExpand Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body
incompleteSearchbooleanOptionalWhether the search process was incomplete. If true, then some search results might be missing, since all documents were not searched. This can occur when searching multiple drives with the `allDrives` corpora, but all corpora couldn't be searched. When this happens, it's suggested that clients narrow their query by choosing a different corpus such as `user` or `drive`.
kindstringOptionalIdentifies what kind of resource this is. Value: the fixed string `"drive#fileList"`.
Default: drive#fileList
nextPageTokenstringOptionalThe page token for the next page of files. This will be absent if the end of the files 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. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ.

Referenced models: Creates a copy of a file and applies any requested updates with patch semantics For more information, see Create and manage files (https: developers google com workspace drive api guides create-file) — response body

Modifies the set of labels applied to a file For more information, see Set a label field on a file (https: developers google com workspace drive api guides set-label) Returns a list of the labels that were added or modified — request body — body

FieldTypePresenceDescription and constraints
$objectRootA request to modify the set of labels on a file. This request may contain many modifications that will either all succeed or all fail atomically.
kindstringOptionalThis is always `"drive#modifyLabelsRequest"`.
labelModificationsarrayOptionalThe list of modifications to apply to the labels on the file.
labelModifications[]ModelEach itemExpand Modifies the set of labels applied to a file For more information, see Set a label field on a file (https: developers google com workspace drive api guides set-label) Returns a list of the labels that were added or modified — request body — body label Modifications item

Referenced models: Modifies the set of labels applied to a file For more information, see Set a label field on a file (https: developers google com workspace drive api guides set-label) Returns a list of the labels that were added or modified — request body — body label Modifications item

Modifies the set of labels applied to a file For more information, see Set a label field on a file (https: developers google com workspace drive api guides set-label) Returns a list of the labels that were added or modified — request body — body label Modifications item

FieldTypePresenceDescription and constraints
$objectRootA modification to a label on a file. A `LabelModification` can be used to apply a label to a file, update an existing label on a file, or remove a label from a file.
fieldModificationsarrayOptionalThe list of modifications to this label's fields.
fieldModifications[]ModelEach itemExpand Modifies the set of labels applied to a file For more information, see Set a label field on a file (https: developers google com workspace drive api guides set-label) Returns a list of the labels that were added or modified — request body — body label Modifications item field Modifications item
kindstringOptionalThis is always `"drive#labelModification"`.
labelIdstringRequired within parentThe ID of the label to modify.
removeLabelbooleanOptionalIf true, the label will be removed from the file.

Referenced models: Modifies the set of labels applied to a file For more information, see Set a label field on a file (https: developers google com workspace drive api guides set-label) Returns a list of the labels that were added or modified — request body — body label Modifications item field Modifications item

Modifies the set of labels applied to a file For more information, see Set a label field on a file (https: developers google com workspace drive api guides set-label) Returns a list of the labels that were added or modified — request body — body label Modifications item field Modifications item

FieldTypePresenceDescription and constraints
$objectRootA modification to a label's field.
fieldIdstringOptionalThe ID of the field to be modified.
kindstringOptionalThis is always `"drive#labelFieldModification"`.
setDateValuesarrayOptionalReplaces the value of a dateString Field with these new values. The string must be in the RFC 3339 full-date format: YYYY-MM-DD.
setDateValues[]stringEach itemFormat: date
setIntegerValuesarrayOptionalReplaces the value of an `integer` field with these new values.
setIntegerValues[]stringEach itemFormat: int64
setSelectionValuesarrayOptionalReplaces a `selection` field with these new values.
setSelectionValues[]stringEach item
setTextValuesarrayOptionalSets the value of a `text` field.
setTextValues[]stringEach item
setUserValuesarrayOptionalReplaces a `user` field with these new values. The values must be a valid email addresses.
setUserValues[]stringEach item
unsetValuesbooleanOptionalUnsets the values for this field.

Modifies the set of labels applied to a file For more information, see Set a label field on a file (https: developers google com workspace drive api guides set-label) Returns a list of the labels that were added or modified — response body

FieldTypePresenceDescription and constraints
$objectRootResponse to a `ModifyLabels` request. This contains only those labels which were added or updated by the request.
kindstringOptionalThis is always `"drive#modifyLabelsResponse"`.
modifiedLabelsarrayOptionalThe list of labels which were added or updated by the request.
modifiedLabels[]ModelEach itemExpand Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item

Referenced models: Lists the labels on a file For more information, see List labels on a file (https: developers google com workspace drive api guides list-labels) — response body — labels item

Subscribes to changes to a file For more information, see Notifications for resource changes (https: developers google com workspace drive api guides push) — request body — query

FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
fieldsstringOptionalSelector specifying which fields to include in a partial response.
prettyPrintbooleanOptionalReturns response with indentations and line breaks.
Default: true
quotaUserstringOptionalAvailable to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
acknowledgeAbusebooleanOptionalWhether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `media` and the user is the owner of the file or an organizer of the shared drive in which the file resides.
Default: false
includeLabelsstringOptionalA comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
includePermissionsForViewstringOptionalSpecifies which additional view's permissions to include in the response. Only `published` is supported.
supportsAllDrivesbooleanOptionalWhether the requesting application supports both My Drives and shared drives.
Default: false
supportsTeamDrivesbooleanOptionalDeprecated: Use `supportsAllDrives` instead.
Default: false

Subscribes to changes to a file For more information, see Notifications for resource changes (https: developers google com workspace drive api guides push) — response body

FieldTypePresenceDescription and constraints
$objectRootA notification channel used to watch for resource changes.
addressstringOptionalThe address where notifications are delivered for this channel.
expirationstringOptionalDate and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
Format: int64
idstringOptionalA UUID or similar unique string that identifies this channel.
kindstringOptionalIdentifies this as a notification channel used to watch for changes to a resource, which is `api#channel`.
Default: api#channel
paramsobjectOptionalAdditional parameters controlling delivery channel behavior. Optional.
Additional keys: see wildcard field
params.*stringAdditional keys
payloadbooleanOptionalA Boolean value to indicate whether payload is wanted. Optional.
resourceIdstringOptionalAn opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
resourceUristringOptionalA version-specific identifier for the watched resource.
tokenstringOptionalAn arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
typestringOptionalThe type of delivery mechanism used for this channel. Valid values are "web_hook" or "webhook".

Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:* `* *` (Specify a valid MIME type, rather than the literal `* *` value The literal `* *` is only used to indicate that any valid MIME type can be uploaded For more information, see Google Workspace and Google Drive supported MIME types (https: developers google com workspace drive api guides mime-types) ) For more information on uploading files, see Upload file data (https: developers google com workspace drive api guides manage-uploads) — request body — query

FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
fieldsstringOptionalSelector specifying which fields to include in a partial response.
prettyPrintbooleanOptionalReturns response with indentations and line breaks.
Default: true
quotaUserstringOptionalAvailable to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
addParentsstringOptionalA comma-separated list of parent IDs to add.
enforceSingleParentbooleanOptionalDeprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead.
Default: false
includeLabelsstringOptionalA comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
includePermissionsForViewstringOptionalSpecifies which additional view's permissions to include in the response. Only `published` is supported.
keepRevisionForeverbooleanOptionalWhether to set the `keepForever` field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
Default: false
ocrLanguagestringOptionalA language hint for OCR processing during image import (ISO 639-1 code).
removeParentsstringOptionalA comma-separated list of parent IDs to remove.
supportsAllDrivesbooleanOptionalWhether the requesting application supports both My Drives and shared drives.
Default: false
supportsTeamDrivesbooleanOptionalDeprecated: Use `supportsAllDrives` instead.
Default: false
useContentAsIndexableTextbooleanOptionalWhether to use the uploaded content as indexable text.
Default: false

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.