Googledriveconnector v1.0

Version 1.0

Connector Overview: This page documents all 46 actions for the Googledriveconnector v1.0.

Changes (3)

GET drive.changes.get Start Page Token

/changes/startPageToken

Gets the starting pageToken for listing future changes.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Driveid

The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive is returned.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Teamdriveid

Deprecated use driveId instead.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.changes.list

/changes

Lists the changes for a user or shared drive.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Pagetoken

(Required) The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.

Driveid

The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.

Includecorpusremovals

Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.

Includeitemsfromalldrives

Whether both My Drive and shared drive items should be included in results.

Includepermissionsforview

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

Includeremoved

Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.

Includeteamdriveitems

Deprecated use includeItemsFromAllDrives instead.

Pagesize

The maximum number of changes to return per page.

Restricttomydrive

Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.

Spaces

A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Teamdriveid

Deprecated use driveId instead.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

POST drive.changes.watch

/changes/watch

Subscribes to changes for a user.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Pagetoken

(Required) The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method.

Driveid

The shared drive from which changes are returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change ID as an identifier.

Includecorpusremovals

Whether changes should include the file resource if the file is still accessible by the user at the time of the request, even when a file was removed from the list of changes and there will be no further change entries for this file.

Includeitemsfromalldrives

Whether both My Drive and shared drive items should be included in results.

Includepermissionsforview

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

Includeremoved

Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access.

Includeteamdriveitems

Deprecated use includeItemsFromAllDrives instead.

Pagesize

The maximum number of changes to return per page.

Restricttomydrive

Whether to restrict the results to changes inside the My Drive hierarchy. This omits changes to files such as those in the Application Data folder or shared files which have not been added to My Drive.

Spaces

A comma-separated list of spaces to query within the user corpus. Supported values are 'drive', 'appDataFolder' and 'photos'.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Teamdriveid

Deprecated use driveId instead.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (9)

Option Name

Description

Address

The URL where notifications will be delivered.

Expiration

The expiration time for the notification channel, as a Unix timestamp in milliseconds.

Id

A unique identifier for the notification channel.

Kind

The type of resource, set to 'api#channel'.

Payload

Whether the notification includes a payload with the resource state.

Resourceid

The ID of the resource being watched.

Resourceuri

The URI of the resource being watched.

Token

An arbitrary string to identify this channel within your application.

Type

The type of delivery mechanism, such as 'web_hook'.

Comments (2)

POST drive.comments.create

/files/{fileId}/comments

Creates a new comment on a file.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (9)

Option Name

Description

Anchor

A region of the file that the comment is anchored to, such as a range of text.

Content

The plain text content of the comment.

Createdtime

The time at which the comment was created, as an RFC 3339 date-time.

Deleted

Whether the comment has been deleted.

Htmlcontent

The HTML content of the comment.

Id

The ID of the comment.

Kind

The type of resource, set to 'drive#comment'.

Modifiedtime

The time at which the comment was last modified, as an RFC 3339 date-time.

Resolved

Whether the comment has been resolved.

GET drive.comments.list

/files/{fileId}/comments

Lists a file's comments.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Includedeleted

Whether to include deleted comments. Deleted comments will not include their original content.

Pagesize

The maximum number of comments to return per page.

Pagetoken

The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.

Startmodifiedtime

The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time).

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Drives (2)

POST drive.drives.create

/drives

Creates a new shared drive.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Requestid

(Required) An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a shared drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same shared drive. If the shared drive already exists a 409 error will be returned.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (9)

Option Name

Description

Backgroundimagelink

A link to the background image for the shared drive.

Colorrgb

The color of the shared drive as an RGB hex string.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Hidden

Whether the shared drive is hidden from the default view.

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Name

The name of the shared drive.

Orgunitid

The organizational unit ID of the shared drive.

Themeid

The ID of the theme applied to the shared drive.

GET drive.drives.list

/drives

Lists the user's shared drives.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Pagesize

Maximum number of shared drives to return per page.

Pagetoken

