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, 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.
Parameters
query Query Parameters
| Name | Type |
|---|---|
corpora Bodies of items (files or documents) to which the query applies. Supported bodies are: * | string |
corpus Deprecated: The source of files to list. Use | "domain" | "user" |
driveId ID of the shared drive to search. | string |
includeItemsFromAllDrives Whether both My Drive and shared drive items should be included in results. | boolean |
includeLabels A comma-separated list of IDs of labels to include in the | string |
includePermissionsForView Specifies which additional view's permissions to include in the response. Only | string |
includeTeamDriveItems Deprecated: Use | boolean |
orderBy A comma-separated list of sort keys. Valid keys are: * | string |
pageSize The maximum number of files to return per page. Partial or empty result pages are possible even before the end of the files list has been reached. | number |
pageToken The token for continuing a previous list request on the next page. This should be set to the value of | string |
q A query for filtering the file results. For supported syntax, see Search for files and folders. | string |
spaces A comma-separated list of spaces to query within the corpora. Supported values are | string |
supportsAllDrives Whether the requesting application supports both My Drives and shared drives. | boolean |
supportsTeamDrives Deprecated: Use | boolean |
teamDriveId Deprecated: Use | string |
access_token OAuth access token. | string |
alt Data format for response. | "json" | "media" | "proto" |
callback JSONP | string |
fields Selector specifying which fields to include in a partial response. | string |
key API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. | string |
oauth_token OAuth 2.0 token for the current user. | string |
prettyPrint Returns response with indentations and line breaks. | boolean |
quotaUser Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. | string |
upload_protocol Upload protocol for media (e.g. "raw", "multipart"). | string |
uploadType Legacy upload protocol for media (e.g. "media", "multipart"). | string |
$.xgafv V1 error format. | "1" | "2" |
Responses
Successful response
files?:
incompleteSearch?: boolean;
kind?: string;
nextPageToken?: string;
}