Module api

Module api 

Source

Structs§

About
Information about the user, the user’s Drive, and system capabilities.
AboutDriveThemes
A list of themes that are supported for shared drives.
AboutGetCall
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.
AboutMethods
A builder providing access to all methods supported on about resources. It is not used directly, but through the DriveHub hub.
AboutStorageQuota
The user’s storage quota limits and usage. For users that are part of an organization with pooled storage, information about the limit and usage across all services is for the organization, rather than the individual user. All fields are measured in bytes.
AboutTeamDriveThemes
Deprecated: Use driveThemes instead.
AccessProposal
Manage outstanding access proposals on a file.
AccessProposalRoleAndView
A wrapper for the role and view of an access proposal. For more information, see Roles and permissions.
AccessproposalGetCall
Retrieves an access proposal by ID. For more information, see Manage pending access proposals.
AccessproposalListCall
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.
AccessproposalMethods
A builder providing access to all methods supported on accessproposal resources. It is not used directly, but through the DriveHub hub.
AccessproposalResolveCall
Approves or denies an access proposal. For more information, see Manage pending access proposals.
App
The apps resource provides a list of apps that a user has installed, with information about each app’s supported MIME types, file extensions, and other details. Some resource methods (such as apps.get) require an appId. Use the apps.list method to retrieve the ID for an installed application.
AppGetCall
Gets a specific app. For more information, see Return user info.
AppIcons
There is no detailed description.
AppList
A list of third-party applications which the user has installed or given access to Google Drive.
AppListCall
Lists a user’s installed apps. For more information, see Return user info.
AppMethods
A builder providing access to all methods supported on app resources. It is not used directly, but through the DriveHub hub.
Approval
Metadata for an approval. An approval is a review/approve process for a Drive item.
ApprovalGetCall
Gets an Approval by ID.
ApprovalList
The response of an Approvals list request.
ApprovalListCall
Lists the Approvals on a file.
ApprovalMethods
A builder providing access to all methods supported on approval resources. It is not used directly, but through the DriveHub hub.
Change
A change to a file or shared drive.
ChangeGetStartPageTokenCall
Gets the starting pageToken for listing future changes. For more information, see Retrieve changes.
ChangeList
A list of changes for a user.
ChangeListCall
Lists the changes for a user or shared drive. For more information, see Retrieve changes.
ChangeMethods
A builder providing access to all methods supported on change resources. It is not used directly, but through the DriveHub hub.
ChangeWatchCall
Subscribes to changes for a user. For more information, see Notifications for resource changes.
Channel
A notification channel used to watch for resource changes.
ChannelMethods
A builder providing access to all methods supported on channel resources. It is not used directly, but through the DriveHub hub.
ChannelStopCall
Stops watching resources through this channel. For more information, see Notifications for resource changes.
Comment
A comment on a file. Some resource methods (such as comments.update) require a commentId. Use the comments.list method to retrieve the ID for a comment in a file.
CommentCreateCall
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.
CommentDeleteCall
Deletes a comment. For more information, see Manage comments and replies.
CommentGetCall
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.
CommentList
A list of comments on a file.
CommentListCall
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.
CommentMethods
A builder providing access to all methods supported on comment resources. It is not used directly, but through the DriveHub hub.
CommentQuotedFileContent
The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
CommentUpdateCall
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.
ContentRestriction
A restriction for accessing the content of the file.
DownloadRestriction
A restriction for copy and download of the file.
DownloadRestrictionsMetadata
Download restrictions applied to the file.
Drive
Representation of a shared drive. Some resource methods (such as drives.update) require a driveId. Use the drives.list method to retrieve the ID for a shared drive.
DriveBackgroundImageFile
An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on drive.drives.update requests that don’t set themeId. When specified, all fields of the backgroundImageFile must be set.
DriveCapabilities
Output only. Capabilities the current user has on this shared drive.
DriveCreateCall
Creates a shared drive. For more information, see Manage shared drives.
DriveDeleteCall
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.
DriveGetCall
Gets a shared drive’s metadata by ID. For more information, see Manage shared drives.
DriveHideCall
Hides a shared drive from the default view. For more information, see Manage shared drives.
DriveHub
Central instance to access all DriveHub related resource activities
DriveList
A list of shared drives.
DriveListCall
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.
DriveMethods
A builder providing access to all methods supported on drive resources. It is not used directly, but through the DriveHub hub.
DriveRestrictions
A set of restrictions that apply to this shared drive or items inside this shared drive. Note that restrictions can’t be set when creating a shared drive. To add a restriction, first create a shared drive and then use drives.update to add restrictions.
DriveUnhideCall
Restores a shared drive to the default view. For more information, see Manage shared drives.
DriveUpdateCall
Updates the metadata for a shared drive. For more information, see Manage shared drives.
File
The metadata for a file. Some resource methods (such as files.update) require a fileId. Use the files.list method to retrieve the ID for a file.
FileCapabilities
Output only. Capabilities the current user has on this file. Each capability corresponds to a fine-grained action that a user may take. For more information, see Understand file capabilities.
FileContentHints
Additional information about the content of the file. These fields are never populated in responses.
FileContentHintsThumbnail
A thumbnail for the file. This will only be used if Google Drive cannot generate a standard thumbnail.
FileCopyCall
Creates a copy of a file and applies any requested updates with patch semantics. For more information, see Create and manage files.
FileCreateCall
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: */* (Specify a valid MIME type, rather than the literal */* value. The literal */* is only used to indicate that any valid MIME type can be uploaded. For more information, see Google Workspace and Google Drive supported MIME types.) For more information on uploading files, see Upload file data. Apps creating shortcuts with the create method must specify the MIME type application/vnd.google-apps.shortcut. Apps should specify a file extension in the name property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "name": "cat.jpg" in the metadata. Subsequent GET requests include the read-only fileExtension property populated with the extension originally specified in the name property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the name. In cases where the extension is missing, Drive attempts to determine the extension based on the file’s MIME type.
FileDeleteCall
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 the target is a folder, all descendants owned by the user are also deleted.
FileDownloadCall
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.
FileEmptyTrashCall
Permanently deletes all of the user’s trashed files. For more information, see Trash or delete files and folders.
FileExportCall
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.
FileGenerateIdCall
Generates a set of file IDs which can be provided in create or copy requests. For more information, see Create and manage files.
FileGetCall
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 content with alt=media only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use files.export instead. For more information, see Download and export files.
FileImageMediaMetadata
Output only. Additional metadata about image media, if available.
FileImageMediaMetadataLocation
Output only. Geographic location information stored in the image.
FileLabelInfo
Output only. An overview of the labels on the file.
FileLinkShareMetadata
Contains details about the link URLs that clients are using to refer to this item.
FileList
A list of files.
FileListCall
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, including trashed files. If you don’t want trashed files to appear in the list, use the trashed=false query parameter to remove trashed files from the results.
FileListLabelCall
Lists the labels on a file. For more information, see List labels on a file.
FileMethods
A builder providing access to all methods supported on file resources. It is not used directly, but through the DriveHub hub.
FileModifyLabelCall
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.
FileShortcutDetails
Shortcut file details. Only populated for shortcut files, which have the mimeType field set to application/vnd.google-apps.shortcut. Can only be set on files.create requests.
FileUpdateCall
Updates a file’s metadata, content, or both. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as modifiedDate. This method supports patch semantics. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types: */* (Specify a valid MIME type, rather than the literal */* value. The literal */* is only used to indicate that any valid MIME type can be uploaded. For more information, see Google Workspace and Google Drive supported MIME types.) For more information on uploading files, see Upload file data.
FileVideoMediaMetadata
Output only. Additional metadata about video media. This may not be available immediately upon upload.
FileWatchCall
Subscribes to changes to a file. For more information, see Notifications for resource changes.
GeneratedIds
A list of generated file IDs which can be provided in create requests.
Label
Representation of label and label fields.
LabelField
Representation of field, which is a typed key-value pair.
LabelFieldModification
A modification to a label’s field.
LabelList
A list of labels applied to a file.
LabelModification
A modification to a label on a file. A LabelModification can be used to apply a label to a file, update an existing label on a file, or remove a label from a file.
ListAccessProposalsResponse
The response to an access proposal list request.
ModifyLabelsRequest
A request to modify the set of labels on a file. This request may contain many modifications that will either all succeed or all fail atomically.
ModifyLabelsResponse
Response to a ModifyLabels request. This contains only those labels which were added or updated by the request.
Operation
This resource represents a long-running operation that is the result of a network API call.
OperationGetCall
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.
OperationMethods
A builder providing access to all methods supported on operation resources. It is not used directly, but through the DriveHub hub.
Permission
A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. For more information, see Share files, folders, and drives. By default, permission requests only return a subset of fields. Permission kind, ID, type, and role are always returned. To retrieve specific fields, see Return specific fields. Some resource methods (such as permissions.update) require a permissionId. Use the permissions.list method to retrieve the ID for a file, folder, or shared drive.
PermissionCreateCall
Creates a permission for a file or shared drive. For more information, see Share files, folders, and drives. Warning: Concurrent permissions operations on the same file aren’t supported; only the last update is applied.
PermissionDeleteCall
Deletes a permission. For more information, see Share files, folders, and drives. Warning: Concurrent permissions operations on the same file aren’t supported; only the last update is applied.
PermissionGetCall
Gets a permission by ID. For more information, see Share files, folders, and drives.
PermissionList
A list of permissions for a file.
PermissionListCall
Lists a file’s or shared drive’s permissions. For more information, see Share files, folders, and drives.
PermissionMethods
A builder providing access to all methods supported on permission resources. It is not used directly, but through the DriveHub hub.
PermissionPermissionDetails
Output only. Details of whether the permissions on this item are inherited or are directly on this item.
PermissionTeamDrivePermissionDetails
Output only. Deprecated: Output only. Use permissionDetails instead.
PermissionUpdateCall
Updates a permission with patch semantics. For more information, see Share files, folders, and drives. Warning: Concurrent permissions operations on the same file aren’t supported; only the last update is applied.
Reply
A reply to a comment on a file. Some resource methods (such as replies.update) require a replyId. Use the replies.list method to retrieve the ID for a reply.
ReplyCreateCall
Creates a reply to a comment. For more information, see Manage comments and replies.
ReplyDeleteCall
Deletes a reply. For more information, see Manage comments and replies.
ReplyGetCall
Gets a reply by ID. For more information, see Manage comments and replies.
ReplyList
A list of replies to a comment on a file.
ReplyListCall
Lists a comment’s replies. For more information, see Manage comments and replies.
ReplyMethods
A builder providing access to all methods supported on reply resources. It is not used directly, but through the DriveHub hub.
ReplyUpdateCall
Updates a reply with patch semantics. For more information, see Manage comments and replies.
ResolveAccessProposalRequest
Request message for resolving an AccessProposal on a file.
ReviewerResponse
A response on an Approval made by a specific Reviewer.
Revision
The metadata for a revision to a file. Some resource methods (such as revisions.update) require a revisionId. Use the revisions.list method to retrieve the ID for a revision.
RevisionDeleteCall
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.
RevisionGetCall
Gets a revision’s metadata or content by ID. For more information, see Manage file revisions.
RevisionList
A list of revisions of a file.
RevisionListCall
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 edited Google Docs, Sheets, and Slides. Older revisions might be omitted from the response, meaning the first revision returned may not be the oldest existing revision. The revision history visible in the Workspace editor user interface might be more complete than the list returned by the API.
RevisionMethods
A builder providing access to all methods supported on revision resources. It is not used directly, but through the DriveHub hub.
RevisionUpdateCall
Updates a revision with patch semantics. For more information, see Manage file revisions.
StartPageToken
There is no detailed description.
Status
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
TeamDrive
Deprecated: use the drive collection instead.
TeamDriveBackgroundImageFile
An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on drive.teamdrives.update requests that don’t set themeId. When specified, all fields of the backgroundImageFile must be set.
TeamDriveCapabilities
Capabilities the current user has on this Team Drive.
TeamDriveList
A list of Team Drives.
TeamDriveRestrictions
A set of restrictions that apply to this Team Drive or items inside this Team Drive.
TeamdriveCreateCall
Deprecated: Use drives.create instead.
TeamdriveDeleteCall
Deprecated: Use drives.delete instead.
TeamdriveGetCall
Deprecated: Use drives.get instead.
TeamdriveListCall
Deprecated: Use drives.list instead.
TeamdriveMethods
A builder providing access to all methods supported on teamdrive resources. It is not used directly, but through the DriveHub hub.
TeamdriveUpdateCall
Deprecated: Use drives.update instead.
User
Information about a Drive user.

Enums§

Scope
Identifies the an OAuth2 authorization scope. A scope is needed when requesting an authorization token.