api reference · v3

Every Drive method, from the index.

All 64 methods of the Drive API, rendered at build time from the committed Discovery index the grr binary embeds — the same data grr api describe reads at runtime. Flags are kebab-cased parameter names: userId is --user-id.

64 methods · v3 · revision 20260923

drive.about

1 method

drive.about.get

GET

grr drive about get about

Gets information about the user, the user's Drive, and system capabilities. For more information, see Return user info. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields

No parameters.

https://www.googleapis.com/auth/drive.readonly least privilege

7 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive about get
grr drive about get

drive.accessproposals

3 methods

drive.accessproposals.get

GET

grr drive accessproposals get files/{fileId}/accessproposals/{proposalId}

Retrieves an access proposal by ID. For more information, see Manage pending access proposals.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path Required. The ID of the item the request is on. —
proposalId string yes — path Required. The ID of the access proposal to resolve. —

https://www.googleapis.com/auth/drive.readonly least privilege

5 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive accessproposals get
grr drive accessproposals get --file-id <file-id> --proposal-id <proposal-id>

drive.accessproposals.list

GET

grr drive accessproposals list files/{fileId}/accessproposals

List the access proposals on a file. For more information, see Manage pending access proposals. Note: Only approvers are able to list access proposals on a file. If the user isn't an approver, a 403 error is returned.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path Required. The ID of the item the request is on. —
pageSize integer — — query Optional. The number of results per page. —
pageToken string — — query Optional. The continuation token on the list of access requests. —

https://www.googleapis.com/auth/drive.readonly least privilege

5 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive accessproposals list
grr drive accessproposals list --file-id <file-id>

drive.accessproposals.resolve

POST

grr drive accessproposals resolve files/{fileId}/accessproposals/{proposalId}:resolve

Approves or denies an access proposal. For more information, see Manage pending access proposals.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path Required. The ID of the item the request is on. —
proposalId string yes — path Required. The ID of the access proposal to resolve. —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive accessproposals resolve
grr drive accessproposals resolve --file-id <file-id> --proposal-id <proposal-id> --body-file ./body.json

drive.approvals

8 methods

drive.approvals.approve

POST

grr drive approvals approve files/{fileId}/approvals/{approvalId}:approve

Approves an approval. For more information, see Manage approvals. This is used to update the ReviewerResponse of the requesting user with a Response of `APPROVED`. If this is the last required reviewer response, this also complete

Parameter Type Required Repeated Location Description Enum values
approvalId string yes — path Required. The ID of the approval to approve. —
fileId string yes — path Required. The ID of the file that the approval is on. —

https://www.googleapis.com/auth/drive.metadata least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata

grr drive approvals approve
grr drive approvals approve --approval-id <approval-id> --file-id <file-id> --body-file ./body.json

drive.approvals.cancel

POST

grr drive approvals cancel files/{fileId}/approvals/{approvalId}:cancel

Cancels an approval. For more information, see Manage approvals. Updates the approval Status to `CANCELLED`. This can be called by any user with the `writer` permission on the file while the approval Status is `IN_PROGRESS`.

Parameter Type Required Repeated Location Description Enum values
approvalId string yes — path Required. The ID of the approval to cancel. —
fileId string yes — path Required. The ID of the file that the approval is on. —

https://www.googleapis.com/auth/drive.metadata least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata

grr drive approvals cancel
grr drive approvals cancel --approval-id <approval-id> --file-id <file-id> --body-file ./body.json

drive.approvals.comment

POST

grr drive approvals comment files/{fileId}/approvals/{approvalId}:comment

Comments on an approval. For more information, see Manage approvals. This sends a notification to both the initiator and the reviewers. Additionally, a message is also added to the approval activity log.

Parameter Type Required Repeated Location Description Enum values
approvalId string yes — path Required. The ID of the approval to comment on. —
fileId string yes — path Required. The ID of the file that the approval is on. —

https://www.googleapis.com/auth/drive.metadata least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata

grr drive approvals comment
grr drive approvals comment --approval-id <approval-id> --file-id <file-id> --body-file ./body.json

drive.approvals.decline

POST

grr drive approvals decline files/{fileId}/approvals/{approvalId}:decline

