The photos space will sunset in early January 2018. Your users can continue to access Google Photos via the drive space by enabling the Google Photos folder in My Drive in the Drive client settings

Revisions: update

Requires authorization

Updates a revision with patch semantics. Try it now.

Request

HTTP request

PATCH https://www.googleapis.com/drive/v3/files/fileId/revisions/revisionId

Parameters

Parameter name Value Description
Path parameters
fileId string The ID of the file.
revisionId string The ID of the revision.

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.appdata

Request body

In the request body, supply the relevant portions of a Revisions resource, according to the rules of patch semantics, with the following properties:

Property name Value Description Notes
Optional Properties
keepForever boolean 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.

writable
publishAuto boolean Whether subsequent revisions will be automatically republished. This is only applicable to Google Docs. writable
published boolean Whether this revision is published. This is only applicable to Google Docs. writable
publishedOutsideDomain boolean Whether this revision is published outside the domain. This is only applicable to Google Docs. writable

Response

If successful, this method returns a Revisions resource in the response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.

Send feedback about...

Drive REST API
Drive REST API