v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-136454227.5 KB
files

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.

get/files/{fileId}

Path parameters

fileIdstring required

The ID of the file.

Query parameters

acknowledgeAbuseboolean

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 media and the user is the owner of the file or an organizer of the shared drive in which the file resides.

includeLabelsstring

A comma-separated list of IDs of labels to include in the labelInfo part of the response.

includePermissionsForViewstring

Specifies which additional view's permissions to include in the response. Only published is supported.

supportsAllDrivesboolean

Whether the requesting application supports both My Drives and shared drives.

supportsTeamDrivesboolean

Deprecated: Use supportsAllDrives instead.

Response

Successful response