Google Drive Revisions API

The Revisions API from Google Drive — 2 operation(s) for revisions.

GitHub OpenAPI

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

DELETE /drive/v3/files/{fileId}/revisions/{revisionId} Delete a file revision · Delete revisions #
Ask an LLM
“Can I permanently remove an old version of a file?”
“Why can't I delete the last revision of a Google Doc?”
Tell an agent destructive · confirm first
Delete revision {revisionId} of file {fileId}.
Permanently remove old version {revisionId} from file {fileId}.
GET /drive/v3/files/{fileId}/revisions/{revisionId} Get a file revision · Get revisions #
Ask an LLM
“How do I fetch the content of one specific revision of a file?”
“Can I download a single revision by its ID?”
Tell an agent
Get revision {revisionId} of file {fileId}.
Download the content of revision {revisionId} for file {fileId}.
PATCH /drive/v3/files/{fileId}/revisions/{revisionId} Update a file revision · Update revisions #
Ask an LLM
“How do I change the keep-forever setting on a revision?”
“Can I republish a revision of a Docs file?”
Tell an agent
Set keep-forever to {keepForever} on revision {revisionId} of file {fileId}.
Republish revision {revisionId} of file {fileId} with publishAuto {publishAuto}.
GET /drive/v3/files/{fileId}/revisions List a file's revisions · List revisions #
Ask an LLM
“What revisions exist for a file?”
“Is the revision list complete for frequently edited Docs?”
Tell an agent
List revisions of file {fileId}.
Show the first {pageSize} revisions of file {fileId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-drive:google-drive-revisions-api"
All apis
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.

Get an API 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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-drive-revisions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Drive Revisions API
  version: v3
  description: Generated from Google's published Discovery document for Google Drive API (drive v3, revision 20261106). 4 operation(s).
  contact:
    name: Google
    url: https://developers.google.com/
  termsOfService: https://developers.google.com/terms
servers:
- url: https://www.googleapis.com
tags:
- name: Revisions
paths:
  /drive/v3/files/{fileId}/revisions/{revisionId}:
    delete:
      operationId: drive.revisions.delete
      summary: Delete revisions
      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.
      parameters:
      - name: fileId
        in: path
        required: true
        description: The ID of the file.
        schema:
          type: string
      - name: revisionId
        in: path
        required: true
        description: The ID of the revision.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/drive
        - https://www.googleapis.com/auth/drive.appdata
        - https://www.googleapis.com/auth/drive.file
      - apiKey: []
      tags:
      - Revisions
    get:
      operationId: drive.revisions.get
      summary: Get revisions
      description: Gets a revision's metadata or content by ID. For more information, see Manage file revisions.
      parameters:
      - name: fileId
        in: path
        required: true
        description: The ID of the file.
        schema:
          type: string
      - name: revisionId
        in: path
        required: true
        description: The ID of the revision.
        schema:
          type: string
      - name: acknowledgeAbuse
        in: query
        required: 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.
        schema:
          type: boolean
          default: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Revision'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      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
      - apiKey: []
      tags:
      - Revisions
    patch:
      operationId: drive.revisions.update
      summary: Update revisions
      description: Updates a revision with patch semantics. For more information, see Manage file revisions.
      parameters:
      - name: fileId
        in: path
        required: true
        description: The ID of the file.
        schema:
          type: string
      - name: revisionId
        in: path
        required: true
        description: The ID of the revision.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Revision'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Revision'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      security:
      - oauth2:
        - https://www.googleapis.com/auth/drive
        - https://www.googleapis.com/auth/drive.appdata
        - https://www.googleapis.com/auth/drive.file
      - apiKey: []
      tags:
      - Revisions
  /drive/v3/files/{fileId}/revisions:
    get:
      operationId: drive.revisions.list
      summary: List 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.
      parameters:
      - name: fileId
        in: path
        required: true
        description: The ID of the file.
        schema:
          type: string
      - name: pageSize
        in: query
        required: false
        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.
        schema:
          type: integer
          default: '200'
          maximum: 1000
          format: int32
          minimum: 1
      - name: pageToken
        in: query
        required: false
        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.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevisionList'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcError'
          description: Error response (google.rpc.Status)
      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
      - apiKey: []
      tags:
      - Revisions
components:
  schemas:
    GoogleRpcError:
      type: object
      description: The error envelope every Google API returns.
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
            details:
              type: array
              items:
                type: object
    User:
      description: Information about a Drive user.
      properties:
        photoLink:
          type: string
          readOnly: true
          description: Output only. A link to the user's profile photo, if available.
        emailAddress:
          readOnly: true
          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.
          type: string
        kind:
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.'
          default: drive#user
          type: string
          readOnly: true
        me:
          description: Output only. Whether this user is the requesting user.
          readOnly: true
          type: boolean
        displayName:
          type: string
          readOnly: true
          description: Output only. A plain text displayable name for this user.
        permissionId:
          type: string
          description: Output only. The user's ID as visible in Permission resources.
          readOnly: true
      type: object
    Revision:
      type: object
      properties:
        id:
          type: string
          description: Output only. The ID of the revision.
        lastModifyingUser:
          $ref: '#/components/schemas/User'
          description: Output only. The last user to modify this revision. This field is only populated when the last modification was performed by a signed-in user.
        exportLinks:
          type: object
          description: Output only. Links for exporting Docs Editors files to specific formats.
          additionalProperties:
            type: string
        mimeType:
          description: Output only. The MIME type of the revision.
          type: string
        originalFilename:
          description: Output only. The original filename used to create this revision. This is only applicable to files with binary content in Drive.
          type: string
        publishedLink:
          description: Output only. A link to the published revision. This is only populated for Docs Editors files.
          type: string
        size:
          type: string
          format: int64
          description: Output only. The size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
        publishedOutsideDomain:
          description: Whether this revision is published outside the domain. This is only applicable to Docs Editors files.
          type: boolean
        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.
        published:
          type: boolean
          description: Whether this revision is published. This is only applicable to Docs Editors files.
        publishAuto:
          description: Whether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.
          type: boolean
        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.
        kind:
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#revision"`.'
          type: string
          default: drive#revision
        modifiedTime:
          format: date-time
          type: string
          description: The last time the revision was modified (RFC 3339 date-time).
      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.
    RevisionList:
      type: object
      description: A list of revisions of a file.
      properties:
        revisions:
          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'
          type: array
        kind:
          description: 'Identifies what kind of resource this is. Value: the fixed string `"drive#revisionList"`.'
          default: drive#revisionList
          type: string
        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:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key; accepted by methods that do not need user data.
    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.appdata: See, create, and delete its own configuration data in your Google Drive
            https://www.googleapis.com/auth/drive.readonly: See and download all your Google Drive files
            https://www.googleapis.com/auth/drive.photos.readonly: View the photos, videos and albums in your Google Photos
            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.metadata.readonly: See information about your Google Drive files
            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.apps.readonly: View your Google Drive apps
            https://www.googleapis.com/auth/drive.metadata: View and manage metadata of files in your Google Drive
            https://www.googleapis.com/auth/drive.scripts: Modify your Google Apps Script scripts' behavior
externalDocs:
  url: https://developers.google.com/workspace/drive/
x-provenance:
  method: harvested
  publisher: Google
  source: https://www.googleapis.com/discovery/v1/apis/drive/v3/rest
  note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261106)