Hide

Revisions

For a list of methods for this resource, see the end of this page.

Resource representations

A revision of a file.

{
  "kind": "drive#revision",
  "etag": etag,
  "id": string,
  "selfLink": string,
  "mimeType": string,
  "modifiedDate": datetime,
  "pinned": boolean,
  "published": boolean,
  "publishedLink": string,
  "publishAuto": boolean,
  "publishedOutsideDomain": boolean,
  "downloadUrl": string,
  "exportLinks": {
    (key): string
  },
  "lastModifyingUserName": string,
  "lastModifyingUser": {
    "kind": "drive#user",
    "displayName": string,
    "picture": {
      "url": string
    },
    "isAuthenticatedUser": boolean,
    "permissionId": string,
    "emailAddress": string
  },
  "originalFilename": string,
  "md5Checksum": string,
  "fileSize": long
}
Property name Value Description Notes
kind string This is always drive#revision.
etag etag The ETag of the revision.
id string The ID of the revision.
mimeType string The MIME type of the revision.
modifiedDate datetime Last time this revision was modified (formatted RFC 3339 timestamp).
pinned boolean Whether this revision is pinned to prevent automatic purging. This will only be populated and can only be modified on files with content stored in Drive which are not Google Docs. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter. writable
published boolean Whether this revision is published. This is only populated and can only be modified for Google Docs. writable
publishAuto boolean Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs. writable
publishedOutsideDomain boolean Whether this revision is published outside the domain. This is only populated and can only be modified for Google Docs. writable
downloadUrl string Short term download URL for the file. This will only be populated on files with content stored in Drive.
exportLinks.(key) string A mapping from export format to URL
lastModifyingUserName string Name of the last user to modify this revision.
originalFilename string The original filename when this revision was created. This will only be populated on files with content stored in Drive.
md5Checksum string An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
fileSize long The size of the revision in bytes. This will only be populated on files with content stored in Drive.
lastModifyingUser nested object The last user to modify this revision.
lastModifyingUser.kind string This is always drive#user.
lastModifyingUser.displayName string A plain text displayable name for this user.
lastModifyingUser.picture object The user's profile picture.
lastModifyingUser.picture.url string A URL that points to a profile picture of this user.
lastModifyingUser.isAuthenticatedUser boolean Whether this user is the same as the authenticated user for whom the request was made.
lastModifyingUser.permissionId string The user's ID as visible in the permissions collection.
lastModifyingUser.emailAddress string The email address of the user.

Methods

With get, patch, and update, you can use the alias head instead of a specific revisionId to refer to the head revision.

delete
Removes a revision.
get
Gets a specific revision.
list
Lists a file's revisions.
patch
Updates a revision. This method supports patch semantics.
update
Updates a revision.

Send feedback about...

Drive REST API