Declines an approval. For more information, see Manage approvals. This is used to update the ReviewerResponse of the requesting user with a Response of `DECLINED`. This also completes the approval and sets the approval Status to `

Parameter Type Required Repeated Location Description Enum values
approvalId string yes — path Required. The ID of the approval to decline. —
fileId string yes — path Required. The ID of the file that the approval is on. —

https://www.googleapis.com/auth/drive.metadata least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata

grr drive approvals decline
grr drive approvals decline --approval-id <approval-id> --file-id <file-id> --body-file ./body.json

drive.approvals.get

GET

grr drive approvals get files/{fileId}/approvals/{approvalId}

Gets an approval by ID. For more information, see Manage approvals.

Parameter Type Required Repeated Location Description Enum values
approvalId string yes — path Required. The ID of the approval. —
fileId string yes — path Required. The ID of the file that the approval is on. —

https://www.googleapis.com/auth/drive.readonly least privilege

6 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive approvals get
grr drive approvals get --approval-id <approval-id> --file-id <file-id>

drive.approvals.list

GET

grr drive approvals list files/{fileId}/approvals

Lists the approvals on a file. For more information, see Manage approvals. By default, this method returns a minimal response that may not include the items array. To retrieve approval details, you must explicitly specify the fiel

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path Required. The ID of the file that the approval is on. —
pageSize integer — — query The maximum number of approvals to return. When not set, at most 100 approvals are returned. —
pageToken string — — query The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response. —

https://www.googleapis.com/auth/drive.readonly least privilege

6 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive approvals list
grr drive approvals list --file-id <file-id>

drive.approvals.reassign

POST

grr drive approvals reassign files/{fileId}/approvals/{approvalId}:reassign

Reassigns the reviewers on an approval. For more information, see Manage approvals. Adds or replaces reviewers in the ReviewerResponse of the approval. This can be called by any user with the `writer` permission on the file while

Parameter Type Required Repeated Location Description Enum values
approvalId string yes — path Required. The ID of the approval to reassign. —
fileId string yes — path Required. The ID of the file that the approval is on. —

https://www.googleapis.com/auth/drive.metadata least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata

grr drive approvals reassign
grr drive approvals reassign --approval-id <approval-id> --file-id <file-id> --body-file ./body.json

drive.approvals.start

POST

grr drive approvals start files/{fileId}/approvals:start

Starts an approval on a file. For more information, see Manage approvals.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path Required. The ID of the file that the approval is created on. —

https://www.googleapis.com/auth/drive.metadata least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata

grr drive approvals start
grr drive approvals start --file-id <file-id> --body-file ./body.json

drive.apps

2 methods

drive.apps.get

GET

grr drive apps get apps/{appId}

Gets a specific app. For more information, see Return user info.

Parameter Type Required Repeated Location Description Enum values
appId string yes — path The ID of the app. —

https://www.googleapis.com/auth/drive.readonly least privilege

7 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.apps.readonly
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive apps get
grr drive apps get --app-id <app-id>

drive.apps.list

GET

grr drive apps list apps

Lists a user's installed apps. For more information, see Return user info.

Parameter Type Required Repeated Location Description Enum values
appFilterExtensions string — — query A comma-separated list of file extensions to limit returned results. All results within the given app query scope which can open any of the given file extension —
appFilterMimeTypes string — — query A comma-separated list of file extensions to limit returned results. All results within the given app query scope which can open any of the given MIME types wil —
languageCode string — — query A language or locale code, as defined by BCP 47, with some extensions from Unicode's LDML format (http://www.unicode.org/reports/tr35/). —

https://www.googleapis.com/auth/drive.apps.readonly least privilege

1 scope
  • https://www.googleapis.com/auth/drive.apps.readonly

grr drive apps list
grr drive apps list

drive.changes

3 methods

drive.changes.getStartPageToken

GET

grr drive changes getStartPageToken changes/startPageToken

Gets the starting pageToken for listing future changes. For more information, see Retrieve changes.

Parameter Type Required Repeated Location Description Enum values
driveId string — — query The ID of the shared drive for which the starting pageToken for listing future changes from that shared drive will be returned. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
teamDriveId string — — query Deprecated: Use `driveId` instead. —

https://www.googleapis.com/auth/drive.readonly least privilege

8 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive changes getStartPageToken
grr drive changes getStartPageToken

drive.changes.list

GET

grr drive changes list changes

Lists the changes for a user or shared drive. For more information, see Retrieve changes.

Parameter Type Required Repeated Location Description Enum values
driveId string — — query The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change I —
includeCorpusRemovals boolean — — query 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 l —
includeItemsFromAllDrives boolean — — query Whether both My Drive and shared drive items should be included in results. —
includeLabels string — — query A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. —
includePermissionsForView string — — query Specifies which additional view's permissions to include in the response. Only 'published' is supported. —
includeRemoved boolean — — query Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. —
includeTeamDriveItems boolean — — query Deprecated: Use `includeItemsFromAllDrives` instead. —
pageSize integer — — query The maximum number of changes to return. The service may return fewer than this value. If unspecified, at most 100 changes will be returned. The maximum value i —
pageToken string yes — query 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 respo —
restrictToMyDrive boolean — — query 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 fil —
spaces string — — query A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
teamDriveId string — — query Deprecated: Use `driveId` instead. —

https://www.googleapis.com/auth/drive.readonly least privilege

8 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive changes list
grr drive changes list --page-token <page-token>

drive.changes.watch

POST

grr drive changes watch changes/watch

Subscribes to changes for a user. For more information, see Notifications for resource changes.

Parameter Type Required Repeated Location Description Enum values
driveId string — — query The shared drive from which changes will be returned. If specified the change IDs will be reflective of the shared drive; use the combined drive ID and change I —
includeCorpusRemovals boolean — — query 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 l —
includeItemsFromAllDrives boolean — — query Whether both My Drive and shared drive items should be included in results. —
includeLabels string — — query A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. —
includePermissionsForView string — — query Specifies which additional view's permissions to include in the response. Only 'published' is supported. —
includeRemoved boolean — — query Whether to include changes indicating that items have been removed from the list of changes, for example by deletion or loss of access. —
includeTeamDriveItems boolean — — query Deprecated: Use `includeItemsFromAllDrives` instead. —
pageSize integer — — query The maximum number of changes to return. The service may return fewer than this value. If unspecified, at most 100 changes will be returned. The maximum value i —
pageToken string yes — query 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 respo —
restrictToMyDrive boolean — — query 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 fil —
spaces string — — query A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
teamDriveId string — — query Deprecated: Use `driveId` instead. —

https://www.googleapis.com/auth/drive.readonly least privilege

8 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive changes watch
grr drive changes watch --page-token <page-token> --body-file ./body.json

drive.channels

1 method

drive.channels.stop

POST

grr drive channels stop channels/stop

Stops watching resources through this channel. For more information, see Notifications for resource changes.

No parameters.

https://www.googleapis.com/auth/drive.readonly least privilege

8 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive channels stop
grr drive channels stop --body-file ./body.json

drive.comments

5 methods

drive.comments.create

POST

grr drive comments create files/{fileId}/comments

Creates a comment on a file. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developers.google.co

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID of the file. —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive comments create
grr drive comments create --file-id <file-id> --body-file ./body.json

drive.comments.delete

DELETE

grr drive comments delete files/{fileId}/comments/{commentId}

Deletes a comment. For more information, see Manage comments and replies.

Parameter Type Required Repeated Location Description Enum values
commentId string yes — path The ID of the comment. —
fileId string yes — path The ID of the file. —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive comments delete
grr drive comments delete --comment-id <comment-id> --file-id <file-id>

drive.comments.get

GET

grr drive comments get files/{fileId}/comments/{commentId}

Gets a comment by ID. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developers.google.com/works

Parameter Type Required Repeated Location Description Enum values
commentId string yes — path The ID of the comment. —
fileId string yes — path The ID of the file. —
includeDeleted boolean — — query Whether to return deleted comments. Deleted comments will not include their original content. —

https://www.googleapis.com/auth/drive.readonly least privilege

4 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive comments get
grr drive comments get --comment-id <comment-id> --file-id <file-id>

drive.comments.list

GET

grr drive comments list files/{fileId}/comments

Lists a file's comments. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developers.google.com/wo

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID of the file. —
includeDeleted boolean — — query Whether to include deleted comments. Deleted comments will not include their original content. —
pageSize integer — — query The maximum number of comments to return. The service may return fewer than this value. If unspecified, at most 20 comments will be returned. The maximum value —
pageToken string — — query 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 string — — query The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time). —

https://www.googleapis.com/auth/drive.readonly least privilege

4 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive comments list
grr drive comments list --file-id <file-id>

drive.comments.update

PATCH

grr drive comments update files/{fileId}/comments/{commentId}

Updates a comment with patch semantics. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see [Return specific fields](https://developer

Parameter Type Required Repeated Location Description Enum values
commentId string yes — path The ID of the comment. —
fileId string yes — path The ID of the file. —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive comments update
grr drive comments update --comment-id <comment-id> --file-id <file-id> --body-file ./body.json

drive.drives

7 methods

drive.drives.create

POST

grr drive drives create drives

Creates a shared drive. For more information, see Manage shared drives.

Parameter Type Required Repeated Location Description Enum values
requestId string yes — query 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 —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive drives create
grr drive drives create --request-id <request-id> --body-file ./body.json

drive.drives.delete

DELETE

grr 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. For more information, see Manage shared drives.

Parameter Type Required Repeated Location Description Enum values
allowItemDeletion boolean — — query Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`. —
driveId string yes — path The ID of the shared drive. —
useDomainAdminAccess boolean — — query 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 s —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive drives delete
grr drive drives delete --drive-id <drive-id>

