Skip to main content

revisions

Overview

Namerevisions
TypeResource
Idgoogleworkspace.drive.revisions

Fields

NameDatatypeDescription
idstringThe ID of the revision.
publishAutobooleanWhether subsequent revisions will be automatically republished. This is only applicable to Docs Editors files.
originalFilenamestringThe original filename used to create this revision. This is only applicable to files with binary content in Drive.
exportLinksobjectLinks for exporting Docs Editors files to specific formats.
lastModifyingUserobjectInformation about a Drive user.
publishedbooleanWhether this revision is published. This is only applicable to Docs Editors files.
publishedLinkstringA link to the published revision. This is only populated for Google Sites files.
kindstringIdentifies what kind of resource this is. Value: the fixed string "drive#revision".
mimeTypestringThe MIME type of the revision.
sizestringThe size of the revision's content in bytes. This is only applicable to files with binary content in Drive.
md5ChecksumstringThe MD5 checksum of the revision's content. This is only applicable to files with binary content in Drive.
modifiedTimestringThe last time the revision was modified (RFC 3339 date-time).
keepForeverbooleanWhether 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.
publishedOutsideDomainbooleanWhether this revision is published outside the domain. This is only applicable to Docs Editors files.

Methods

NameAccessible byRequired ParamsDescription
getSELECTfileId, revisionIdGets a revision's metadata or content by ID.
listSELECTfileIdLists a file's revisions.
deleteDELETEfileId, revisionIdPermanently 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.
updateEXECfileId, revisionIdUpdates a revision with patch semantics.