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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.