drive.drives.get

GET

grr drive drives get drives/{driveId}

Gets a shared drive's metadata by ID. For more information, see Manage shared drives.

Parameter Type Required Repeated Location Description Enum values
driveId string yes — path The ID of the shared drive. —
useDomainAdminAccess boolean — — query 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 s —

https://www.googleapis.com/auth/drive.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.readonly

grr drive drives get
grr drive drives get --drive-id <drive-id>

drive.drives.hide

POST

grr drive drives hide drives/{driveId}/hide

Hides a shared drive from the default view. For more information, see Manage shared drives.

Parameter Type Required Repeated Location Description Enum values
driveId string yes — path The ID of the shared drive. —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive drives hide
grr drive drives hide --drive-id <drive-id> --body-file ./body.json

drive.drives.list

GET

grr drive drives list drives

Lists the user's shared drives. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the Search for shared drives guide.

Parameter Type Required Repeated Location Description Enum values
pageSize integer — — query The maximum number of shared drives to return. The service may return fewer than this value. If unspecified, at most 10 shared drives will be returned. The maxi —
pageToken string — — query Page token for shared drives. —
q string — — query Query string for searching shared drives. —
useDomainAdminAccess boolean — — query 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. —

https://www.googleapis.com/auth/drive.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.readonly