Page token for shared drives.

Q

Query string for searching shared drives.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then all shared drives of the domain in which the requester is an administrator are returned.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Files (4)

POST drive.files.create

/files

Creates a new file.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Enforcesingleparent

Deprecated. Creating files in multiple folders is no longer supported.

Ignoredefaultvisibility

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.

Includepermissionsforview

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

Keeprevisionforever

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.

Ocrlanguage

A language hint for OCR processing during image import (ISO 639-1 code).

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Usecontentasindexabletext

Whether to use the uploaded content as indexable text.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (44)

Option Name

Description

Copyrequireswriterpermission

Indicates whether copying the file requires the user to have writer permission.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Description

Provide a short description of the file.

Driveid

Set the ID of the shared drive where the file will be created.

Explicitlytrashed

Specify whether the file has been explicitly trashed.

Fileextension

Define the file extension, such as 'txt' or 'pdf'.

Foldercolorrgb

Set the RGB color for the folder, if creating a folder.

Fullfileextension

Provide the full file extension including the leading dot.

Hasaugmentedpermissions

Indicate whether the file has augmented permissions.

Hasthumbnail

Specify whether the file has a thumbnail.

Headrevisionid

Set the ID of the head revision of the file.

Iconlink

Provide a URL to the icon representing the file type.

Id

The ID of the shared drive.

Isappauthorized

Indicate whether the app is authorized to access the file.

Kind

The type of resource, set to 'drive#drive'.

Md5checksum

Provide the MD5 checksum of the file content.

Mimetype

Define the MIME type of the file, for example 'application/pdf'.

Modifiedbyme

Specify whether the file was last modified by the current user.

Modifiedbymetime

Set the timestamp of when the file was last modified by the user.

Modifiedtime

The time at which the comment was last modified, as an RFC 3339 date-time.

Name

The name of the shared drive.

Originalfilename

Provide the original filename of the uploaded file.

Ownedbyme

Indicate whether the file is owned by the current user.

Parents

List the IDs of parent folders where the file should be placed.

Permissionids

Provide an array of permission IDs for the file.

Quotabytesused

Specify the number of bytes of quota used by the file.

Resourcekey

Set the resource key for accessing the file.

Shared

Indicate whether the file is shared.

Sharedwithmetime

Set the timestamp of when the file was shared with the user.

Size

Define the size of the file in bytes.

Spaces

List the spaces where the file resides, such as 'drive' or 'appDataFolder'.

Starred

Indicate whether the file is starred.

Teamdriveid

Set the ID of the Team Drive (shared drive) if applicable.

Thumbnaillink

Provide a URL to the file's thumbnail image.

Thumbnailversion

Specify the version of the thumbnail.

Trashed

Indicate whether the file is in the trash.

Trashedtime

Set the timestamp of when the file was trashed.

Version

Specify the version number of the file.

Viewedbyme

Indicate whether the file has been viewed by the current user.

Viewedbymetime

Set the timestamp of when the file was last viewed by the user.

Viewerscancopycontent

Indicate whether viewers can copy the file content.

Webcontentlink

Provide a link to download the file content.

Webviewlink

Provide a link to view the file in a browser.

Writerscanshare

Indicate whether writers can share the file.

DELETE drive.files.empty Trash

/files/trash

Permanently deletes all of the user's trashed files.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Enforcesingleparent

Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.files.generate Ids

/files/generateIds

Generates a set of file IDs which can be provided in create or copy requests.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Count

The number of IDs to return.

Space

The space in which the IDs can be used to create new files. Supported values are 'drive' and 'appDataFolder'. (Default: 'drive')

Type

The type of items which the IDs can be used for. Supported values are 'files' and 'shortcuts'. Note that 'shortcuts' are only supported in the drive 'space'. (Default: 'files')

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.files.list

/files

Lists or searches files.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Corpora

Groupings of files to which the query applies. Supported groupings are: 'user' (files created by, opened by, or shared directly with the user), 'drive' (files in the specified shared drive as indicated by the 'driveId'), 'domain' (files shared to the user's domain), and 'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). When able, use 'user' or 'drive', instead of 'allDrives', for efficiency.

