Google Drive Revisions API
The revisions API from Google Drive — 2 operation(s) for revisions.
The revisions API from Google Drive — 2 operation(s) for revisions.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/google-drive:google-drive-revisions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Google Drive Revisions API
description: The Google Drive API allows clients to access resources from Google Drive.
version: v3
contact:
name: Google
url: https://developers.google.com/workspace/drive/
termsOfService: https://developers.google.com/terms
x-generated-from: google-discovery
x-source: https://www.googleapis.com/discovery/v1/apis/drive/v3/rest
x-discovery-revision: '20261102'
x-generated: '2026-11-04'
servers:
- url: https://www.googleapis.com/drive/v3
description: Google Drive REST API v3
security:
- oauth2: []
tags:
- name: Revisions
paths:
/files/{fileId}/revisions/{revisionId}:
delete:
operationId: deleteRevision
summary: Permanently deletes a file version
description: 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.
tags:
- Revisions
x-discovery-id: drive.revisions.delete
parameters:
- name: fileId
in: path
required: true
schema:
type: string
description: The ID of the file.
- name: revisionId
in: path
required: true
schema:
type: string
description: The ID of the revision.
responses:
'200':
description: Successful response
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.appdata
- https://www.googleapis.com/auth/drive.file
patch:
operationId: updateRevision
summary: Updates a revision with patch semantics
description: Updates a revision with patch semantics. For more information, see Manage file revisions.
tags:
- Revisions
x-discovery-id: drive.revisions.update
parameters:
- name: fileId
in: path
required: true
schema:
type: string
description: The ID of the file.
- name: revisionId
in: path
required: true
schema:
type: string
description: The ID of the revision.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Revision'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Revision'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.appdata
- https://www.googleapis.com/auth/drive.file
get:
operationId: getRevision
summary: Gets a revision's metadata or content by ID
description: Gets a revision's metadata or content by ID. For more information, see Manage file revisions.
tags:
- Revisions
x-discovery-id: drive.revisions.get
parameters:
- name: fileId
in: path
required: true
schema:
type: string
description: The ID of the file.
- name: revisionId
in: path
required: true
schema:
type: string
description: The ID of the revision.
- name: acknowledgeAbuse
in: query
required: false
schema:
type: boolean
default: 'false'
description: 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.
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Revision'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.appdata
- https://www.googleapis.com/auth/drive.file
- https://www.googleapis.com/auth/drive.meet.readonly
- https://www.googleapis.com/auth/drive.metadata
- https://www.googleapis.com/auth/drive.metadata.readonly
- https://www.googleapis.com/auth/drive.photos.readonly
- https://www.googleapis.com/auth/drive.readonly
/files/{fileId}/revisions:
get:
operationId: listRevisions
summary: Lists a file's revisions
description: 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.
tags:
- Revisions
x-discovery-id: drive.revisions.list
parameters:
- name: fileId
in: path
required: true
schema:
type: string
description: The ID of the file.
- name: pageToken
in: query
required: false
schema:
type: string
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.
- name: pageSize
in: query
required: false
schema:
type: integer
format: int32
default: '200'
description: The maximum number of revisions to return. The service may return fewer than this value. If unspecified, at most 200 revisions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/RevisionList'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- oauth2:
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.appdata
- https://www.googleapis.com/auth/drive.file
- https://www.googleapis.com/auth/drive.meet.readonly
- https://www.googleapis.com/auth/drive.metadata
- https://www.googleapis.com/auth/drive.metadata.readonly
- https://www.googleapis.com/auth/drive.photos.readonly
- https://www.googleapis.com/auth/drive.readonly
components:
schemas:
User:
type: object
description: Information about a Drive user.
properties:
photoLink:
type: string
description: Output only. A link to the user's profile photo, if available.
readOnly: true
emailAddress:
type: string
description: Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
readOnly: true
me:
type: boolean
description: Output only. Whether this user is the requesting user.
readOnly: true
displayName:
type: string
description: Output only. A plain text displayable name for this user.
readOnly: true
kind:
type: string
description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.'
default: drive#user
readOnly: true
permissionId:
type: string
description: Output only. The user's ID as visible in Permission resources.
readOnly: true
Revision:
type: object
description: 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.
properties:
keepForever:
type: boolean
description: Whether to keep this revision forever, even if it is no longer the head revision. If not set, the revision will be automatically purged 30 days after newer content is uploaded. This can be set on a maximum of 200 revisions for a file. This field is only applicable to files with binary content in Drive.
mimeType:
type: string
description: Output only. The MIME type of the revision.
publishedOutsideDomain:
type: boolean
description: Whether this revision is published outside the domain. This is only applicable to Docs Editors files.
publishAuto:
type: boolean
description: Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.
modifiedTime:
type: string
description: The last time the revision was modified (RFC 3339 date-time).
format: date-time
publishedLink:
type: string
description: Output only. A link to the published revision. This is only populated for Docs Editors files.
size:
type: string
description: Output only. The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
format: int64
kind:
type: string
description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#revision"`.'
default: drive#revision
md5Checksum:
type: string
description: Output only. The MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
originalFilename:
type: string
description: Output only. The original filename used to create this revision. This is only applicable to files with binary content in Drive.
lastModifyingUser:
$ref: '#/components/schemas/User'
exportLinks:
type: object
description: Output only. Links for exporting Docs Editors files to specific formats.
additionalProperties:
type: string
id:
type: string
description: Output only. The ID of the revision.
published:
type: boolean
description: Whether this revision is published. This is only applicable to Docs Editors files.
ErrorResponse:
type: object
description: Google API error envelope (https://cloud.google.com/apis/design/errors)
properties:
error:
type: object
properties:
code:
type: integer
message:
type: string
errors:
type: array
items:
type: object
properties:
domain:
type: string
reason:
type: string
message:
type: string
location:
type: string
locationType:
type: string
RevisionList:
type: object
description: A list of revisions of a file.
properties:
revisions:
type: array
description: The list of revisions. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
items:
$ref: '#/components/schemas/Revision'
kind:
type: string
description: 'Identifies what kind of resource this is. Value: the fixed string `"drive#revisionList"`.'
default: drive#revisionList
nextPageToken:
type: string
description: The page token for the next page of revisions. This will be absent if the end of the revisions list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ.
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://accounts.google.com/o/oauth2/auth
tokenUrl: https://oauth2.googleapis.com/token
scopes:
https://www.googleapis.com/auth/drive.scripts: Modify your Google Apps Script scripts' behavior
https://www.googleapis.com/auth/drive.meet.readonly: See and download your Google Drive files that were created or edited by Google Meet.
https://www.googleapis.com/auth/drive: See, edit, create, and delete all of your Google Drive files
https://www.googleapis.com/auth/drive.appdata: See, create, and delete its own configuration data in your Google Drive
https://www.googleapis.com/auth/drive.file: See, edit, create, and delete only the specific Google Drive files you use with this app
https://www.googleapis.com/auth/drive.apps.readonly: View your Google Drive apps
https://www.googleapis.com/auth/drive.photos.readonly: View the photos, videos and albums in your Google Photos
https://www.googleapis.com/auth/drive.readonly: See and download all your Google Drive files
https://www.googleapis.com/auth/drive.metadata: View and manage metadata of files in your Google Drive
https://www.googleapis.com/auth/drive.metadata.readonly: See information about your Google Drive files