grr drive drives list
grr drive drives list

drive.drives.unhide

POST

grr drive drives unhide drives/{driveId}/unhide

Restores a shared drive to the default view. For more information, see Manage shared drives.

Parameter Type Required Repeated Location Description Enum values
driveId string yes — path The ID of the shared drive. —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive drives unhide
grr drive drives unhide --drive-id <drive-id> --body-file ./body.json

drive.drives.update

PATCH

grr drive drives update drives/{driveId}

Updates the metadata for a shared drive. For more information, see Manage shared drives.

Parameter Type Required Repeated Location Description Enum values
driveId string yes — path The ID of the shared drive. —
useDomainAdminAccess boolean — — query 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 s —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive drives update
grr drive drives update --drive-id <drive-id> --body-file ./body.json

drive.files

14 methods

drive.files.copy

POST

grr drive files copy files/{fileId}/copy

Creates a copy of a file and applies any requested updates with patch semantics. For more information, see Create and manage files.

Parameter Type Required Repeated Location Description Enum values
copyComments boolean — — query Whether to copy the open (unresolved) comments associated with the file. —
enforceSingleParent boolean — — query Deprecated: Copying files into multiple folders is no longer supported. Use shortcuts instead. —
fileId string yes — path The ID of the file. —
ignoreDefaultVisibility boolean — — query 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 doma —
includeLabels string — — query A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. —
includePermissionsForView string — — query Specifies which additional view's permissions to include in the response. Only `published` is supported. —
keepRevisionForever boolean — — query 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 th —
ocrLanguage string — — query A language hint for OCR processing during image import (ISO 639-1 code). —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —

https://www.googleapis.com/auth/drive.photos.readonly least privilege

4 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.photos.readonly

grr drive files copy
grr drive files copy --file-id <file-id> --body-file ./body.json

drive.files.create

POST

grr drive files create files

Creates a file. For more information, see Create and manage files. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types

Parameter Type Required Repeated Location Description Enum values
enforceSingleParent boolean — — query Deprecated: Creating files in multiple folders is no longer supported. —
ignoreDefaultVisibility boolean — — query 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 doma —
includeLabels string — — query A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. —
includePermissionsForView string — — query Specifies which additional view's permissions to include in the response. Only `published` is supported. —
keepRevisionForever boolean — — query 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 th —
ocrLanguage string — — query A language hint for OCR processing during image import (ISO 639-1 code). —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
useContentAsIndexableText boolean — — query Whether to use the uploaded content as indexable text. —

https://www.googleapis.com/auth/drive.file least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file

grr drive files create
grr drive files create --body-file ./body.json

drive.files.delete

DELETE

grr drive files delete files/{fileId}

Permanently deletes a file owned by the user without moving it to the trash. For more information, see Trash or delete files and folders. If the file belongs to a shared drive, the user must be an `organizer` on the parent folder. If

Parameter Type Required Repeated Location Description Enum values
enforceSingleParent boolean — — query Deprecated: If an item isn't in a shared drive and its last parent is deleted but the item itself isn't, the item will be placed under its owner's root. —
fileId string yes — path The ID of the file. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —

https://www.googleapis.com/auth/drive.file least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file

grr drive files delete
grr drive files delete --file-id <file-id>

drive.files.download

POST

grr drive files download files/{fileId}/download