Corpus

The source of files to list. Deprecated: use 'corpora' instead.

Driveid

ID of the shared drive to search.

Includeitemsfromalldrives

Whether both My Drive and shared drive items should be included in results.

Includepermissionsforview

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

Includeteamdriveitems

Deprecated use includeItemsFromAllDrives instead.

Orderby

A comma-separated list of sort keys. Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.

Pagesize

The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached.

Pagetoken

The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.

Q

A query for filtering the file results. See the "Search for Files" guide for supported syntax.

Spaces

A comma-separated list of spaces to query within the corpus. Supported values are 'drive' and 'appDataFolder'.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Teamdriveid

Deprecated use driveId instead.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Misc (2)

GET drive.about.get

/about

Gets information about the user, the user's Drive, and system capabilities.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

POST drive.channels.stop

/channels/stop

Stop watching resources through this channel

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Response Type

The response format expected from the API (e.g. application/json).

Options (9)

Option Name

Description

Address

The URL where notifications will be delivered.

Expiration

The expiration time for the notification channel, as a Unix timestamp in milliseconds.

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Payload

Whether the notification includes a payload with the resource state.

Resourceid

The ID of the resource being watched.

Resourceuri

The URI of the resource being watched.

Token

An arbitrary string to identify this channel within your application.

Type

The type of delivery mechanism, such as 'web_hook'.

Permissions (2)

POST drive.permissions.create

/files/{fileId}/permissions

Creates a permission for a file or shared drive.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Emailmessage

A plain text custom message to include in the notification email.

Enforcesingleparent

Deprecated. See moveToNewOwnersRoot for details.

Movetonewownersroot

This parameter will only take effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. If set to true, the item will be moved to the new owner's My Drive root folder and all prior parents removed. If set to false, parents are not changed.

Sendnotificationemail

Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Transferownership

Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file or shared drive.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (13)

Option Name

Description

Allowfilediscovery

Whether the permission allows the file to be discovered through search (Boolean).

Deleted

Whether the comment has been deleted.

Displayname

A plain text display name for the permission (String).

Domain

The domain to which the permission refers, if the type is "domain" (String).

Emailaddress

The email address of the user or group to which the permission refers (String).

Expirationtime

The time at which the permission expires, in RFC 3339 format (String).

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Pendingowner

Whether the permission is a pending owner of the file (Boolean).

Photolink

A link to the user's profile photo, if available (String).

Role

The role granted by the permission, such as "reader", "writer", or "owner" (String).

Type

The type of delivery mechanism, such as 'web_hook'.

View

The view for this permission, only applicable to "domain" type permissions (String).

GET drive.permissions.list

/files/{fileId}/permissions

Lists a file's or shared drive's permissions.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Includepermissionsforview

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

Pagesize

The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned.

Pagetoken

The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file or shared drive.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Replies (2)

POST drive.replies.create

/files/{fileId}/comments/{commentId}/replies

Creates a new reply to a comment.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Commentid

(Required) The ID of the comment.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (8)

Option Name

Description

Action

The action to take on the reply, such as "resolve" or "reopen" (String).

Content

The plain text content of the comment.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Deleted

Whether the comment has been deleted.

Htmlcontent

The HTML content of the comment.

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Modifiedtime

The time at which the comment was last modified, as an RFC 3339 date-time.

GET drive.replies.list

/files/{fileId}/comments/{commentId}/replies

Lists a comment's replies.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Includedeleted

Whether to include deleted replies. Deleted replies will not include their original content.

Pagesize

The maximum number of replies to return per page.

Pagetoken

The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Commentid

(Required) The ID of the comment.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Revisions

GET drive.revisions.list

/files/{fileId}/revisions

Lists a file's revisions.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Pagesize

The maximum number of revisions to return per page.

Pagetoken

The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Teamdrives (2)

POST drive.teamdrives.create

