REST Resource: revisions

Resource: Revision

A revision of a file.

Some resource methods (such as revisions.update) require a revisionId. Use the revisions.list method to retrieve the ID for a revision.

JSON representation
{
  "id": string,
  "mimeType": string,
  "kind": string,
  "published": boolean,
  "etag": string,
  "exportLinks": {
    string: string,
    ...
  },
  "pinned": boolean,
  "md5Checksum": string,
  "modifiedDate": string,
  "lastModifyingUserName": string,
  "downloadUrl": string,
  "publishAuto": boolean,
  "publishedOutsideDomain": boolean,
  "publishedLink": string,
  "fileSize": string,
  "originalFilename": string,
  "lastModifyingUser": {
    object (User)
  },
  "selfLink": string
}
Fields
id

string

Output only. The ID of the revision.

mimeType

string

Output only. The MIME type of the revision.

kind

string

Output only. This is always drive#revision.

published

boolean

Whether this revision is published. This is only populated and can only be modified for Docs Editors files.

etag

string

Output only. The ETag of the revision.

pinned

boolean

Whether this revision is pinned to prevent automatic purging. If not set, the revision is automatically purged 30 days after newer content is uploaded. This field can only be modified on files with content stored in Drive, excluding Docs Editors files. Revisions can also be pinned when they are created through the drive.files.insert/update/copy by using the pinned query parameter. Pinned revisions are stored indefinitely using additional storage quota, up to a maximum of 200 revisions.

md5Checksum

string

Output only. An MD5 checksum for the content of this revision. This will only be populated on files with content stored in Drive.

modifiedDate

string

Output only. Last time this revision was modified (formatted RFC 3339 timestamp).

lastModifyingUserName

string

Output only. Name of the last user to modify this revision.

downloadUrl

string

Output only. Short term download URL for the file. This will only be populated on files with content stored in Drive.

publishAuto

boolean

Whether subsequent revisions will be automatically republished. This is only populated and can only be modified for Docs Editors files.

publishedOutsideDomain

boolean

Whether this revision is published outside the domain. This is only populated and can only be modified for Docs Editors files.

fileSize

string (int64 format)

Output only. The size of the revision in bytes. This will only be populated on files with content stored in Drive.

originalFilename

string

Output only. The original filename when this revision was created. This will only be populated on files with content stored in Drive.

lastModifyingUser

object (User)

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.

Methods

delete

Permanently deletes a file version.

get

Gets a specific revision.

list

Lists a file's revisions.

patch

Updates a revision.

update

Updates a revision.