Downloads the content of a file. For more information, see Download and export files. Operations are valid for 24 hours from the time of creation.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path Required. The ID of the file to download. —
mimeType string — — query Optional. The MIME type the file should be downloaded as. This field can only be set when downloading Google Workspace documents. For a list of supported MIME t —
revisionId string — — query Optional. The revision ID of the file to download. This field can only be set when downloading blob files, Google Docs, and Google Sheets. Returns `INVALID_ARGU —

https://www.googleapis.com/auth/drive.readonly least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.readonly

grr drive files download
grr drive files download --file-id <file-id> --body-file ./body.json

drive.files.emptyTrash

DELETE

grr drive files emptyTrash files/trash

Permanently deletes all of the user's trashed files. For more information, see Trash or delete files and folders.

Parameter Type Required Repeated Location Description Enum values
driveId string — — query If set, empties the trash of the provided shared drive. —
enforceSingleParent boolean — — query Deprecated: If an item isn't in a shared drive and its last parent is deleted but the item itself isn't, the item will be placed under its owner's root. —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive files emptyTrash
grr drive files emptyTrash

drive.files.export

GET

grr drive files export files/{fileId}/export

Exports a Google Workspace document to the requested MIME type and returns exported byte content. For more information, see Download and export files. Note that the exported content is limited to 10 MB.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID of the file. —
mimeType string yes — query Required. The MIME type of the format requested for this export. For a list of supported MIME types, see [Export MIME types for Google Workspace documents](/wor —

https://www.googleapis.com/auth/drive.readonly least privilege

4 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive files export
grr drive files export --file-id <file-id> --mime-type <mime-type>

drive.files.generateCseToken

GET

grr drive files generateCseToken files/generateCseToken

Generates a CSE token which can be used to create or update CSE files.

Parameter Type Required Repeated Location Description Enum values
fileId string — — query The ID of the file for which the JWT should be generated. If not provided, an id will be generated. —
parent string — — query The ID of the expected parent of the file. Used when generating a JWT for a new CSE file. If specified, the parent will be fetched, and if the parent is a share —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive files generateCseToken
grr drive files generateCseToken

drive.files.generateIds

GET

grr drive files generateIds files/generateIds

Generates a set of file IDs which can be provided in create or copy requests. For more information, see Create and manage files.

Parameter Type Required Repeated Location Description Enum values
count integer — — query The number of IDs to return. —
space string — — query The space in which the IDs can be used to create files. Supported values are `drive` and `appDataFolder`. (Default: `drive`.) For more information, see [File or —
type string — — query 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`. —

https://www.googleapis.com/auth/drive.file least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file

grr drive files generateIds
grr drive files generateIds

drive.files.get

GET

grr drive files get files/{fileId}

Gets a file's metadata or content by ID. For more information, see Search for files and folders. If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading conte