/teamdrives

Deprecated use drives.create instead.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Requestid

(Required) An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (8)

Option Name

Description

Backgroundimagelink

A link to the background image for the shared drive.

Colorrgb

The color of the shared drive as an RGB hex string.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Name

The name of the shared drive.

Orgunitid

The organizational unit ID of the shared drive.

Themeid

The ID of the theme applied to the shared drive.

GET drive.teamdrives.list

/teamdrives

Deprecated use drives.list instead.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Pagesize

Maximum number of Team Drives to return.

Pagetoken

Page token for Team Drives.

Q

Query string for searching Team Drives.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

{comment Id} (3)

DELETE drive.comments.delete

/files/{fileId}/comments/{commentId}

Deletes a comment.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Commentid

(Required) The ID of the comment.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.comments.get

/files/{fileId}/comments/{commentId}

Gets a comment by ID.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Includedeleted

Whether to return deleted comments. Deleted comments will not include their original content.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Commentid

(Required) The ID of the comment.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

PATCH drive.comments.update

/files/{fileId}/comments/{commentId}

Updates a comment with patch semantics.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Commentid

(Required) The ID of the comment.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (9)

Option Name

Description

Anchor

A region of the file that the comment is anchored to, such as a range of text.

Content

The plain text content of the comment.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Deleted

Whether the comment has been deleted.

Htmlcontent

The HTML content of the comment.

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Modifiedtime

The time at which the comment was last modified, as an RFC 3339 date-time.

Resolved

Whether the comment has been resolved.

{drive Id} (5)

DELETE drive.drives.delete

/drives/{driveId}

Permanently deletes a shared drive for which the user is an organizer. The shared drive cannot contain any untrashed items.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Driveid

(Required) The ID of the shared drive.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.drives.get

/drives/{driveId}

Gets a shared drive's metadata by ID.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Driveid

(Required) The ID of the shared drive.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

POST drive.drives.hide

/drives/{driveId}/hide

Hides a shared drive from the default view.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Driveid

(Required) The ID of the shared drive.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

POST drive.drives.unhide

/drives/{driveId}/unhide

Restores a shared drive to the default view.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Driveid

(Required) The ID of the shared drive.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

PATCH drive.drives.update

/drives/{driveId}

Updates the metadate for a shared drive.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Driveid

(Required) The ID of the shared drive.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (9)

Option Name

Description

Backgroundimagelink

A link to the background image for the shared drive.

Colorrgb

The color of the shared drive as an RGB hex string.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Hidden

Whether the shared drive is hidden from the default view.

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Name

The name of the shared drive.

Orgunitid

The organizational unit ID of the shared drive.

Themeid

The ID of the theme applied to the shared drive.

{file Id} (6)

POST drive.files.copy

/files/{fileId}/copy

Creates a copy of a file and applies any requested updates with patch semantics. Folders cannot be copied.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Enforcesingleparent

Deprecated. Copying files into multiple folders is no longer supported. Use shortcuts instead.

Ignoredefaultvisibility

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.

Includepermissionsforview

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

Keeprevisionforever

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.

Ocrlanguage

A language hint for OCR processing during image import (ISO 639-1 code).

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (44)

Option Name

Description

Copyrequireswriterpermission

Indicates whether copying the file requires the user to have writer permission.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Description

Provide a short description of the file.

Driveid

Set the ID of the shared drive where the file will be created.

Explicitlytrashed

Specify whether the file has been explicitly trashed.

Fileextension

Define the file extension, such as 'txt' or 'pdf'.

Foldercolorrgb

Set the RGB color for the folder, if creating a folder.

Fullfileextension

Provide the full file extension including the leading dot.

Hasaugmentedpermissions

Indicate whether the file has augmented permissions.

Hasthumbnail

Specify whether the file has a thumbnail.

Headrevisionid

Set the ID of the head revision of the file.

Iconlink

Provide a URL to the icon representing the file type.

Id

The ID of the shared drive.

Isappauthorized

