google-drive
v1.0.2Manage files, folders, permissions, and collaborative content in Google Drive
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_user_info Get User Info
Retrieves information about the authenticated user, their Drive, and system capabilities. Use the `fields` parameter to specify which user properties and Drive details to return.
| Parameter | Type | Description |
|---|---|---|
fields | string | Selector specifying which fields to include in a partial response. |
get_access_proposal Get Access Proposal
Retrieves a specific access proposal for a file by its ID. Use this to check the status and details of pending access requests.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file or item associated with the access proposal. |
proposalId * | string | The unique identifier of the access proposal to retrieve. |
list_access_proposals List Access Proposals
Retrieve pending access proposals for a file. Only users with approver permissions can list access proposals; other users will receive a 403 error.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file for which to list access proposals. |
pageSize | integer | The maximum number of access proposals to return per page. Defaults to a server-defined limit if not specified. |
pageToken | string | A continuation token from a previous paginated response to retrieve the next set of results. |
resolve_access_proposal Resolve Access Proposal
Approves or denies a pending access proposal for a file. The approver can specify allowed roles when accepting and optionally notify the requester of the decision.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file associated with the access proposal. |
proposalId * | string | The ID of the access proposal to resolve. |
action | string | The action to take on the access proposal: accept to grant access, deny to reject it, or unspecified for no action. |
role | array | The roles to grant the requester when accepting the proposal. Required when action is ACCEPT. Specify as an array of role identifiers. |
sendNotification | boolean | Whether to send an email notification to the requester when the proposal is accepted or denied. |
view | string | The view context for this proposal, if it belongs to a view. Only the published view is supported. |
get_approval Get Approval
Retrieves a specific approval by its ID from a file. Use this to fetch details about an approval request or decision.
| Parameter | Type | Description |
|---|---|---|
approvalId * | string | The unique identifier of the approval to retrieve. |
fileId * | string | The unique identifier of the file containing the approval. |
list_approvals List Approvals
Retrieves a paginated list of approvals associated with a specific file. Use pagination parameters to control result size and navigate through multiple pages.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file for which to retrieve approvals. |
pageSize | integer | The maximum number of approvals to return per page. Defaults to 100 if not specified. |
pageToken | string | A pagination token from a previous response's nextPageToken field to retrieve the next page of results. |
get_change_start_page_token Get Change Start Page Token
Retrieves the starting page token for listing future changes in Google Drive. Use this token to begin monitoring changes that occur after the current moment.
list_changes List Changes
Retrieves a list of changes for a user's My Drive or shared drive, enabling tracking of file modifications, deletions, and access changes. Use page tokens to iterate through results.
| Parameter | Type | Description |
|---|---|---|
pageToken * | string | Pagination token from the previous response's nextPageToken field or from getStartPageToken to continue listing changes on the next page. |
includeCorpusRemovals | boolean | Include the file resource in results even when removed from the changes list, provided the file remains accessible to the user at request time. |
includeItemsFromAllDrives | boolean | Include changes from both My Drive and shared drives in the results. |
includeLabels | string | Comma-separated list of label IDs to include detailed label information in the response. |
includePermissionsForView | string | Specifies which additional view's permissions to include in the response. |
includeRemoved | boolean | Include change entries indicating items have been removed, such as through deletion or loss of access. |
pageSize | integer | Maximum number of changes to return per page. |
restrictToMyDrive | boolean | Restrict results to changes within the My Drive hierarchy, excluding changes to application data or shared files not added to My Drive. |
list_comments List Comments
Retrieves all comments on a file, with options to filter by modification time and include deleted comments. The `fields` parameter must be specified to define which comment fields to return.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file whose comments should be retrieved. |
fields | string | Selector specifying which fields to include in a partial response. |
includeDeleted | boolean | Whether to include deleted comments in the results. Deleted comments will not contain their original content. |
pageSize | integer | The maximum number of comments to return in a single page of results. |
pageToken | string | A pagination token from a previous response's `nextPageToken` field to retrieve the next page of results. |
startModifiedTime | string | Filter results to only include comments modified on or after this timestamp, specified in RFC 3339 date-time format. |
create_comment Create Comment
Creates a comment on a file in Google Drive. The `fields` parameter must be set to specify which fields to return in the response.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file on which to create the comment. |
anchor_end_index | integer | The end index of the anchor region in the document |
anchor_start_index | integer | The start index of the anchor region in the document |
content | string | The plain text content of the comment. HTML content will be generated from this plain text for display purposes. |
fields | string | Selector specifying which fields to include in a partial response. |
get_comment Get Comment
Retrieves a specific comment from a file by its ID. Supports optional retrieval of deleted comments, which will have their original content removed.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The unique identifier of the comment to retrieve. |
fileId * | string | The unique identifier of the file containing the comment. |
fields | string | Selector specifying which fields to include in a partial response. |
includeDeleted | boolean | Whether to include deleted comments in the response. Deleted comments will be returned without their original content. |
update_comment Update Comment
Updates an existing comment in a file using patch semantics, allowing you to modify the comment's content. The `fields` parameter must be set to specify which fields to return in the response.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The unique identifier of the comment to update. |
fileId * | string | The unique identifier of the file containing the comment to update. |
anchor_end_index | integer | The end index of the anchor region in the document |
anchor_start_index | integer | The start index of the anchor region in the document |
content | string | The plain text content to set for the comment. This field updates the comment's text content. |
fields | string | Selector specifying which fields to include in a partial response. |
delete_comment Delete Comment
Deletes a comment from a file. The comment and all associated replies will be permanently removed.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The unique identifier of the comment to delete. |
fileId * | string | The unique identifier of the file containing the comment to delete. |
fields | string | Selector specifying which fields to include in a partial response. |
copy_file Copy File
Creates a copy of a file with optional updates applied using patch semantics. The copied file inherits permissions from its parent folder unless otherwise specified.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file to copy. |
appProperties | object | Custom key-value pairs private to the requesting application. Entries with null values are cleared during copy operations. Requires OAuth 2 authentication to retrieve; API keys cannot access private p… |
contentRestrictions | array | Restrictions applied to file content access. Only populated when content restrictions are in effect. |
copyRequiresWriterPermission | boolean | Whether copying, printing, and downloading options are disabled for readers and commenters. |
description | string | A brief description or summary of the file's contents. |
folderColorRgb | string | The color for a folder or folder shortcut as an RGB hex string. Supported colors are published in the folderColorPalette field of the about resource; unsupported colors are replaced with the closest a… |
ignoreDefaultVisibility | boolean | Whether to bypass the domain's default visibility settings for the copied file. When enabled, the file's visibility is not automatically set to domain-wide visibility, though parent folder permissions… |
image | string | The thumbnail image data encoded using URL-safe Base64 format. |
includeLabels | string | A comma-separated list of label IDs to include in the labelInfo section of the response. |
includePermissionsForView | string | Specifies which additional view's permissions to include in the response. Only the published view is currently supported. |
indexableText | string | Text content to be indexed for improved fullText search results. Limited to 128 KB and may contain HTML elements. |
inheritedPermissionsDisabled | boolean | Whether inherited permissions are disabled for this file. Inherited permissions are enabled by default. |
keepRevisionForever | boolean | Whether to mark the new head revision to be kept forever. Only applicable to files with binary content. A maximum of 200 revisions per file can be kept permanently; delete pinned revisions if this lim… |
mimeType | string | The MIME type of the file. Google Drive automatically detects an appropriate MIME type from uploaded content if not provided. The value cannot be changed unless a new revision is uploaded. Files creat… |
name | string | The display name of the file. Not necessarily unique within a folder. For immutable items like shared drive roots and system folders, the name is constant. |
ocrLanguage | string | A language hint for OCR processing during image import, specified as an ISO 639-1 language code. |
parents | array | The ID of the parent folder containing the copied file. A file can have only one parent folder. If not specified, the file inherits the discoverable parent of the source file or is placed in the user'… |
properties | object | Custom key-value pairs visible to all applications. Entries with null values are cleared during copy operations. |
restrictedForReaders | boolean | Whether download and copy operations are restricted for readers. |
restrictedForWriters | boolean | Whether download and copy operations are restricted for writers. When enabled, download is also restricted for readers. |
starred | boolean | Whether the file is marked as starred by the user. |
targetId | string | The ID of the file that this shortcut points to. Only applicable to shortcut creation requests. |
thumbnailMimeType | string | The MIME type of the thumbnail image. |
trashed | boolean | Whether the file is in the trash, either directly or through a trashed parent folder. Only the file owner can trash files; other users cannot view files in the owner's trash. |
video_dimensions | string | Video dimensions in WIDTHxHEIGHT format (e.g., '1920x1080') |
writersCanShare | boolean | Whether users with writer-only permission can modify the file's sharing permissions. Not applicable to files in shared drives. |
list_files List Files
Retrieves a list of the user's files with support for searching, filtering, and sorting. By default, all files including trashed items are returned; use the trashed parameter to exclude deleted files.
| Parameter | Type | Description |
|---|---|---|
includeItemsFromAllDrives | boolean | Whether to include items from both My Drive and shared drives in the results. |
includeLabels | string | A comma-separated list of label IDs to include detailed label information in the response. |
includePermissionsForView | string | Specifies which additional view's permissions to include in the response. |
orderBy | string | A comma-separated list of sort keys to order results. Each key sorts ascending by default; append 'desc' to reverse order. Valid keys include createdTime, folder, modifiedByMeTime, modifiedTime, name,… |
pageSize | integer | The maximum number of files to return per page. Partial or empty result pages may be returned before reaching the end of the file list. |
pageToken | string | The pagination token from a previous response's nextPageToken field to retrieve the next page of results. |
q | string | A search query to filter file results using supported search syntax for files and folders. |
create_file Create File
Creates a new file in Google Drive with optional metadata, content restrictions, and organizational properties. Supports file uploads up to 5,120 GB with any valid MIME type, and allows creation of shortcuts to existing files.
| Parameter | Type | Description |
|---|---|---|
appProperties | object | Custom key-value pairs private to your application. Entries with null values are removed during updates. Requires OAuth 2 authentication to retrieve. |
contentRestrictions | array | Content access restrictions applied to the file. Only populated if restrictions exist. |
copyRequiresWriterPermission | boolean | Disable copy, print, and download options for readers and commenters. |
description | string | Brief description or summary of the file's contents. |
folderColorRgb | string | RGB hex color code for folder or folder shortcut appearance. Supported colors are available in the about resource's folderColorPalette; unsupported colors default to the closest available option. |
ignoreDefaultVisibility | boolean | Bypass the domain's default visibility settings for this file. When enabled, the file's visibility is not automatically set to domain-wide; permissions are still inherited from parent folders. |
image | string | Thumbnail image data encoded as URL-safe Base64. |
imageMediaMetadataHeight | string | Height of the image in pixels. |
imageMediaMetadataWidth | string | Width of the image in pixels. |
includeLabels | string | Comma-separated list of label IDs to include in the response's labelInfo section. |
includePermissionsForView | string | Include additional view permissions in the response. Currently only 'published' is supported. |
indexableText | string | Text content to index for improved full-text search results. Limited to 128 KB and may contain HTML elements. |
inheritedPermissionsDisabled | boolean | Disable inherited permissions for this file. By default, files inherit permissions from their parent folder. |
keepRevisionForever | boolean | Preserve the current file revision indefinitely. Only applicable to files with binary content; limited to 200 pinned revisions per file. |
mimeType | string | MIME type of the file. Google Drive automatically detects an appropriate type from uploaded content if not specified. Cannot be changed unless a new revision is uploaded. Google Docs MIME types trigge… |
name | string | Display name of the file. Not required to be unique within a folder. For immutable items like shared drive roots, this value is constant. |
ocrLanguage | string | Language hint for optical character recognition during image import, specified as an ISO 639-1 language code. |
parents | array | ID of the parent folder containing the file. A file can have only one parent. If omitted during creation, the file is placed in the user's My Drive root folder. |
properties | object | Custom key-value pairs visible to all applications. Entries with null values are removed during updates. |
restrictedForReaders | boolean | Restrict download and copy access for readers. |
restrictedForWriters | boolean | Restrict download and copy access for writers. When enabled, download is also restricted for readers. |
starred | boolean | Mark the file as starred in the user's Drive. |
targetId | string | ID of the file this shortcut points to. Only applicable when creating shortcuts with MIME type 'application/vnd.google-apps.shortcut'. |
thumbnailMimeType | string | MIME type of the thumbnail image. |
trashed | boolean | Move the file to trash. Only the file owner can trash files; other users cannot see trashed files in the owner's trash. |
useContentAsIndexableText | boolean | Use the uploaded file content as searchable indexable text to improve full-text query results. |
videoMediaMetadataHeight | string | Height of the video in pixels. |
videoMediaMetadataWidth | string | Width of the video in pixels. |
writersCanShare | boolean | Allow users with writer permission to modify the file's sharing permissions. Not applicable to files in shared drives. |
get_file Get File
Retrieve a file's metadata or content by ID. Use alt=media to download file contents, or use the export operation for Google Docs, Sheets, and Slides formats.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file to retrieve. |
includeLabels | string | Comma-separated list of label IDs to include in the labelInfo section of the response. |
includePermissionsForView | string | Specifies which additional view's permissions to include in the response. |
update_file Update File
Updates a file's metadata, content, or both using patch semantics. Only populate fields you want to modify; some fields like modifiedDate are updated automatically. Supports file uploads up to 5,120 GB.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file to update. |
addParents | string | Comma-separated list of parent folder IDs to add to the file. |
appProperties | object | Arbitrary key-value pairs private to the requesting app. Entries with null values are cleared. Requires OAuth 2 authentication; API keys cannot retrieve private properties. |
contentRestrictions | array | Restrictions for accessing the file's content. Only populated if restrictions exist. |
copyRequiresWriterPermission | boolean | Whether copying, printing, or downloading should be disabled for readers and commenters. |
description | string | A short description of the file's purpose or content. |
folderColorRgb | string | The color for a folder or folder shortcut as an RGB hex string. Uses the closest supported color if an unsupported color is specified. |
image | string | Thumbnail data encoded with URL-safe Base64. |
includeLabels | string | Comma-separated list of label IDs to include in the labelInfo section of the response. |
includePermissionsForView | string | Specifies which additional view's permissions to include in the response. |
indexableText | string | Text to be indexed for improved fullText search queries. Limited to 128 KB and may contain HTML elements. |
inheritedPermissionsDisabled | boolean | Whether inherited permissions are disabled for this file. Inherited permissions are enabled by default. |
keepRevisionForever | boolean | Whether to set the keepForever field in the new head revision for binary files. Limited to 200 revisions per file; delete pinned revisions if limit is reached. |
mimeType | string | The MIME type of the file. Google Drive auto-detects if not provided. Cannot be changed unless a new revision is uploaded. Google Doc MIME types trigger content import if supported. |
name | string | The name of the file. Not necessarily unique within a folder. Immutable for top-level shared drive folders, My Drive root, and Application Data folder. |
ocrLanguage | string | Language hint for OCR processing during image import, specified as an ISO 639-1 code. |
parents | array | The ID of the parent folder containing the file. A file can have only one parent. Use addParents and removeParents parameters to modify the parents list in update requests. |
properties | object | Arbitrary key-value pairs visible to all apps. Entries with null values are cleared in update requests. |
removeParents | string | Comma-separated list of parent folder IDs to remove from the file. |
restrictedForReaders | boolean | Whether download and copy are restricted for readers. |
restrictedForWriters | boolean | Whether download and copy are restricted for writers. If true, download is also restricted for readers. |
starred | boolean | Whether the user has starred the file. |
targetId | string | The ID of the file that this shortcut points to. Can only be set during file creation. |
thumbnailMimeType | string | The MIME type of the thumbnail image. |
trashed | boolean | Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner can trash files; other users cannot see files in the owner's trash. |
useContentAsIndexableText | boolean | Whether to use the uploaded content as indexable text for fullText search queries. |
writersCanShare | boolean | Whether users with writer permission can modify the file's permissions. Not populated for items in shared drives. |
delete_file Delete File
Permanently deletes a file owned by the user without moving it to trash. If the file is a folder, all descendants owned by the user are also deleted. For shared drives, the user must be an organizer on the parent folder.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file to delete. |
download_file Download File
Downloads the content of a file from Google Drive. Operations are valid for 24 hours from the time of creation.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file to download. |
revisionId | string | The specific revision of the file to download. Only applicable for blob files, Google Docs, and Google Sheets. Returns an error if the file type does not support revision-specific downloads. |
empty_trash Empty Trash
Permanently deletes all of the user's trashed files. This action cannot be undone and will remove all items currently in the trash.
export_document Export Document
Exports a Google Workspace document to a specified format and returns the exported content as bytes. The exported content is limited to 10 MB.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file to export. |
mimeType * | string | The MIME type format for the exported document. Refer to the supported export formats for Google Workspace documents to determine valid MIME types for your file type. |
generate_file_ids Generate File Ids
Generates a batch of file IDs for use in subsequent file creation or copy operations. These pre-generated IDs enable efficient file management workflows in Google Drive or App Data Folder.
| Parameter | Type | Description |
|---|---|---|
count | integer | The number of file IDs to generate. Must be between 1 and 1000 IDs per request. |
space | string | The storage space where generated IDs can be used to create files. Defaults to 'drive' for standard Google Drive storage. |
list_file_labels List File Labels
Retrieves all labels applied to a specific file. Supports pagination to handle large label sets across multiple pages.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file whose labels you want to retrieve. |
maxResults | integer | The maximum number of labels to return in a single page of results. Defaults to 100 if not specified. |
pageToken | string | A pagination token from a previous response's nextPageToken field to retrieve the next page of results. |
update_file_labels Update File Labels
Updates the labels applied to a file by adding, modifying, or removing label fields. Returns the list of labels that were successfully added or modified.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file whose labels should be modified. |
labelModifications | array | An ordered list of label modifications to apply to the file. Each modification specifies a label field and the values to set, add, or remove. |
list_file_permissions List File Permissions
Retrieves all permissions for a file or shared drive, including access levels and sharing settings. Supports pagination and optional filtering for published views.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file or shared drive whose permissions you want to retrieve. |
fields | string | Selector specifying which fields to include in a partial response. |
includePermissionsForView | string | Specifies which additional view's permissions to include in the response. Use 'published' to include permissions for the published view of the file. |
pageSize | integer | The maximum number of permissions to return per page. For shared drive files, defaults to 100 if not specified; for other files, returns the entire list. |
pageToken | string | The pagination token from a previous response's nextPageToken field. Use this to retrieve the next page of results. |
useDomainAdminAccess | boolean | When set to true, issues the request with domain administrator privileges. Only applicable when the fileId refers to a shared drive and the requester is a domain administrator. |
create_file_permission Create File Permission
Grants access to a file or shared drive by creating a new permission. Supports sharing with users, groups, domains, or the public, with optional ownership transfer and notification settings.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file or shared drive to which the permission applies. |
allowFileDiscovery | boolean | Whether the permission allows the file to be discovered through search results. Only applies to permissions with type domain or anyone. |
domain | string | The domain name to which this permission applies. Used when granting access to an entire domain. |
emailAddress | string | The email address of the user or group receiving this permission. |
emailMessage | string | Custom message text to include in the sharing notification email sent to recipients. |
expirationTime | string | The date and time when this permission automatically expires. Must be a future date no more than one year away. Only applicable to user and group permissions. |
inheritedPermissionsDisabled | boolean | When set to true, only organizers, owners, and users with direct permissions can access the item. Inherited permissions from parent folders are disabled. |
moveToNewOwnersRoot | boolean | When transferring ownership of a file outside a shared drive, set to true to move the file to the new owner's root folder and remove all previous parent folders. Set to false to preserve the folder hi… |
role | string | The access level granted by this permission. Common roles include owner, organizer, fileOrganizer, writer, commenter, and reader. |
sendNotificationEmail | boolean | Whether to send a notification email to the recipient. Defaults to true for users and groups. Cannot be disabled for ownership transfers. |
transferOwnership | boolean | Whether to transfer file ownership to the specified user and downgrade the current owner to a writer role. Required as an acknowledgment of the ownership change side effects. |
type | string | The type of the grantee. Supported values include: * `user` * `group` * `domain` * `anyone` When creating a permission, if `type` is `user` or `group`, you must provide an `emailAddress` for the user… |
useDomainAdminAccess | boolean | When set to true, issue the request as a domain administrator. Only applicable when the file ID refers to a shared drive and the requester is a domain administrator. |
view | string | The view scope for this permission. Published indicates a publishedReader role; metadata indicates the item is visible only in the metadata view with limited access. Metadata view is only supported on… |
get_permission Get Permission
Retrieves a specific permission for a file by its ID. Use this to inspect sharing settings and access details for a particular file permission.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file for which you want to retrieve the permission. |
permissionId * | string | The unique identifier of the permission to retrieve. |
fields | string | Selector specifying which fields to include in a partial response. |
useDomainAdminAccess | boolean | If true, issues the request as a domain administrator, granting access when the file is a shared drive and the requester is an administrator of that shared drive's domain. |
update_file_permission Update File Permission
Updates a file or shared drive permission using patch semantics. Supports modifying role, expiration, ownership transfer, and access settings. Note: Concurrent operations on the same file are not supported; only the last update applies.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The ID of the file or shared drive containing the permission to update. |
permissionId * | string | The ID of the permission to update. |
allowFileDiscovery | boolean | Whether this permission allows the file to be discovered through search. Only applicable for permissions of type 'domain' or 'anyone'. |
domain | string | The domain to which this permission applies. |
emailAddress | string | The email address of the user or group to which this permission applies. |
expirationTime | string | The expiration date and time for this permission in RFC 3339 format. Can only be set on user and group permissions, must be in the future, and cannot exceed one year from now. |
fields | string | Selector specifying which fields to include in a partial response. |
inheritedPermissionsDisabled | boolean | When true, restricts access to only organizers, owners, and users with permissions added directly on the item. Inherited permissions are disabled. |
removeExpiration | boolean | Whether to remove the expiration date from this permission. |
role | string | The role granted by this permission. Valid roles include: owner, organizer, fileOrganizer, writer, commenter, and reader. |
transferOwnership | boolean | Whether to transfer ownership of the file to the specified user and downgrade the current owner to a writer role. This parameter must be explicitly set to acknowledge the ownership change side effect. |
useDomainAdminAccess | boolean | Whether to issue this request as a domain administrator. Only applicable when the file ID refers to a shared drive and the requester is an administrator of that domain. |
view | string | The view scope for this permission. Supported values are 'published' (permission role is publishedReader) and 'metadata' (item visible only to metadata view with limited access). The metadata view is… |
delete_permission Delete Permission
Removes a specific permission from a file or shared drive. Note that concurrent permission operations on the same file are not supported; only the last update will be applied.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file or shared drive from which the permission will be removed. |
permissionId * | string | The unique identifier of the permission to be deleted. |
fields | string | Selector specifying which fields to include in a partial response. |
useDomainAdminAccess | boolean | When set to true, issues the request with domain administrator privileges. Requires the file to be a shared drive and the requester to be a domain administrator of the domain owning that shared drive. |
list_replies List Replies
Retrieves all replies to a specific comment on a file. Supports pagination and optional inclusion of deleted replies.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The unique identifier of the comment whose replies should be listed. |
fileId * | string | The unique identifier of the file containing the comment. |
fields | string | Selector specifying which fields to include in a partial response. |
includeDeleted | boolean | Whether to include deleted replies in the results. Deleted replies will not contain their original content. |
pageSize | integer | Maximum number of replies to return in a single page of results. |
pageToken | string | Pagination token from the previous response's nextPageToken field to retrieve the next page of results. |
create_comment_reply Create Comment Reply
Creates a reply to an existing comment on a file. Replies can either add content or perform actions like resolving or reopening the parent comment.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The unique identifier of the comment to which the reply is being added. |
fileId * | string | The unique identifier of the file containing the comment. |
action | string | The action to perform on the parent comment. Use this to resolve or reopen a comment instead of adding reply content. |
content | string | The plain text content of the reply. Required if no action is specified. The content will be displayed as plain text in the API response. |
fields | string | Selector specifying which fields to include in a partial response. |
get_reply Get Reply
Retrieves a specific reply to a comment on a file. Optionally includes deleted replies, which are returned without their original content.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The unique identifier of the comment that contains the reply. |
fileId * | string | The unique identifier of the file containing the comment and reply. |
replyId * | string | The unique identifier of the reply to retrieve. |
fields | string | Selector specifying which fields to include in a partial response. |
includeDeleted | boolean | Whether to include deleted replies in the response. Deleted replies are returned without their original content. |
update_reply Update Reply
Updates a reply on a comment in a file using patch semantics. Supports modifying reply content or changing the reply's action status (resolve/reopen) relative to the parent comment.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The unique identifier of the comment that contains the reply being updated. |
fileId * | string | The unique identifier of the file containing the comment and reply. |
replyId * | string | The unique identifier of the reply to update. |
action | string | The action this reply performs on the parent comment. Use to resolve or reopen a comment thread. |
content | string | The plain text content of the reply. Required if no action is specified. Note: use htmlContent for display purposes. |
fields | string | Selector specifying which fields to include in a partial response. |
delete_reply Delete Reply
Deletes a reply from a comment on a file. This operation permanently removes the specified reply and cannot be undone.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | The unique identifier of the comment containing the reply to delete. |
fileId * | string | The unique identifier of the file containing the comment with the reply to delete. |
replyId * | string | The unique identifier of the reply to delete. |
fields | string | Selector specifying which fields to include in a partial response. |
get_file_revision Get File Revision
Retrieves a specific file revision's metadata or content by its ID. Use this to access historical versions of a file for review, recovery, or comparison purposes.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file containing the revision. |
revisionId * | string | The unique identifier of the specific revision to retrieve. |
update_file_revision Update File Revision
Updates a file revision's metadata using patch semantics, allowing you to preserve revisions indefinitely or configure auto-republishing behavior for Docs Editors files.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file containing the revision to update. |
revisionId * | string | The unique identifier of the revision to update. |
keepForever | boolean | Whether to permanently retain this revision in the file's history. When enabled, the revision will not be automatically deleted after 30 days. Limited to a maximum of 200 retained revisions per file.… |
publishAuto | boolean | Whether to automatically republish subsequent revisions of this file. Only applicable to Google Docs, Sheets, and Slides files. |
delete_file_revision Delete File Revision
Permanently deletes a specific version of a file. Only binary files (images, videos, etc.) support revision deletion; revisions for Google Docs, Sheets, and the last remaining file version cannot be deleted.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file containing the revision to delete. |
revisionId * | string | The unique identifier of the specific file revision to permanently delete. |
list_file_revisions List File Revisions
Retrieves a list of revisions for a specified file. Note that the revision history may be incomplete for files with extensive revision histories, and older revisions might be omitted from the response.
| Parameter | Type | Description |
|---|---|---|
fileId * | string | The unique identifier of the file whose revisions you want to list. |
pageSize | integer | The maximum number of revisions to return in a single page of results. |
pageToken | string | A pagination token from a previous response to retrieve the next page of results. Use the 'nextPageToken' value returned from the prior request. |