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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The 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. |
appProperties | object | Optional | 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. 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.* | string | Additional keys | |
capabilities | Model | Optional | Expand 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 |
clientEncryptionDetails | Model | Optional | Expand 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. |
contentHints | Model | Optional | Expand 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 |
contentRestrictions | array | Optional | Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
contentRestrictions[] | Model | Each item | Expand 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 |
copyRequiresWriterPermission | boolean | Optional | Whether the options to copy, print, or download this file should be disabled for readers and commenters. |
createdTime | string | Optional | The time at which the file was created (RFC 3339 date-time). Format: date-time |
description | string | Optional | A short description of the file. |
downloadRestrictions | Model | Optional | Expand 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. |
driveId | string | Optional | Output only. ID of the shared drive the file resides in. Only populated for items in shared drives. |
explicitlyTrashed | boolean | Optional | Output only. Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
exportLinks | object | Optional | Output only. Links for exporting Docs Editors files to specific formats. Read only: true Additional keys: see wildcard field |
exportLinks.* | string | Additional keys | |
fileExtension | string | Optional | Output only. The final component of `fullFileExtension`. This is only available for files with binary content in Google Drive. |
folderColorRgb | string | Optional | The 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. |
fullFileExtension | string | Optional | Output 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. |
hasAugmentedPermissions | boolean | Optional | Output only. Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
hasThumbnail | boolean | Optional | Output 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. |
headRevisionId | string | Optional | Output only. The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
iconLink | string | Optional | Output only. A static, unauthenticated link to the file's icon. |
id | string | Optional | The ID of the file. |
imageMediaMetadata | Model | Optional | Expand 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 |
inheritedPermissionsDisabled | boolean | Optional | Whether this file has inherited permissions disabled. Inherited permissions are enabled by default. |
isAppAuthorized | boolean | Optional | Output only. Whether the file was created or opened by the requesting app. |
kind | string | Optional | Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#file"`. Default: drive#file |
labelInfo | object | Optional | Label information on the file. |
labelInfo.labels | array | Optional | Output 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[] | Model | Each item | Expand 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 |
lastModifyingUser | Model | Optional | Expand 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. |
linkShareMetadata | object | Optional | Contains details about the link URLs that clients are using to refer to this item. |
linkShareMetadata.securityUpdateEligible | boolean | Optional | Output only. Whether the file is eligible for security update. |
linkShareMetadata.securityUpdateEnabled | boolean | Optional | Output only. Whether the security update is enabled for this file. |
md5Checksum | string | Optional | Output only. The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
mimeType | string | Optional | The 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. |
modifiedByMe | boolean | Optional | Output only. Whether the file has been modified by this user. |
modifiedByMeTime | string | Optional | The last time the file was modified by the user (RFC 3339 date-time). Format: date-time |
modifiedTime | string | Optional | he 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 |
name | string | Optional | The 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. |
originalFilename | string | Optional | 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 | Optional | Output only. Whether the user owns the file. Not populated for items in shared drives. |
owners | array | Optional | Output 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[] | Model | Each item | Expand 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 |
parents | array | Optional | The 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[] | string | Each item | |
permissionIds | array | Optional | Output only. List of permission IDs for users with access to this file. |
permissionIds[] | string | Each item | |
permissions | array | Optional | Output 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[] | Model | Each item | Expand 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 |
properties | object | Optional | A 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.* | string | Additional keys | |
quotaBytesUsed | string | Optional | Output 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 |
resourceKey | string | Optional | Output only. A key needed to access the item via a shared link. |
sha1Checksum | string | Optional | Output 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. |
sha256Checksum | string | Optional | Output 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. |
shared | boolean | Optional | Output only. Whether the file has been shared. Not populated for items in shared drives. |
sharedWithMeTime | string | Optional | The time at which the file was shared with the user, if applicable (RFC 3339 date-time). Format: date-time |
sharingUser | Model | Optional | Expand 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. |
shortcutDetails | Model | Optional | Expand 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 |
size | string | Optional | Output 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 |
spaces | array | Optional | Output only. The list of spaces which contain the file. The currently supported values are `drive`, `appDataFolder`, and `photos`. |
spaces[] | string | Each item | |
starred | boolean | Optional | Whether the user has starred the file. |
teamDriveId | string | Optional | Deprecated: Output only. Use `driveId` instead. |
thumbnailLink | string | Optional | Output 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. |
thumbnailVersion | string | Optional | Output only. The thumbnail version for use in thumbnail cache invalidation. Format: int64 |
trashed | boolean | Optional | Whether 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. |
trashedTime | string | Optional | The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. Format: date-time |
trashingUser | Model | Optional | Expand 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. |
version | string | Optional | Output 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 |
videoMediaMetadata | Model | Optional | Expand 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 |
viewedByMe | boolean | Optional | Output only. Whether the file has been viewed by this user. |
viewedByMeTime | string | Optional | The last time the file was viewed by the user (RFC 3339 date-time). Format: date-time |
viewersCanCopyContent | boolean | Optional | Deprecated: Use `copyRequiresWriterPermission` instead. |
webContentLink | string | Optional | Output 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. |
webViewLink | string | Optional | Output only. A link for opening the file in a relevant Google editor or viewer in a browser. |
writersCanShare | boolean | Optional | Whether 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Output only. Additional metadata about image media, if available. |
aperture | number | Optional | Output only. The aperture used to create the photo (f-number). Format: float |
cameraMake | string | Optional | Output only. The make of the camera used to create the photo. |
cameraModel | string | Optional | Output only. The model of the camera used to create the photo. |
colorSpace | string | Optional | Output only. The color space of the photo. |
exposureBias | number | Optional | Output only. The exposure bias of the photo (APEX value). Format: float |
exposureMode | string | Optional | Output only. The exposure mode used to create the photo. |
exposureTime | number | Optional | Output only. The length of the exposure, in seconds. Format: float |
flashUsed | boolean | Optional | Output only. Whether a flash was used to create the photo. |
focalLength | number | Optional | Output only. The focal length used to create the photo, in millimeters. Format: float |
height | integer | Optional | Output only. The height of the image in pixels. Format: int32 |
isoSpeed | integer | Optional | Output only. The ISO speed used to create the photo. Format: int32 |
lens | string | Optional | Output only. The lens used to create the photo. |
location | object | Optional | Output only. Geographic location information stored in the image. |
location.altitude | number | Optional | Output only. The altitude stored in the image. Format: double |
location.latitude | number | Optional | Output only. The latitude stored in the image. Format: double |
location.longitude | number | Optional | Output only. The longitude stored in the image. Format: double |
maxApertureValue | number | Optional | Output only. The smallest f-number of the lens at the focal length used to create the photo (APEX value). Format: float |
meteringMode | string | Optional | Output only. The metering mode used to create the photo. |
rotation | integer | Optional | Output only. The number of clockwise 90 degree rotations applied from the image's original orientation. Format: int32 |
sensor | string | Optional | Output only. The type of sensor used to create the photo. |
subjectDistance | integer | Optional | Output only. The distance to the subject of the photo, in meters. Format: int32 |
time | string | Optional | Output only. The date and time the photo was taken (EXIF DateTime). |
whiteBalance | string | Optional | Output only. The white balance mode used to create the photo. |
width | integer | Optional | Output 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Output only. Additional metadata about video media. This may not be available immediately upon upload. |
durationMillis | string | Optional | Output only. The duration of the video in milliseconds. Format: int64 |
height | integer | Optional | Output only. The height of the video in pixels. Format: int32 |
width | integer | Optional | Output 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The 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. |
appProperties | object | Optional | 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. 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.* | string | Additional keys | |
capabilities | Model | Optional | Expand 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 |
clientEncryptionDetails | Model | Optional | Expand 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. |
contentHints | Model | Optional | Expand 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 |
contentRestrictions | array | Optional | Restrictions for accessing the content of the file. Only populated if such a restriction exists. |
contentRestrictions[] | Model | Each item | Expand 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 |
copyRequiresWriterPermission | boolean | Optional | Whether the options to copy, print, or download this file should be disabled for readers and commenters. |
createdTime | string | Optional | The time at which the file was created (RFC 3339 date-time). Format: date-time |
description | string | Optional | A short description of the file. |
downloadRestrictions | Model | Optional | Expand 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. |
driveId | string | Optional | Output only. ID of the shared drive the file resides in. Only populated for items in shared drives. |
explicitlyTrashed | boolean | Optional | Output only. Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder. |
exportLinks | object | Optional | Output only. Links for exporting Docs Editors files to specific formats. Read only: true Additional keys: see wildcard field |
exportLinks.* | string | Additional keys | |
fileExtension | string | Optional | Output only. The final component of `fullFileExtension`. This is only available for files with binary content in Google Drive. |
folderColorRgb | string | Optional | The 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. |
fullFileExtension | string | Optional | Output 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. |
hasAugmentedPermissions | boolean | Optional | Output only. Whether there are permissions directly on this file. This field is only populated for items in shared drives. |
hasThumbnail | boolean | Optional | Output 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. |
headRevisionId | string | Optional | Output only. The ID of the file's head revision. This is currently only available for files with binary content in Google Drive. |
iconLink | string | Optional | Output only. A static, unauthenticated link to the file's icon. |
id | string | Optional | The ID of the file. |
imageMediaMetadata | object | Optional | Output only. Additional metadata about image media, if available. |
imageMediaMetadata.aperture | JSON | Optional | |
imageMediaMetadata.aperture (anyOf 1) | number | Alternative | Output only. The aperture used to create the photo (f-number). Format: float |
imageMediaMetadata.aperture (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.cameraMake | string | Optional | Output only. The make of the camera used to create the photo. |
imageMediaMetadata.cameraModel | string | Optional | Output only. The model of the camera used to create the photo. |
imageMediaMetadata.colorSpace | string | Optional | Output only. The color space of the photo. |
imageMediaMetadata.exposureBias | JSON | Optional | |
imageMediaMetadata.exposureBias (anyOf 1) | number | Alternative | Output only. The exposure bias of the photo (APEX value). Format: float |
imageMediaMetadata.exposureBias (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.exposureMode | string | Optional | Output only. The exposure mode used to create the photo. |
imageMediaMetadata.exposureTime | JSON | Optional | |
imageMediaMetadata.exposureTime (anyOf 1) | number | Alternative | Output only. The length of the exposure, in seconds. Format: float |
imageMediaMetadata.exposureTime (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.flashUsed | boolean | Optional | Output only. Whether a flash was used to create the photo. |
imageMediaMetadata.focalLength | JSON | Optional | |
imageMediaMetadata.focalLength (anyOf 1) | number | Alternative | Output only. The focal length used to create the photo, in millimeters. Format: float |
imageMediaMetadata.focalLength (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.height | JSON | Optional | |
imageMediaMetadata.height (anyOf 1) | integer | Alternative | Output only. The height of the image in pixels. Format: int32 |
imageMediaMetadata.height (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.isoSpeed | JSON | Optional | |
imageMediaMetadata.isoSpeed (anyOf 1) | integer | Alternative | Output only. The ISO speed used to create the photo. Format: int32 |
imageMediaMetadata.isoSpeed (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.lens | string | Optional | Output only. The lens used to create the photo. |
imageMediaMetadata.location | object | Optional | Output only. Geographic location information stored in the image. |
imageMediaMetadata.location.altitude | JSON | Optional | |
imageMediaMetadata.location.altitude (anyOf 1) | number | Alternative | Output only. The altitude stored in the image. Format: double |
imageMediaMetadata.location.altitude (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.location.latitude | JSON | Optional | |
imageMediaMetadata.location.latitude (anyOf 1) | number | Alternative | Output only. The latitude stored in the image. Format: double |
imageMediaMetadata.location.latitude (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.location.longitude | JSON | Optional | |
imageMediaMetadata.location.longitude (anyOf 1) | number | Alternative | Output only. The longitude stored in the image. Format: double |
imageMediaMetadata.location.longitude (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.maxApertureValue | JSON | Optional | |
imageMediaMetadata.maxApertureValue (anyOf 1) | number | Alternative | Output 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) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.meteringMode | string | Optional | Output only. The metering mode used to create the photo. |
imageMediaMetadata.rotation | JSON | Optional | |
imageMediaMetadata.rotation (anyOf 1) | integer | Alternative | Output only. The number of clockwise 90 degree rotations applied from the image's original orientation. Format: int32 |
imageMediaMetadata.rotation (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.sensor | string | Optional | Output only. The type of sensor used to create the photo. |
imageMediaMetadata.subjectDistance | JSON | Optional | |
imageMediaMetadata.subjectDistance (anyOf 1) | integer | Alternative | Output only. The distance to the subject of the photo, in meters. Format: int32 |
imageMediaMetadata.subjectDistance (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
imageMediaMetadata.time | string | Optional | Output only. The date and time the photo was taken (EXIF DateTime). |
imageMediaMetadata.whiteBalance | string | Optional | Output only. The white balance mode used to create the photo. |
imageMediaMetadata.width | JSON | Optional | |
imageMediaMetadata.width (anyOf 1) | integer | Alternative | Output only. The width of the image in pixels. Format: int32 |
imageMediaMetadata.width (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
inheritedPermissionsDisabled | boolean | Optional | Whether this file has inherited permissions disabled. Inherited permissions are enabled by default. |
isAppAuthorized | boolean | Optional | Output only. Whether the file was created or opened by the requesting app. |
kind | string | Optional | Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#file"`. Default: drive#file |
labelInfo | object | Optional | Label information on the file. |
labelInfo.labels | array | Optional | Output 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[] | Model | Each item | Expand 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 |
lastModifyingUser | Model | Optional | Expand 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. |
linkShareMetadata | object | Optional | Contains details about the link URLs that clients are using to refer to this item. |
linkShareMetadata.securityUpdateEligible | boolean | Optional | Output only. Whether the file is eligible for security update. |
linkShareMetadata.securityUpdateEnabled | boolean | Optional | Output only. Whether the security update is enabled for this file. |
md5Checksum | string | Optional | Output only. The MD5 checksum for the content of the file. This is only applicable to files with binary content in Google Drive. |
mimeType | string | Optional | The 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. |
modifiedByMe | boolean | Optional | Output only. Whether the file has been modified by this user. |
modifiedByMeTime | string | Optional | The last time the file was modified by the user (RFC 3339 date-time). Format: date-time |
modifiedTime | string | Optional | he 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 |
name | string | Optional | The 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. |
originalFilename | string | Optional | 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 | Optional | Output only. Whether the user owns the file. Not populated for items in shared drives. |
owners | array | Optional | Output 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[] | Model | Each item | Expand 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 |
parents | array | Optional | The 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[] | string | Each item | |
permissionIds | array | Optional | Output only. List of permission IDs for users with access to this file. |
permissionIds[] | string | Each item | |
permissions | array | Optional | Output 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[] | Model | Each item | Expand 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 |
properties | object | Optional | A 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.* | string | Additional keys | |
quotaBytesUsed | string | Optional | Output 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 |
resourceKey | string | Optional | Output only. A key needed to access the item via a shared link. |
sha1Checksum | string | Optional | Output 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. |
sha256Checksum | string | Optional | Output 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. |
shared | boolean | Optional | Output only. Whether the file has been shared. Not populated for items in shared drives. |
sharedWithMeTime | string | Optional | The time at which the file was shared with the user, if applicable (RFC 3339 date-time). Format: date-time |
sharingUser | Model | Optional | Expand 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. |
shortcutDetails | Model | Optional | Expand 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 |
size | string | Optional | Output 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 |
spaces | array | Optional | Output only. The list of spaces which contain the file. The currently supported values are `drive`, `appDataFolder`, and `photos`. |
spaces[] | string | Each item | |
starred | boolean | Optional | Whether the user has starred the file. |
teamDriveId | string | Optional | Deprecated: Output only. Use `driveId` instead. |
thumbnailLink | string | Optional | Output 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. |
thumbnailVersion | string | Optional | Output only. The thumbnail version for use in thumbnail cache invalidation. Format: int64 |
trashed | boolean | Optional | Whether 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. |
trashedTime | string | Optional | The time that the item was trashed (RFC 3339 date-time). Only populated for items in shared drives. Format: date-time |
trashingUser | Model | Optional | Expand 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. |
version | string | Optional | Output 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 |
videoMediaMetadata | object | Optional | Output only. Additional metadata about video media. This may not be available immediately upon upload. |
videoMediaMetadata.durationMillis | string | Optional | Output only. The duration of the video in milliseconds. Format: int64 |
videoMediaMetadata.height | JSON | Optional | |
videoMediaMetadata.height (anyOf 1) | integer | Alternative | Output only. The height of the video in pixels. Format: int32 |
videoMediaMetadata.height (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
videoMediaMetadata.width | JSON | Optional | |
videoMediaMetadata.width (anyOf 1) | integer | Alternative | Output only. The width of the video in pixels. Format: int32 |
videoMediaMetadata.width (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
viewedByMe | boolean | Optional | Output only. Whether the file has been viewed by this user. |
viewedByMeTime | string | Optional | The last time the file was viewed by the user (RFC 3339 date-time). Format: date-time |
viewersCanCopyContent | boolean | Optional | Deprecated: Use `copyRequiresWriterPermission` instead. |
webContentLink | string | Optional | Output 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. |
webViewLink | string | Optional | Output only. A link for opening the file in a relevant Google editor or viewer in a browser. |
writersCanShare | boolean | Optional | Whether 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Output 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). |
canAcceptOwnership | boolean | Optional | Output only. Whether the current user is the pending owner of the file. Not populated for shared drive files. |
canAccessViaGenAi | boolean | Optional | Whether 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). |
canAddChildren | boolean | Optional | Output only. Whether the current user can add children to this folder. This is always `false` when the item isn't a folder. |
canAddFolderFromAnotherDrive | boolean | Optional | Output 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. |
canAddMyDriveParent | boolean | Optional | Output 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. |
canChangeCopyRequiresWriterPermission | boolean | Optional | Output only. Whether the current user can change the `copyRequiresWriterPermission` restriction of this file. |
canChangeItemDownloadRestriction | boolean | Optional | Output only. Whether the current user can change the owner or organizer-applied download restrictions of the file. |
canChangeSecurityUpdateEnabled | boolean | Optional | Output only. Whether the current user can change the `securityUpdateEnabled` field on link share metadata. |
canChangeViewersCanCopyContent | boolean | Optional | Deprecated: Output only. |
canComment | boolean | Optional | Output only. Whether the current user can comment on this file. |
canCopy | boolean | Optional | Output 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. |
canDelete | boolean | Optional | Output only. Whether the current user can delete this file. |
canDeleteChildren | boolean | Optional | Output 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. |
canDisableInheritedPermissions | boolean | Optional | Whether a user can disable inherited permissions. |
canDownload | boolean | Optional | Output only. Whether the current user can download this file. |
canEdit | boolean | Optional | Output 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`. |
canEnableInheritedPermissions | boolean | Optional | Whether a user can re-enable inherited permissions. |
canListChildren | boolean | Optional | Output only. Whether the current user can list the children of this folder. This is always `false` when the item isn't a folder. |
canModifyContent | boolean | Optional | Output only. Whether the current user can modify the content of this file. |
canModifyContentRestriction | boolean | Optional | Deprecated: Output only. Use one of `canModifyEditorContentRestriction`, `canModifyOwnerContentRestriction`, or `canRemoveContentRestriction`. |
canModifyEditorContentRestriction | boolean | Optional | Output only. Whether the current user can add or modify content restrictions on the file which are editor restricted. |
canModifyLabels | boolean | Optional | Output only. Whether the current user can modify the labels on the file. |
canModifyOwnerContentRestriction | boolean | Optional | Output only. Whether the current user can add or modify content restrictions which are owner restricted. |
canMoveChildrenOutOfDrive | boolean | Optional | Output 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. |
canMoveChildrenOutOfTeamDrive | boolean | Optional | Deprecated: Output only. Use `canMoveChildrenOutOfDrive` instead. |
canMoveChildrenWithinDrive | boolean | Optional | Output 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. |
canMoveChildrenWithinTeamDrive | boolean | Optional | Deprecated: Output only. Use `canMoveChildrenWithinDrive` instead. |
canMoveItemIntoTeamDrive | boolean | Optional | Deprecated: Output only. Use `canMoveItemOutOfDrive` instead. |
canMoveItemOutOfDrive | boolean | Optional | Output 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. |
canMoveItemOutOfTeamDrive | boolean | Optional | Deprecated: Output only. Use `canMoveItemOutOfDrive` instead. |
canMoveItemWithinDrive | boolean | Optional | Output 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. |
canMoveItemWithinTeamDrive | boolean | Optional | Deprecated: Output only. Use `canMoveItemWithinDrive` instead. |
canMoveTeamDriveItem | boolean | Optional | Deprecated: Output only. Use `canMoveItemWithinDrive` or `canMoveItemOutOfDrive` instead. |
canReadDrive | boolean | Optional | Output only. Whether the current user can read the shared drive to which this file belongs. Only populated for items in shared drives. |
canReadLabels | boolean | Optional | Output only. Whether the current user can read the labels on the file. |
canReadRevisions | boolean | Optional | Output 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. |
canReadTeamDrive | boolean | Optional | Deprecated: Output only. Use `canReadDrive` instead. |
canRemoveChildren | boolean | Optional | Output 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. |
canRemoveContentRestriction | boolean | Optional | Output only. Whether there's a content restriction on the file that can be removed by the current user. |
canRemoveMyDriveParent | boolean | Optional | Output 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. |
canRename | boolean | Optional | Output only. Whether the current user can rename this file. |
canShare | boolean | Optional | Output only. Whether the current user can modify the sharing settings for this file. |
canStartApproval | boolean | Optional | Whether the current user can start an approval on the file. |
canTrash | boolean | Optional | Output only. Whether the current user can move this file to trash. |
canTrashChildren | boolean | Optional | Output 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. |
canUntrash | boolean | Optional | Output 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details about the client-side encryption applied to the file. |
decryptionMetadata | Model | Optional | Expand 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. |
encryptionState | string | Optional | The encryption state of the file. The values expected here are: - encrypted - unencrypted |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Representation of the CSE DecryptionMetadata. |
aes256GcmChunkSize | string | Optional | Chunk size used if content was encrypted with the AES 256 GCM Cipher. Possible values are: - default - small |
encryptionResourceKeyHash | string | Optional | The 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 |
jwt | string | Optional | The 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. |
kaclsId | string | Optional | The ID of the KACLS (Key ACL Service) used to encrypt the file. Format: int64 |
kaclsName | string | Optional | The name of the KACLS (Key ACL Service) used to encrypt the file. |
keyFormat | string | Optional | Key format for the unwrapped key. Must be `tinkAesGcmKey`. |
wrappedKey | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional information about the content of the file. These fields are never populated in responses. |
indexableText | string | Optional | Text to be indexed for the file to improve fullText queries. This is limited to 128 KB in length and may contain HTML elements. |
thumbnail | object | Optional | A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail. |
thumbnail.image | string | Optional | The thumbnail data encoded with URL-safe Base64 ([RFC 4648 section 5](https://datatracker.ietf.org/doc/html/rfc4648#section-5)). Format: byte |
thumbnail.mimeType | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A restriction for accessing the content of the file. |
ownerRestricted | boolean | Optional | Whether 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. |
readOnly | boolean | Optional | Whether 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. |
reason | string | Optional | Reason for why the content of the file is restricted. This is only mutable on requests that also set `readOnly=true`. |
restrictingUser | Model | Optional | Expand 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`. |
restrictionTime | string | Optional | The time at which the content restriction was set (formatted RFC 3339 timestamp). Only populated if readOnly is true. Format: date-time |
systemRestricted | boolean | Optional | Output 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. |
type | string | Optional | Output only. The type of the content restriction. Currently the only possible value is `globalContentRestriction`. |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Download restrictions applied to the file. |
effectiveDownloadRestrictionWithContext | Model | Optional | Expand 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. |
itemDownloadRestriction | Model | Optional | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Information about a shortcut file. |
targetId | string | Optional | The ID of the file that this shortcut points to. Can only be set on `files.create` requests. |
targetMimeType | string | Optional | Output 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. |
targetResourceKey | string | Optional | Output 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
fields | string | Optional | Selector specifying which fields to include in a partial response. |
prettyPrint | boolean | Optional | Returns response with indentations and line breaks. Default: true |
quotaUser | string | Optional | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. |
enforceSingleParent | boolean | Optional | Deprecated: Creating files in multiple folders is no longer supported. Default: false |
ignoreDefaultVisibility | boolean | Optional | Whether 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 |
includeLabels | string | Optional | A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. |
includePermissionsForView | string | Optional | Specifies which additional view's permissions to include in the response. Only `published` is supported. |
keepRevisionForever | boolean | Optional | Whether 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 |
ocrLanguage | string | Optional | A language hint for OCR processing during image import (ISO 639-1 code). |
supportsAllDrives | boolean | Optional | Whether the requesting application supports both My Drives and shared drives. Default: false |
supportsTeamDrives | boolean | Optional | Deprecated: Use `supportsAllDrives` instead. Default: false |
useContentAsIndexableText | boolean | Optional | Whether 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | JWT and associated metadata used to generate CSE files. |
currentKaclsId | string | Optional | The current Key ACL Service (KACLS) ID associated with the JWT. Format: int64 |
currentKaclsName | string | Optional | Name of the KACLs that the returned KACLs ID points to. |
fileId | string | Optional | The fileId for which the JWT was generated. |
jwt | string | Optional | The signed JSON Web Token (JWT) for the file. |
kind | string | Optional | Output 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A list of generated file IDs which can be provided in create requests. |
ids | array | Optional | The IDs generated for the requesting user in the specified space. |
ids[] | string | Each item | |
kind | string | Optional | Identifies what kind of resource this is. Value: the fixed string `"drive#generatedIds"`. Default: drive#generatedIds |
space | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A list of labels applied to a file. |
kind | string | Optional | This is always `"drive#labelList"`. |
labels | array | Optional | The list of labels. |
labels[] | Model | Each item | Expand 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 |
nextPageToken | string | Optional | The 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. |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Representation of label and label fields. |
fields | object | Optional | A map of the fields on the label, keyed by the field's ID. Additional keys: see wildcard field |
fields.* | Model | Additional keys | Expand 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 |
id | string | Optional | The ID of the label. |
kind | string | Optional | This is always drive#label |
revisionId | string | Optional | The revision ID of the label. |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Representation of field, which is a typed key-value pair. |
dateString | array | Optional | Only present if valueType is dateString. RFC 3339 formatted date: YYYY-MM-DD. |
dateString[] | string | Each item | Format: date |
id | string | Optional | The identifier of this label field. |
integer | array | Optional | Only present if `valueType` is `integer`. |
integer[] | string | Each item | Format: int64 |
kind | string | Optional | This is always drive#labelField. |
selection | array | Optional | Only present if `valueType` is `selection` |
selection[] | string | Each item | |
text | array | Optional | Only present if `valueType` is `text`. |
text[] | string | Each item | |
user | array | Optional | Only present if `valueType` is `user`. |
user[] | Model | Each item | Expand 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 |
valueType | string | Optional | The field type. While new values may be supported in the future, the following are currently allowed: * `dateString` * `integer` * `selection` * `text` * `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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A list of files. |
files | array | Optional | The list of files. If `nextPageToken` is populated, then this list may be incomplete and an additional page of results should be fetched. |
files[] | Model | Each item | Expand 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 |
incompleteSearch | boolean | Optional | Whether 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`. |
kind | string | Optional | Identifies what kind of resource this is. Value: the fixed string `"drive#fileList"`. Default: drive#fileList |
nextPageToken | string | Optional | The 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. |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A 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. |
kind | string | Optional | This is always `"drive#modifyLabelsRequest"`. |
labelModifications | array | Optional | The list of modifications to apply to the labels on the file. |
labelModifications[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A 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. |
fieldModifications | array | Optional | The list of modifications to this label's fields. |
fieldModifications[] | Model | Each item | Expand 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 |
kind | string | Optional | This is always `"drive#labelModification"`. |
labelId | string | Required within parent | The ID of the label to modify. |
removeLabel | boolean | Optional | If true, the label will be removed from the file. |
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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A modification to a label's field. |
fieldId | string | Optional | The ID of the field to be modified. |
kind | string | Optional | This is always `"drive#labelFieldModification"`. |
setDateValues | array | Optional | Replaces 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[] | string | Each item | Format: date |
setIntegerValues | array | Optional | Replaces the value of an `integer` field with these new values. |
setIntegerValues[] | string | Each item | Format: int64 |
setSelectionValues | array | Optional | Replaces a `selection` field with these new values. |
setSelectionValues[] | string | Each item | |
setTextValues | array | Optional | Sets the value of a `text` field. |
setTextValues[] | string | Each item | |
setUserValues | array | Optional | Replaces a `user` field with these new values. The values must be a valid email addresses. |
setUserValues[] | string | Each item | |
unsetValues | boolean | Optional | Unsets 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response to a `ModifyLabels` request. This contains only those labels which were added or updated by the request. |
kind | string | Optional | This is always `"drive#modifyLabelsResponse"`. |
modifiedLabels | array | Optional | The list of labels which were added or updated by the request. |
modifiedLabels[] | Model | Each item | Expand 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
fields | string | Optional | Selector specifying which fields to include in a partial response. |
prettyPrint | boolean | Optional | Returns response with indentations and line breaks. Default: true |
quotaUser | string | Optional | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. |
acknowledgeAbuse | boolean | Optional | Whether 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 |
includeLabels | string | Optional | A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. |
includePermissionsForView | string | Optional | Specifies which additional view's permissions to include in the response. Only `published` is supported. |
supportsAllDrives | boolean | Optional | Whether the requesting application supports both My Drives and shared drives. Default: false |
supportsTeamDrives | boolean | Optional | Deprecated: 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A notification channel used to watch for resource changes. |
address | string | Optional | The address where notifications are delivered for this channel. |
expiration | string | Optional | Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional. Format: int64 |
id | string | Optional | A UUID or similar unique string that identifies this channel. |
kind | string | Optional | Identifies this as a notification channel used to watch for changes to a resource, which is `api#channel`. Default: api#channel |
params | object | Optional | Additional parameters controlling delivery channel behavior. Optional. Additional keys: see wildcard field |
params.* | string | Additional keys | |
payload | boolean | Optional | A Boolean value to indicate whether payload is wanted. Optional. |
resourceId | string | Optional | An opaque ID that identifies the resource being watched on this channel. Stable across different API versions. |
resourceUri | string | Optional | A version-specific identifier for the watched resource. |
token | string | Optional | An arbitrary string delivered to the target address with each notification delivered over this channel. Optional. |
type | string | Optional | The 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
fields | string | Optional | Selector specifying which fields to include in a partial response. |
prettyPrint | boolean | Optional | Returns response with indentations and line breaks. Default: true |
quotaUser | string | Optional | Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. |
addParents | string | Optional | A comma-separated list of parent IDs to add. |
enforceSingleParent | boolean | Optional | Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead. Default: false |
includeLabels | string | Optional | A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. |
includePermissionsForView | string | Optional | Specifies which additional view's permissions to include in the response. Only `published` is supported. |
keepRevisionForever | boolean | Optional | Whether 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 |
ocrLanguage | string | Optional | A language hint for OCR processing during image import (ISO 639-1 code). |
removeParents | string | Optional | A comma-separated list of parent IDs to remove. |
supportsAllDrives | boolean | Optional | Whether the requesting application supports both My Drives and shared drives. Default: false |
supportsTeamDrives | boolean | Optional | Deprecated: Use `supportsAllDrives` instead. Default: false |
useContentAsIndexableText | boolean | Optional | Whether to use the uploaded content as indexable text. Default: false |