Indicate whether the app is authorized to access the file.

Kind

The type of resource, set to 'drive#drive'.

Md5checksum

Provide the MD5 checksum of the file content.

Mimetype

Define the MIME type of the file, for example 'application/pdf'.

Modifiedbyme

Specify whether the file was last modified by the current user.

Modifiedbymetime

Set the timestamp of when the file was last modified by the user.

Modifiedtime

The time at which the comment was last modified, as an RFC 3339 date-time.

Name

The name of the shared drive.

Originalfilename

Provide the original filename of the uploaded file.

Ownedbyme

Indicate whether the file is owned by the current user.

Parents

List the IDs of parent folders where the file should be placed.

Permissionids

Provide an array of permission IDs for the file.

Quotabytesused

Specify the number of bytes of quota used by the file.

Resourcekey

Set the resource key for accessing the file.

Shared

Indicate whether the file is shared.

Sharedwithmetime

Set the timestamp of when the file was shared with the user.

Size

Define the size of the file in bytes.

Spaces

List the spaces where the file resides, such as 'drive' or 'appDataFolder'.

Starred

Indicate whether the file is starred.

Teamdriveid

Set the ID of the Team Drive (shared drive) if applicable.

Thumbnaillink

Provide a URL to the file's thumbnail image.

Thumbnailversion

Specify the version of the thumbnail.

Trashed

Indicate whether the file is in the trash.

Trashedtime

Set the timestamp of when the file was trashed.

Version

Specify the version number of the file.

Viewedbyme

Indicate whether the file has been viewed by the current user.

Viewedbymetime

Set the timestamp of when the file was last viewed by the user.

Viewerscancopycontent

Indicate whether viewers can copy the file content.

Webcontentlink

Provide a link to download the file content.

Webviewlink

Provide a link to view the file in a browser.

Writerscanshare

Indicate whether writers can share the file.

DELETE drive.files.delete

/files/{fileId}

Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive the user must be an organizer on the parent. If the target is a folder, all descendants owned by the user are also deleted.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Enforcesingleparent

Deprecated. If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner's root.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.files.export

/files/{fileId}/export

Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Mimetype

(Required) The MIME type of the format requested for this export.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.files.get

/files/{fileId}

Gets a file's metadata or content by ID.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Acknowledgeabuse

Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.

Includepermissionsforview

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

PATCH drive.files.update

/files/{fileId}

Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. This method supports patch semantics.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Addparents

A comma-separated list of parent IDs to add.

Enforcesingleparent

Deprecated. Adding files to multiple folders is no longer supported. Use shortcuts instead.

Includepermissionsforview

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

Keeprevisionforever

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.

Ocrlanguage

A language hint for OCR processing during image import (ISO 639-1 code).

Removeparents

A comma-separated list of parent IDs to remove.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Usecontentasindexabletext

Whether to use the uploaded content as indexable text.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (44)

Option Name

Description

Copyrequireswriterpermission

Indicates whether copying the file requires the user to have writer permission.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Description

Provide a short description of the file.

Driveid

Set the ID of the shared drive where the file will be created.

Explicitlytrashed

Specify whether the file has been explicitly trashed.

Fileextension

Define the file extension, such as 'txt' or 'pdf'.

Foldercolorrgb

Set the RGB color for the folder, if creating a folder.

Fullfileextension

Provide the full file extension including the leading dot.

Hasaugmentedpermissions

Indicate whether the file has augmented permissions.

Hasthumbnail

Specify whether the file has a thumbnail.

Headrevisionid

Set the ID of the head revision of the file.

Iconlink

Provide a URL to the icon representing the file type.

Id

The ID of the shared drive.

Isappauthorized

Indicate whether the app is authorized to access the file.

Kind

The type of resource, set to 'drive#drive'.

Md5checksum

Provide the MD5 checksum of the file content.

Mimetype

Define the MIME type of the file, for example 'application/pdf'.

Modifiedbyme

Specify whether the file was last modified by the current user.

Modifiedbymetime

