GET/users/{userId}/drive/files/{fileId}/revisions

Gets a list of file revisions in my drive.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

file
file.read

HTTP Request

GEThttps://www.worksapis.com/v1.0/users/{userId}/drive/files/{fileId}/revisions

Path Parameters

ParameterTypeDescription
userId string 

User ID

  • Mail
  • Resource ID
  • External key in "externalKey:{externalKey}" format
  • me

required
example : me 
fileId string 

File ID


required
example : NzExNTMwMDF8MTQ2NzA1NjAxMDAwMHxGfDA 

Query Parameters

ParameterTypeDescription
count integer 

Number of items to get


default : 20
minimum : 1
maximum : 200
example : 20
format : int32 
cursor string 

Cursor


example : JlIBsfJogXpzDGY8OscZziqZpYqCAu3RbZbaFzBb1od6lWQtSdPUd2FIdCuaGgu8DA==
allowReserved : false 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
revisions array (FileRevision) 

Revision information

 
responseMetaData object (responseMetaData) 

Response metadata

 

FileRevision

PropertyTypeDescription
createdTime string 

Creation date


readOnly : true 
fileSize integer 

File size


format : int64
readOnly : true 
fileType string 

File type

  • AUDIO: Audio file
  • DOC: Document file
  • ETC: Etc. file
  • EXE: Executable file
  • FOLDER: Folder
  • IMAGE: Image file
  • VIDEO: Video file
  • ZIP: Zip file

Allowed values : AUDIO, DOC, ETC, EXE, FOLDER, IMAGE, VIDEO, ZIP 
originalPath string 

Original path


readOnly : true 
resourceLocation integer 

Resource location code


format : int32
readOnly : true 
revisionId string 

Revision ID


readOnly : true 
modifiedTime string 

Update date


readOnly : true 
updateUser string 

Updated by (user ID)


readOnly : true 

responseMetaData

PropertyTypeDescription
nextCursor string 

Cursor value for pagination


readOnly : true 

Response Example

example

1{2  "revisions": [3    {4      "revisionId": "0",5      "resourceLocation": 24101,6      "fileSize": 52255,7      "fileType": "IMAGE",8      "originalPath": "/worksFolder/mobile-18_jpeg.jpeg",9      "createdTime": "2017-06-22T10:50:59.59+09:00",10      "modifiedTime": "2017-05-11T18:31:20.20+09:00",11      "updateUser": "userf7da-f82c-4284-13e7-030f3b4c756x"12    }13  ],14  "responseMetaData": {15    "nextCursor": "JlIBsfJogXpzDGY8OscZziqZpYqCAu3RbZbaFzBb1od6lWQtSdPUd2FIdCuaGgu8DA=="16  }17}