The apps resource provides a list of the 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 reference to a folder’s child. Some resource methods (such as children.get) require a childId. Use the children.list method to retrieve the ID of the child.
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.
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.
Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive, the user must be an organizer on the parent folder. If the target is a folder, all descendants owned by the user are also deleted.
Gets a file’s metadata or content by ID. 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 & export files.
Output only. Metadata about image media. This will only be present for image types, and its contents will depend on what can be parsed from the image content.
Inserts a new file. This method supports an /upload URI and accepts uploaded media with the following characteristics: - Maximum file size: 5,120 GB - Accepted Media MIME types:*/* Note: 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 on uploading files, see Upload file data. Apps creating shortcuts with files.insert must specify the MIME type application/vnd.google-apps.shortcut. Apps should specify a file extension in the title property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like "title": "cat.jpg" in the metadata. Subsequent GET requests include the read-only fileExtension property populated with the extension originally specified in the title 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 title. In cases where the extension is missing, Drive attempts to determine the extension based on the file’s MIME type.
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.
Updates a file’s metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might change automatically, such as modifiedDate. This method supports patch semantics.
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.insert requests.
Restores a file from the trash. The currently authenticated user must own the file or be at least a fileOrganizer on the parent for shared drive files.
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.
A reference to a file’s parent. A file can only have one parent folder; specifying multiple parents isn’t supported. Some resource methods (such as parents.get) require a parentId. Use the parents.list method to retrieve the ID for a parent.
A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. 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.
Deletes a permission from a file or shared drive. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
Inserts a permission for a file or shared drive. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
Updates a permission using patch semantics. Warning: Concurrent permissions operations on the same file are not supported; only the last update is applied.
A key-value pair attached to a file that is either public or private to an application. The following limits apply to file properties: * Maximum of 100 properties total per file * Maximum of 30 private properties per app * Maximum of 30 public properties * Maximum of 124 bytes size limit on (key + value) string in UTF-8 encoding for a single property Some resource methods (such as properties.update) require a propertyKey. Use the properties.list method to retrieve the key for a property.
A revision of 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, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can’t be deleted.
Lists a file’s 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.
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.