Set the timestamp of when the file was last modified by the user.

Modifiedtime

The time at which the comment was last modified, as an RFC 3339 date-time.

Name

The name of the shared drive.

Originalfilename

Provide the original filename of the uploaded file.

Ownedbyme

Indicate whether the file is owned by the current user.

Parents

List the IDs of parent folders where the file should be placed.

Permissionids

Provide an array of permission IDs for the file.

Quotabytesused

Specify the number of bytes of quota used by the file.

Resourcekey

Set the resource key for accessing the file.

Shared

Indicate whether the file is shared.

Sharedwithmetime

Set the timestamp of when the file was shared with the user.

Size

Define the size of the file in bytes.

Spaces

List the spaces where the file resides, such as 'drive' or 'appDataFolder'.

Starred

Indicate whether the file is starred.

Teamdriveid

Set the ID of the Team Drive (shared drive) if applicable.

Thumbnaillink

Provide a URL to the file's thumbnail image.

Thumbnailversion

Specify the version of the thumbnail.

Trashed

Indicate whether the file is in the trash.

Trashedtime

Set the timestamp of when the file was trashed.

Version

Specify the version number of the file.

Viewedbyme

Indicate whether the file has been viewed by the current user.

Viewedbymetime

Set the timestamp of when the file was last viewed by the user.

Viewerscancopycontent

Indicate whether viewers can copy the file content.

Webcontentlink

Provide a link to download the file content.

Webviewlink

Provide a link to view the file in a browser.

Writerscanshare

Indicate whether writers can share the file.

POST drive.files.watch

/files/{fileId}/watch

Subscribes to changes to a file. While you can establish a channel for changes to a file on a shared drive, a change to a shared drive file won't create a notification.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Acknowledgeabuse

Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.

Includepermissionsforview

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (9)

Option Name

Description

Address

The URL where notifications will be delivered.

Expiration

The expiration time for the notification channel, as a Unix timestamp in milliseconds.

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Payload

Whether the notification includes a payload with the resource state.

Resourceid

The ID of the resource being watched.

Resourceuri

The URI of the resource being watched.

Token

An arbitrary string to identify this channel within your application.

Type

The type of delivery mechanism, such as 'web_hook'.

{permission Id} (3)

DELETE drive.permissions.delete

/files/{fileId}/permissions/{permissionId}

Deletes a permission.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file or shared drive.

Permissionid

(Required) The ID of the permission.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.permissions.get

/files/{fileId}/permissions/{permissionId}

Gets a permission by ID.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Permissionid

(Required) The ID of the permission.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

PATCH drive.permissions.update

/files/{fileId}/permissions/{permissionId}

Updates a permission with patch semantics.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Removeexpiration

Whether to remove the expiration date.

Supportsalldrives

Whether the requesting application supports both My Drives and shared drives.

Supportsteamdrives

Deprecated use supportsAllDrives instead.

Transferownership

Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. File owners can only transfer ownership of files existing on My Drive. Files existing in a shared drive are owned by the organization that owns that shared drive. Ownership transfers are not supported for files and folders in shared drives. Organizers of a shared drive can move items from that shared drive into their My Drive which transfers the ownership to them.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file or shared drive.

Permissionid

(Required) The ID of the permission.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (13)

Option Name

Description

Allowfilediscovery

Whether the permission allows the file to be discovered through search (Boolean).

Deleted

Whether the comment has been deleted.

Displayname

A plain text display name for the permission (String).

Domain

The domain to which the permission refers, if the type is "domain" (String).

Emailaddress

The email address of the user or group to which the permission refers (String).

Expirationtime

The time at which the permission expires, in RFC 3339 format (String).

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Pendingowner

Whether the permission is a pending owner of the file (Boolean).

Photolink

A link to the user's profile photo, if available (String).

Role

The role granted by the permission, such as "reader", "writer", or "owner" (String).

Type

The type of delivery mechanism, such as 'web_hook'.

View

The view for this permission, only applicable to "domain" type permissions (String).

{reply Id} (3)

