openapi: 3.1.0
info:
title: Google Books About Files API
description: API for retrieving Bookshelf and Volume resources from Google Books
version: 1.0.0
contact:
name: Google Books API
url: https://developers.google.com/books
servers:
- url: https://www.googleapis.com/books/v1
description: Google Books API v1
tags:
- name: Files
description: Operations related to Files
paths:
/files:
get:
tags:
- Files
summary: Google Get Files
description: ' Lists the user''s files. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for files & folders](/drive/api/guides/search-files) guide. *Note:* 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.'
operationId: googleDriveFilesList
security:
- Oauth2:
- https://www.googleapis.com/auth/drive
Oauth2c:
- https://www.googleapis.com/auth/drive
- Oauth2:
- https://www.googleapis.com/auth/drive.appdata
Oauth2c:
- https://www.googleapis.com/auth/drive.appdata
- Oauth2:
- https://www.googleapis.com/auth/drive.file
Oauth2c:
- https://www.googleapis.com/auth/drive.file
- Oauth2:
- https://www.googleapis.com/auth/drive.metadata
Oauth2c:
- https://www.googleapis.com/auth/drive.metadata
- Oauth2:
- https://www.googleapis.com/auth/drive.metadata.readonly
Oauth2c:
- https://www.googleapis.com/auth/drive.metadata.readonly
- Oauth2:
- https://www.googleapis.com/auth/drive.photos.readonly
Oauth2c:
- https://www.googleapis.com/auth/drive.photos.readonly
- Oauth2:
- https://www.googleapis.com/auth/drive.readonly
Oauth2c:
- https://www.googleapis.com/auth/drive.readonly
parameters:
- description: Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'q' parameter.
in: query
name: corpora
schema:
type: string
- description: 'Deprecated: The source of files to list. Use ''corpora'' instead.'
in: query
name: corpus
schema:
enum:
- domain
- user
type: string
- description: ID of the shared drive to search.
in: query
name: driveId
schema:
type: string
- description: Whether both My Drive and shared drive items should be included in results.
in: query
name: includeItemsFromAllDrives
schema:
type: boolean
- description: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
in: query
name: includeLabels
schema:
type: string
- description: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
in: query
name: includePermissionsForView
schema:
type: string
- description: 'Deprecated: Use `includeItemsFromAllDrives` instead.'
in: query
name: includeTeamDriveItems
schema:
type: boolean
- description: 'A comma-separated list of sort keys. Valid keys are ''createdTime'', ''folder'', ''modifiedByMeTime'', ''modifiedTime'', ''name'', ''name_natural'', ''quotaBytesUsed'', ''recency'', ''sharedWithMeTime'', ''starred'', and ''viewedByMeTime''. Each key sorts ascending by default, but can be reversed with the ''desc'' modifier. Example usage: ?orderBy=folder,modifiedTime desc,name.'
in: query
name: orderBy
schema:
type: string
- description: 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.
in: query
name: pageSize
schema:
maximum: 1000
minimum: 1
type: integer
- description: The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
in: query
name: pageToken
schema:
type: string
- description: A query for filtering the file results. See the "Search for files & folders" guide for supported syntax.
in: query
name: q
schema:
type: string
- description: A comma-separated list of spaces to query within the corpora. Supported values are 'drive' and 'appDataFolder'.
in: query
name: spaces
schema:
type: string
- description: Whether the requesting application supports both My Drives and shared drives.
in: query
name: supportsAllDrives
schema:
type: boolean
- description: 'Deprecated: Use `supportsAllDrives` instead.'
in: query
name: supportsTeamDrives
schema:
type: boolean
- description: 'Deprecated: Use `driveId` instead.'
in: query
name: teamDriveId
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- description: V1 error format.
in: query
name: $.xgafv
schema:
enum:
- '1'
- '2'
type: string
- description: OAuth access token.
in: query
name: access_token
schema:
type: string
- description: Data format for response.
in: query
name: alt
schema:
enum:
- json
- media
- proto
type: string
- description: JSONP
in: query
name: callback
schema:
type: string
- description: Selector specifying which fields to include in a partial response.
in: query
name: fields
schema:
type: string
- description: 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.
in: query
name: key
schema:
type: string
- description: OAuth 2.0 token for the current user.
in: query
name: oauth_token
schema:
type: string
- description: Returns response with indentations and line breaks.
in: query
name: prettyPrint
schema:
type: boolean
- description: 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.
in: query
name: quotaUser
schema:
type: string
- description: Upload protocol for media (e.g. "raw", "multipart").
in: query
name: upload_protocol
schema:
type: string
- description: Legacy upload protocol for media (e.g. "media", "multipart").
in: query
name: uploadType
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/FileList'
x-api-evangelist-certified: '2025-07-18'
x-api-naftiko-published: '2025-07-18'
x-microcks-operation:
delay: 100
dispatcher: FALLBACK
dispatcherRules: SuccessExample
post:
tags:
- Files
summary: Google Post Files
description: ' Creates 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](/drive/api/guides/manage-uploads). Apps creating shortcuts with `files.create` 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 `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.'
operationId: googleDriveFilesCreate
security:
- Oauth2:
- https://www.googleapis.com/auth/drive
Oauth2c:
- https://www.googleapis.com/auth/drive
- Oauth2:
- https://www.googleapis.com/auth/drive.appdata
Oauth2c:
- https://www.googleapis.com/auth/drive.appdata
- Oauth2:
- https://www.googleapis.com/auth/drive.file
Oauth2c:
- https://www.googleapis.com/auth/drive.file
parameters:
- description: Deprecated. Creating files in multiple folders is no longer supported.
in: query
name: enforceSingleParent
schema:
type: boolean
- description: Whether to ignore the domain's default visibility settings for the created file. Domain administrators can choose to make all uploaded files visible to the domain by default; this parameter bypasses that behavior for the request. Permissions are still inherited from parent folders.
in: query
name: ignoreDefaultVisibility
schema:
type: boolean
- description: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
in: query
name: includeLabels
schema:
type: string
- description: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
in: query
name: includePermissionsForView
schema:
type: string
- description: Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
in: query
name: keepRevisionForever
schema:
type: boolean
- description: A language hint for OCR processing during image import (ISO 639-1 code).
in: query
name: ocrLanguage
schema:
type: string
- description: Whether the requesting application supports both My Drives and shared drives.
in: query
name: supportsAllDrives
schema:
type: boolean
- description: 'Deprecated: Use `supportsAllDrives` instead.'
in: query
name: supportsTeamDrives
schema:
type: boolean
- description: Whether to use the uploaded content as indexable text.
in: query
name: useContentAsIndexableText
schema:
type: boolean
- in: header
name: Authorization
schema:
type: string
- description: V1 error format.
in: query
name: $.xgafv
schema:
enum:
- '1'
- '2'
type: string
- description: OAuth access token.
in: query
name: access_token
schema:
type: string
- description: Data format for response.
in: query
name: alt
schema:
enum:
- json
- media
- proto
type: string
- description: JSONP
in: query
name: callback
schema:
type: string
- description: Selector specifying which fields to include in a partial response.
in: query
name: fields
schema:
type: string
- description: 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.
in: query
name: key
schema:
type: string
- description: OAuth 2.0 token for the current user.
in: query
name: oauth_token
schema:
type: string
- description: Returns response with indentations and line breaks.
in: query
name: prettyPrint
schema:
type: boolean
- description: 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.
in: query
name: quotaUser
schema:
type: string
- description: Upload protocol for media (e.g. "raw", "multipart").
in: query
name: upload_protocol
schema:
type: string
- description: Legacy upload protocol for media (e.g. "media", "multipart").
in: query
name: uploadType
schema:
type: string
requestBody:
content:
application/octet-stream:
schema:
$ref: '#/components/schemas/File'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/File'
x-microcks-operation:
delay: 100
dispatcher: FALLBACK
dispatcherRules: SuccessExample
/files/generateIds:
get:
tags:
- Files
summary: Google Get Files Generateids
description: Generates a set of file IDs which can be provided in create or copy requests.
operationId: googleDriveFilesGenerateids
security:
- Oauth2:
- https://www.googleapis.com/auth/drive
Oauth2c:
- https://www.googleapis.com/auth/drive
- Oauth2:
- https://www.googleapis.com/auth/drive.appdata
Oauth2c:
- https://www.googleapis.com/auth/drive.appdata
- Oauth2:
- https://www.googleapis.com/auth/drive.file
Oauth2c:
- https://www.googleapis.com/auth/drive.file
parameters:
- description: The number of IDs to return.
in: query
name: count
schema:
maximum: 1000
minimum: 1
type: integer
- description: 'The space in which the IDs can be used to create new files. Supported values are ''drive'' and ''appDataFolder''. (Default: ''drive'')'
in: query
name: space
schema:
type: string
- description: 'The type of items which the IDs can be used for. Supported values are ''files'' and ''shortcuts''. Note that ''shortcuts'' are only supported in the `drive` ''space''. (Default: ''files'')'
in: query
name: type
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- description: V1 error format.
in: query
name: $.xgafv
schema:
enum:
- '1'
- '2'
type: string
- description: OAuth access token.
in: query
name: access_token
schema:
type: string
- description: Data format for response.
in: query
name: alt
schema:
enum:
- json
- media
- proto
type: string
- description: JSONP
in: query
name: callback
schema:
type: string
- description: Selector specifying which fields to include in a partial response.
in: query
name: fields
schema:
type: string
- description: 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.
in: query
name: key
schema:
type: string
- description: OAuth 2.0 token for the current user.
in: query
name: oauth_token
schema:
type: string
- description: Returns response with indentations and line breaks.
in: query
name: prettyPrint
schema:
type: boolean
- description: 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.
in: query
name: quotaUser
schema:
type: string
- description: Upload protocol for media (e.g. "raw", "multipart").
in: query
name: upload_protocol
schema:
type: string
- description: Legacy upload protocol for media (e.g. "media", "multipart").
in: query
name: uploadType
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/GeneratedIds'
x-microcks-operation:
delay: 100
dispatcher: FALLBACK
dispatcherRules: SuccessExample
/files/trash:
delete:
tags:
- Files
summary: Google Delete Files Trash
description: Permanently deletes all of the user's trashed files.
operationId: googleDriveFilesEmptytrash
security:
- Oauth2:
- https://www.googleapis.com/auth/drive
Oauth2c:
- https://www.googleapis.com/auth/drive
parameters:
- description: If set, empties the trash of the provided shared drive.
in: query
name: driveId
schema:
type: string
- description: 'Deprecated: If an item is not in a shared drive and its last parent is deleted but the item itself is not, the item will be placed under its owner''s root.'
in: query
name: enforceSingleParent
schema:
type: boolean
- in: header
name: Authorization
schema:
type: string
- description: V1 error format.
in: query
name: $.xgafv
schema:
enum:
- '1'
- '2'
type: string
- description: OAuth access token.
in: query
name: access_token
schema:
type: string
- description: Data format for response.
in: query
name: alt
schema:
enum:
- json
- media
- proto
type: string
- description: JSONP
in: query
name: callback
schema:
type: string
- description: Selector specifying which fields to include in a partial response.
in: query
name: fields
schema:
type: string
- description: 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.
in: query
name: key
schema:
type: string
- description: OAuth 2.0 token for the current user.
in: query
name: oauth_token
schema:
type: string
- description: Returns response with indentations and line breaks.
in: query
name: prettyPrint
schema:
type: boolean
- description: 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.
in: query
name: quotaUser
schema:
type: string
- description: Upload protocol for media (e.g. "raw", "multipart").
in: query
name: upload_protocol
schema:
type: string
- description: Legacy upload protocol for media (e.g. "media", "multipart").
in: query
name: uploadType
schema:
type: string
responses:
'200':
description: Successful response
x-microcks-operation:
delay: 100
dispatcher: FALLBACK
dispatcherRules: SuccessExample
/files/{fileId}:
get:
tags:
- Files
summary: Google Get Files Fileid
description: ' 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`](/drive/api/reference/rest/v3/files/export) instead. For more information, see [Download & export files](/drive/api/guides/manage-downloads).'
operationId: googleDriveFilesGet
security:
- Oauth2:
- https://www.googleapis.com/auth/drive
Oauth2c:
- https://www.googleapis.com/auth/drive
- Oauth2:
- https://www.googleapis.com/auth/drive.appdata
Oauth2c:
- https://www.googleapis.com/auth/drive.appdata
- Oauth2:
- https://www.googleapis.com/auth/drive.file
Oauth2c:
- https://www.googleapis.com/auth/drive.file
- Oauth2:
- https://www.googleapis.com/auth/drive.metadata
Oauth2c:
- https://www.googleapis.com/auth/drive.metadata
- Oauth2:
- https://www.googleapis.com/auth/drive.metadata.readonly
Oauth2c:
- https://www.googleapis.com/auth/drive.metadata.readonly
- Oauth2:
- https://www.googleapis.com/auth/drive.photos.readonly
Oauth2c:
- https://www.googleapis.com/auth/drive.photos.readonly
- Oauth2:
- https://www.googleapis.com/auth/drive.readonly
Oauth2c:
- https://www.googleapis.com/auth/drive.readonly
parameters:
- description: The ID of the file.
in: path
name: fileId
required: true
schema:
type: string
- description: Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
in: query
name: acknowledgeAbuse
schema:
type: boolean
- description: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
in: query
name: includeLabels
schema:
type: string
- description: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
in: query
name: includePermissionsForView
schema:
type: string
- description: Whether the requesting application supports both My Drives and shared drives.
in: query
name: supportsAllDrives
schema:
type: boolean
- description: 'Deprecated: Use `supportsAllDrives` instead.'
in: query
name: supportsTeamDrives
schema:
type: boolean
- in: header
name: Authorization
schema:
type: string
- description: V1 error format.
in: query
name: $.xgafv
schema:
enum:
- '1'
- '2'
type: string
- description: OAuth access token.
in: query
name: access_token
schema:
type: string
- description: Data format for response.
in: query
name: alt
schema:
enum:
- json
- media
- proto
type: string
- description: JSONP
in: query
name: callback
schema:
type: string
- description: Selector specifying which fields to include in a partial response.
in: query
name: fields
schema:
type: string
- description: 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.
in: query
name: key
schema:
type: string
- description: OAuth 2.0 token for the current user.
in: query
name: oauth_token
schema:
type: string
- description: Returns response with indentations and line breaks.
in: query
name: prettyPrint
schema:
type: boolean
- description: 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.
in: query
name: quotaUser
schema:
type: string
- description: Upload protocol for media (e.g. "raw", "multipart").
in: query
name: upload_protocol
schema:
type: string
- description: Legacy upload protocol for media (e.g. "media", "multipart").
in: query
name: uploadType
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/File'
x-api-evangelist-certified: '2025-07-18'
x-api-naftiko-published: '2025-07-18'
x-microcks-operation:
delay: 100
dispatcher: FALLBACK
dispatcherRules: SuccessExample
patch:
tags:
- Files
summary: Google Patch Files Fileid
description: ' 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 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:*`*/*` 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](/drive/api/guides/manage-uploads).'
operationId: googleDriveFilesUpdate
security:
- Oauth2:
- https://www.googleapis.com/auth/drive
Oauth2c:
- https://www.googleapis.com/auth/drive
- Oauth2:
- https://www.googleapis.com/auth/drive.appdata
Oauth2c:
- https://www.googleapis.com/auth/drive.appdata
- Oauth2:
- https://www.googleapis.com/auth/drive.file
Oauth2c:
- https://www.googleapis.com/auth/drive.file
- Oauth2:
- https://www.googleapis.com/auth/drive.metadata
Oauth2c:
- https://www.googleapis.com/auth/drive.metadata
- Oauth2:
- https://www.googleapis.com/auth/drive.scripts
Oauth2c:
- https://www.googleapis.com/auth/drive.scripts
parameters:
- description: The ID of the file.
in: path
name: fileId
required: true
schema:
type: string
- description: A comma-separated list of parent IDs to add.
in: query
name: addParents
schema:
type: string
- description: 'Deprecated: Adding files to multiple folders is no longer supported. Use shortcuts instead.'
in: query
name: enforceSingleParent
schema:
type: boolean
- description: A comma-separated list of IDs of labels to include in the `labelInfo` part of the response.
in: query
name: includeLabels
schema:
type: string
- description: Specifies which additional view's permissions to include in the response. Only 'published' is supported.
in: query
name: includePermissionsForView
schema:
type: string
- description: Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions.
in: query
name: keepRevisionForever
schema:
type: boolean
- description: A language hint for OCR processing during image import (ISO 639-1 code).
in: query
name: ocrLanguage
schema:
type: string
- description: A comma-separated list of parent IDs to remove.
in: query
name: removeParents
schema:
type: string
- description: Whether the requesting application supports both My Drives and shared drives.
in: query
name: supportsAllDrives
schema:
type: boolean
- description: 'Deprecated: Use `supportsAllDrives` instead.'
in: query
name: supportsTeamDrives
schema:
type: boolean
- description: Whether to use the uploaded content as indexable text.
in: query
name: useContentAsIndexableText
schema:
type: boolean
- in: header
name: Authorization
schema:
type: string
- description: V1 error format.
in: query
name: $.xgafv
schema:
enum:
- '1'
- '2'
type: string
- description: OAuth access token.
in: query
name: access_token
schema:
type: string
- description: Data format for response.
in: query
name: alt
schema:
enum:
- json
- media
- proto
type: string
- description: JSONP
in: query
name: callback
schema:
type: string
- description: Selector specifying which fields to include in a partial response.
in: query
name: fields
schema:
type: string
- description: 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.
in: query
name: key
schema:
type: string
- description: OAuth 2.0 token for the current user.
in: query
name: oauth_token
schema:
type: string
- description: Returns response with indentations and line breaks.
in: query
name: prettyPrint
schema:
type: boolean
- description: 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.
in: query
name: quotaUser
schema:
type: string
- description: Upload protocol for media (e.g. "raw", "multipart").
in: query
name: upload_protocol
schema:
type: string
- description: Legacy upload protocol for media (e.g. "media", "multipart").
in: query
name: uploadType
schema:
type: string
requestBody:
content:
application/octet-stream:
schema:
$ref: '#/components/schemas/File'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/File'
x-microcks-operation:
delay: 100
dispatcher: FALLBACK
dispatcherRules: SuccessExample
delete:
tags:
- Files
summary: Google Delete Files Fileid
description: 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.
operationId: googleDriveFilesDelete
security:
- Oauth2:
- https://www.googleapis.com/auth/drive
Oauth2c:
- https://www.googleapis.com/auth/drive
- Oauth2:
- https://www.googleapis.com/auth/drive.appdata
Oauth2c:
- https://www.googleapis.com/auth/drive.appdata
- Oauth2:
- https://www.googl
# --- truncated at 32 KB (101 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/google/refs/heads/main/openapi/google-files-api-openapi.yml