Google Drive SDK

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
  },
  "originalFilename": string,
  "md5Checksum": string,
  "fileSize": long
}
Property name Value Description Notes
downloadUrl string Short term download URL for the file. This will only be populated on files with content stored in Drive.
etag etag The ETag of the revision.
exportLinks.(key) string A mapping from export format to URL
fileSize long The size of the revision in bytes. This will only be populated on files with content stored in Drive.
id string The ID of the revision.
kind string This is always drive#revision.
lastModifyingUser nested object The last user to modify this revision.
lastModifyingUser.displayName string A plain text displayable name for this user.
lastModifyingUser.isAuthenticatedUser boolean Whether this user is the same as the authenticated user for whom the request was made.
lastModifyingUser.kind string This is always drive#user.
lastModifyingUser.permissionId string The user's ID as visible in the permissions collection.
lastModifyingUser.picture object The user's profile picture.
lastModifyingUser.picture.url string A URL that points to a profile picture of this user.
lastModifyingUserName string Name of the last user to modify this revision.
md5Checksum string An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.
mimeType string The MIME type of the revision.
modifiedDate datetime Last time this revision was modified (formatted RFC 3339 timestamp).
originalFilename string The original filename when this revision was created. This will only be populated on files with content stored in Drive.
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
publishAuto boolean Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Google Docs. writable
published boolean Whether this revision is published. 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

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.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.