DELETE drive.replies.delete

/files/{fileId}/comments/{commentId}/replies/{replyId}

Deletes a reply.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Commentid

(Required) The ID of the comment.

Replyid

(Required) The ID of the reply.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.replies.get

/files/{fileId}/comments/{commentId}/replies/{replyId}

Gets a reply by ID.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Includedeleted

Whether to return deleted replies. Deleted replies will not include their original content.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Commentid

(Required) The ID of the comment.

Replyid

(Required) The ID of the reply.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

PATCH drive.replies.update

/files/{fileId}/comments/{commentId}/replies/{replyId}

Updates a reply with patch semantics.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Commentid

(Required) The ID of the comment.

Replyid

(Required) The ID of the reply.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (8)

Option Name

Description

Action

The action to take on the reply, such as "resolve" or "reopen" (String).

Content

The plain text content of the comment.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Deleted

Whether the comment has been deleted.

Htmlcontent

The HTML content of the comment.

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Modifiedtime

The time at which the comment was last modified, as an RFC 3339 date-time.

{revision Id} (3)

DELETE drive.revisions.delete

/files/{fileId}/revisions/{revisionId}

Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Revisionid

(Required) The ID of the revision.

Response Type

The response format expected from the API (e.g. application/json).

GET drive.revisions.get

/files/{fileId}/revisions/{revisionId}

Gets a revision's metadata or content by ID.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Acknowledgeabuse

Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Revisionid

(Required) The ID of the revision.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

PATCH drive.revisions.update

/files/{fileId}/revisions/{revisionId}

Updates a revision with patch semantics.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Fileid

(Required) The ID of the file.

Revisionid

(Required) The ID of the revision.

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (12)

Option Name

Description

Id

The ID of the shared drive.

Keepforever

Whether to keep this revision forever, preventing it from being automatically deleted.

Kind

The type of resource, set to 'drive#drive'.

Md5checksum

Provide the MD5 checksum of the file content.

Mimetype

Define the MIME type of the file, for example 'application/pdf'.

Modifiedtime

The time at which the comment was last modified, as an RFC 3339 date-time.

Originalfilename

Provide the original filename of the uploaded file.

Publishauto

Whether to automatically publish the revision when it is marked as published.

Published

Whether this revision is published and visible to viewers.

Publishedlink

The link to the published version of this revision.

Publishedoutsidedomain

Whether the published revision is accessible to users outside the owning domain.

Size

Define the size of the file in bytes.

{team Drive Id} (3)

DELETE drive.teamdrives.delete

/teamdrives/{teamDriveId}

Deprecated use drives.delete instead.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Teamdriveid

(Required) The ID of the Team Drive

Response Type

The response format expected from the API (e.g. application/json).

GET drive.teamdrives.get

/teamdrives/{teamDriveId}

Deprecated use drives.get instead.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Teamdriveid

(Required) The ID of the Team Drive

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

PATCH drive.teamdrives.update

/teamdrives/{teamDriveId}

Deprecated use drives.update instead

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Usedomainadminaccess

Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the Team Drive belongs.

Alt

Data format for the response.

Fields

Selector specifying which fields to include in a partial response.

Key

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Oauth Token

OAuth 2.0 token for the current user.

Prettyprint

Returns response with indentations and line breaks.

Quotauser

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Userip

Deprecated. Please use quotaUser instead.

Teamdriveid

(Required) The ID of the Team Drive

Accept

Sets the content type accepted in the response, such as application/json.

Response Type

The response format expected from the API (e.g. application/json).

Options (8)

Option Name

Description

Backgroundimagelink

A link to the background image for the shared drive.

Colorrgb

The color of the shared drive as an RGB hex string.

Createdtime

The time at which the shared drive was created, as an RFC 3339 date-time.

Id

The ID of the shared drive.

Kind

The type of resource, set to 'drive#drive'.

Name

The name of the shared drive.

Orgunitid

The organizational unit ID of the shared drive.

Themeid

The ID of the theme applied to the shared drive.