Parameter Type Required Repeated Location Description Enum values
acknowledgeAbuse boolean — — query Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `medi —
fileId string yes — path The ID of the file. —
includeLabels string — — query A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. —
includePermissionsForView string — — query Specifies which additional view's permissions to include in the response. Only `published` is supported. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —

https://www.googleapis.com/auth/drive.readonly least privilege

8 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive files get
grr drive files get --file-id <file-id>

drive.files.list

GET

grr drive files list files

Lists the user's files. For more information, see Search for files and folders. This method accepts the `q` parameter, which is a search query combining one or more search terms. This method returns *all* files by default, incl

Parameter Type Required Repeated Location Description Enum values
corpora string — — query Specifies a collection of items (files or documents) to which the query applies. Supported items include: * `user` * `domain` * `drive` * `allDrives` Prefer `us —
corpus string — — query Deprecated: The source of files to list. Use `corpora` instead. domain · user
driveId string — — query ID of the shared drive to search. —
includeItemsFromAllDrives boolean — — query Whether both My Drive and shared drive items should be included in results. —
includeLabels string — — query A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. —
includePermissionsForView string — — query Specifies which additional view's permissions to include in the response. Only `published` is supported. —
includeTeamDriveItems boolean — — query Deprecated: Use `includeItemsFromAllDrives` instead. —
orderBy string — — query A comma-separated list of sort keys. Valid keys are: * `createdTime`: When the file was created. Avoid using this key for queries on large item collections as i —
pageSize integer — — query The maximum number of files to return. The service may return fewer than this value. If unspecified, at most 100 files will be returned for shared drives, and t —
pageToken string — — query 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 string — — query A query for filtering the file results. For supported syntax, see Search for files and folders. —
spaces string — — query A comma-separated list of spaces to query within the corpora. Supported values are `drive` and `appDataFolder`. For more information, see [File organization](ht —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
teamDriveId string — — query Deprecated: Use `driveId` instead. —

https://www.googleapis.com/auth/drive.readonly least privilege

8 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive files list
grr drive files list

drive.files.listLabels

GET

grr drive files listLabels files/{fileId}/listLabels

Lists the labels on a file. For more information, see List labels on a file.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID for the file. —
maxResults integer — — query The maximum number of labels to return per page. When not set, defaults to 100. —
pageToken string — — query 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. —

https://www.googleapis.com/auth/drive.readonly least privilege

6 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive files listLabels
grr drive files listLabels --file-id <file-id>

drive.files.modifyLabels

POST

grr drive files modifyLabels files/{fileId}/modifyLabels

Modifies the set of labels applied to a file. For more information, see Set a label field on a file. Returns a list of the labels that were added or modified.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID of the file to which the labels belong. —

https://www.googleapis.com/auth/drive.metadata least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata

grr drive files modifyLabels
grr drive files modifyLabels --file-id <file-id> --body-file ./body.json

drive.files.update

PATCH

grr drive files update files/{fileId}

Updates a file's metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI an

Parameter Type Required Repeated Location Description Enum values
addParents string — — query A comma-separated list of parent IDs to add. —
enforceSingleParent boolean — — query Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead. —
fileId string yes — path The ID of the file. —
includeLabels string — — query A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. —
includePermissionsForView string — — query Specifies which additional view's permissions to include in the response. Only `published` is supported. —
keepRevisionForever boolean — — query 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 th —
ocrLanguage string — — query A language hint for OCR processing during image import (ISO 639-1 code). —
removeParents string — — query A comma-separated list of parent IDs to remove. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
useContentAsIndexableText boolean — — query Whether to use the uploaded content as indexable text. —

https://www.googleapis.com/auth/drive.scripts least privilege

5 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.scripts

grr drive files update
grr drive files update --file-id <file-id> --body-file ./body.json

drive.files.watch

POST

grr drive files watch files/{fileId}/watch

Subscribes to changes to a file. For more information, see Notifications for resource changes.

Parameter Type Required Repeated Location Description Enum values
acknowledgeAbuse boolean — — query Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `medi —
fileId string yes — path The ID of the file. —
includeLabels string — — query A comma-separated list of IDs of labels to include in the `labelInfo` part of the response. —
includePermissionsForView string — — query Specifies which additional view's permissions to include in the response. Only `published` is supported. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —

https://www.googleapis.com/auth/drive.readonly least privilege

8 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive files watch
grr drive files watch --file-id <file-id> --body-file ./body.json

drive.operations

1 method

drive.operations.get

GET

grr drive operations get operations/{name}

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameter Type Required Repeated Location Description Enum values
name string yes — path The name of the operation resource. —

https://www.googleapis.com/auth/drive.readonly least privilege

4 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive operations get
grr drive operations get --name <name>

drive.permissions

5 methods

drive.permissions.create

POST

grr drive permissions create files/{fileId}/permissions

Creates a permission for a file or shared drive. For more information, see Share files, folders, and drives. **Warning:** Concurrent permission modifications (such as update or delete) on the same file, folder, or shared driv

Parameter Type Required Repeated Location Description Enum values
emailMessage string — — query A plain text custom message to include in the notification email. —
enforceExpansiveAccess boolean — — query Deprecated: All requests use the expansive access rules. —
enforceSingleParent boolean — — query Deprecated: See `moveToNewOwnersRoot` for details. —
fileId string yes — path The ID of the file or shared drive. —
moveToNewOwnersRoot boolean — — query This parameter only takes effect if the item isn't in a shared drive and the request is attempting to transfer the ownership of the item. If set to `true`, the —
sendNotificationEmail boolean — — query 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 mu —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
transferOwnership boolean — — query 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 ef —
useDomainAdminAccess boolean — — query Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive permissions create
grr drive permissions create --file-id <file-id> --body-file ./body.json

drive.permissions.delete

DELETE

grr drive permissions delete files/{fileId}/permissions/{permissionId}

Deletes a permission. For more information, see Share files, folders, and drives. **Warning:** Concurrent permission modifications (such as update or delete) on the same file, folder, or shared drive aren't supported across a

Parameter Type Required Repeated Location Description Enum values
enforceExpansiveAccess boolean — — query Deprecated: All requests use the expansive access rules. —
fileId string yes — path The ID of the file or shared drive. —
permissionId string yes — path The ID of the permission. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
useDomainAdminAccess boolean — — query Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive permissions delete
grr drive permissions delete --file-id <file-id> --permission-id <permission-id>

drive.permissions.get

GET

grr drive permissions get files/{fileId}/permissions/{permissionId}

Gets a permission by ID. For more information, see Share files, folders, and drives.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID of the file. —
permissionId string yes — path The ID of the permission. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
useDomainAdminAccess boolean — — query Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file —

https://www.googleapis.com/auth/drive.readonly least privilege

7 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive permissions get
grr drive permissions get --file-id <file-id> --permission-id <permission-id>

drive.permissions.list

GET

grr drive permissions list files/{fileId}/permissions

Lists a file's or shared drive's permissions. For more information, see Share files, folders, and drives.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID of the file or shared drive. —
includePermissionsForView string — — query Specifies which additional view's permissions to include in the response. Only `published` is supported. —
pageSize integer — — query The maximum number of permissions to return. The service may return fewer than this value. If unspecified, at most 100 permissions will be returned for shared d —
pageToken string — — query 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 boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
useDomainAdminAccess boolean — — query Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file —

https://www.googleapis.com/auth/drive.readonly least privilege

7 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive permissions list
grr drive permissions list --file-id <file-id>

drive.permissions.update

PATCH

grr drive permissions update files/{fileId}/permissions/{permissionId}

Updates a permission with patch semantics. For more information, see Share files, folders, and drives. **Warning:** Concurrent permission modifications (such as update or delete) on the same file, folder, or shared drive aren

Parameter Type Required Repeated Location Description Enum values
enforceExpansiveAccess boolean — — query Deprecated: All requests use the expansive access rules. —
fileId string yes — path The ID of the file or shared drive. —
permissionId string yes — path The ID of the permission. —
removeExpiration boolean — — query Whether to remove the expiration date. —
supportsAllDrives boolean — — query Whether the requesting application supports both My Drives and shared drives. —
supportsTeamDrives boolean — — query Deprecated: Use `supportsAllDrives` instead. —
transferOwnership boolean — — query 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 ef —
useDomainAdminAccess boolean — — query Issue the request as a domain administrator. If set to `true`, and if the following additional conditions are met, the requester is granted access: 1. The file —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive permissions update
grr drive permissions update --file-id <file-id> --permission-id <permission-id> --body-file ./body.json

drive.replies

5 methods

drive.replies.create

POST

grr drive replies create files/{fileId}/comments/{commentId}/replies

Creates a reply to a comment. For more information, see Manage comments and replies.

Parameter Type Required Repeated Location Description Enum values
commentId string yes — path The ID of the comment. —
fileId string yes — path The ID of the file. —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive replies create
grr drive replies create --comment-id <comment-id> --file-id <file-id> --body-file ./body.json

drive.replies.delete

DELETE

grr drive replies delete files/{fileId}/comments/{commentId}/replies/{replyId}

Deletes a reply. For more information, see Manage comments and replies.

Parameter Type Required Repeated Location Description Enum values
commentId string yes — path The ID of the comment. —
fileId string yes — path The ID of the file. —
replyId string yes — path The ID of the reply. —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive replies delete
grr drive replies delete --comment-id <comment-id> --file-id <file-id> --reply-id <reply-id>

drive.replies.get

GET

grr drive replies get files/{fileId}/comments/{commentId}/replies/{replyId}

Gets a reply by ID. For more information, see Manage comments and replies.

Parameter Type Required Repeated Location Description Enum values
commentId string yes — path The ID of the comment. —
fileId string yes — path The ID of the file. —
includeDeleted boolean — — query Whether to return deleted replies. Deleted replies don't include their original content. —
replyId string yes — path The ID of the reply. —

https://www.googleapis.com/auth/drive.readonly least privilege

4 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive replies get
grr drive replies get --comment-id <comment-id> --file-id <file-id> --reply-id <reply-id>

drive.replies.list

GET

grr drive replies list files/{fileId}/comments/{commentId}/replies

Lists a comment's replies. For more information, see Manage comments and replies.

Parameter Type Required Repeated Location Description Enum values
commentId string yes — path The ID of the comment. —
fileId string yes — path The ID of the file. —
includeDeleted boolean — — query Whether to include deleted replies. Deleted replies don't include their original content. —
pageSize integer — — query The maximum number of replies to return. The service may return fewer than this value. If unspecified, at most 20 replies will be returned. The maximum value is —
pageToken string — — query 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. —

https://www.googleapis.com/auth/drive.readonly least privilege

4 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive replies list
grr drive replies list --comment-id <comment-id> --file-id <file-id>

drive.replies.update

PATCH

grr drive replies update files/{fileId}/comments/{commentId}/replies/{replyId}

Updates a reply with patch semantics. For more information, see Manage comments and replies.

Parameter Type Required Repeated Location Description Enum values
commentId string yes — path The ID of the comment. —
fileId string yes — path The ID of the file. —
replyId string yes — path The ID of the reply. —

https://www.googleapis.com/auth/drive.file least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file

grr drive replies update
grr drive replies update --comment-id <comment-id> --file-id <file-id> --reply-id <reply-id> --body-file ./body.json

drive.revisions

4 methods

drive.revisions.delete

DELETE

grr 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. For more information, see [Manage file revisions](https

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID of the file. —
revisionId string yes — path The ID of the revision. —

https://www.googleapis.com/auth/drive.file least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file

grr drive revisions delete
grr drive revisions delete --file-id <file-id> --revision-id <revision-id>

drive.revisions.get

GET

grr drive revisions get files/{fileId}/revisions/{revisionId}

Gets a revision's metadata or content by ID. For more information, see Manage file revisions.

Parameter Type Required Repeated Location Description Enum values
acknowledgeAbuse boolean — — query Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when the `alt` parameter is set to `medi —
fileId string yes — path The ID of the file. —
revisionId string yes — path The ID of the revision. —

https://www.googleapis.com/auth/drive.readonly least privilege

8 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive revisions get
grr drive revisions get --file-id <file-id> --revision-id <revision-id>

drive.revisions.list

GET

grr drive revisions list files/{fileId}/revisions

Lists a file's revisions. For more information, see Manage file revisions. **Important:** The list of revisions returned by this method might be incomplete for files with a large revision history, including frequently edite

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID of the file. —
pageSize integer — — query The maximum number of revisions to return. The service may return fewer than this value. If unspecified, at most 200 revisions will be returned. The maximum val —
pageToken string — — query 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. —

https://www.googleapis.com/auth/drive.readonly least privilege

8 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/drive.meet.readonly
  • https://www.googleapis.com/auth/drive.metadata
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.photos.readonly
  • https://www.googleapis.com/auth/drive.readonly

grr drive revisions list
grr drive revisions list --file-id <file-id>

drive.revisions.update

PATCH

grr drive revisions update files/{fileId}/revisions/{revisionId}

Updates a revision with patch semantics. For more information, see Manage file revisions.

Parameter Type Required Repeated Location Description Enum values
fileId string yes — path The ID of the file. —
revisionId string yes — path The ID of the revision. —

https://www.googleapis.com/auth/drive.file least privilege

3 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.appdata
  • https://www.googleapis.com/auth/drive.file

grr drive revisions update
grr drive revisions update --file-id <file-id> --revision-id <revision-id> --body-file ./body.json

drive.teamdrives

5 methods

drive.teamdrives.create

POST

grr drive teamdrives create teamdrives

Deprecated: Use `drives.create` instead.

Parameter Type Required Repeated Location Description Enum values
requestId string yes — query 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 us —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive teamdrives create
grr drive teamdrives create --request-id <request-id> --body-file ./body.json

drive.teamdrives.delete

DELETE

grr drive teamdrives delete teamdrives/{teamDriveId}

Deprecated: Use `drives.delete` instead.

Parameter Type Required Repeated Location Description Enum values
teamDriveId string yes — path The ID of the Team Drive —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive teamdrives delete
grr drive teamdrives delete --team-drive-id <team-drive-id>

drive.teamdrives.get

GET

grr drive teamdrives get teamdrives/{teamDriveId}

Deprecated: Use `drives.get` instead.

Parameter Type Required Repeated Location Description Enum values
teamDriveId string yes — path The ID of the Team Drive —
useDomainAdminAccess boolean — — query 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 T —

https://www.googleapis.com/auth/drive.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.readonly

grr drive teamdrives get
grr drive teamdrives get --team-drive-id <team-drive-id>

drive.teamdrives.list

GET

grr drive teamdrives list teamdrives

Deprecated: Use `drives.list` instead.

Parameter Type Required Repeated Location Description Enum values
pageSize integer — — query Maximum number of Team Drives to return. —
pageToken string — — query Page token for Team Drives. —
q string — — query Query string for searching Team Drives. —
useDomainAdminAccess boolean — — query 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. —

https://www.googleapis.com/auth/drive.readonly least privilege

2 scopes
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.readonly

grr drive teamdrives list
grr drive teamdrives list

drive.teamdrives.update

PATCH

grr drive teamdrives update teamdrives/{teamDriveId}

Deprecated: Use `drives.update` instead.

Parameter Type Required Repeated Location Description Enum values
teamDriveId string yes — path The ID of the Team Drive —
useDomainAdminAccess boolean — — query 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 T —

https://www.googleapis.com/auth/drive least privilege

1 scope
  • https://www.googleapis.com/auth/drive

grr drive teamdrives update
grr drive teamdrives update --team-drive-id <team-drive-id> --body-file ./body.json