POST/sharedrives/{sharedriveId}/files/{fileId}/revisions/{revisionId}/restore

공용 드라이브(공용 폴더)의 파일을 지정된 버전으로 복원한다.

Authorization

oauth2

OAuth 2.0 인증.
자세한 인증 방식은 인가·인증을 참고한다.

Scope

file

HTTP Request

POSThttps://www.worksapis.com/v1.0/sharedrives/{sharedriveId}/files/{fileId}/revisions/{revisionId}/restore

Path Parameters

ParameterTypeDescription
sharedriveId string 

공용 드라이브 ID


required
example : @2101000000000008 
fileId string 

파일 ID


required
example : NzExNTMwMDF8MTQ2NzA1NjAxMDAwMHxGfDA 
revisionId string 

버전 ID


required
example : 0 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
accessedTime string 

접근 날짜


readOnly : true 
createdTime string 

생성 날짜


readOnly : true 
modifiedTime string 

수정 날짜


readOnly : true 
fileId string 

파일 ID


readOnly : true 
parentFileId string 

부모 폴더의 fileId


readOnly : true 
fileName string 

파일 이름


readOnly : true 
fileSize integer 

파일 크기


format : int64
readOnly : true 
filePath string 

파일 경로


readOnly : true 
fileType string 

파일 유형

  • AUDIO: 오디오 파일
  • DOC: 문서 파일
  • ETC: 기타 파일
  • EXE: 실행 파일
  • FOLDER: 폴더
  • IMAGE: 사진 파일
  • VIDEO: 영상 파일
  • ZIP: 압축 파일

Allowed values : AUDIO, DOC, ETC, EXE, FOLDER, IMAGE, VIDEO, ZIP 
hasPermission boolean 

특정 구성원에게 권한이 부여되었는지 여부
이 속성은 공유 드라이브, 조직/그룹 폴더에서만 사용된다.


readOnly : true
nullable : false 
permissionRootFileId string 

폴더 접근 권한이 설정된 폴더의 파일 ID.
해당 폴더 또는 상위 폴더의 파일 ID가 될 수 있다.
폴더 접근 권한 관련 API를 호출하는 데 사용된다.
이 속성은 공유 드라이브, 조직/그룹 폴더에서만 사용된다.


readOnly : true
nullable : true 
shared boolean 

해당 폴더 혹은 상위 폴더가 현재 공유 중인지 여부
이 속성은 내 드라이브, 초대받은 폴더에서만 사용된다.


readOnly : true
nullable : false 
shareRootFileId string 

해당 폴더 혹은 상위 폴더가 공유 중인 경우, 공유된 루트 폴더의 파일 ID.
이 속성은 내 드라이브, 초대받은 폴더에서만 사용된다.


readOnly : true
nullable : true 
resourceLocation integer 

리소스 위치 코드


format : int32
readOnly : true 
statuses array (FileStatus) 

파일 상태

 

FileStatus

PropertyTypeDescription
FileStatus string 

파일 상태

  • LOCKED: 잠긴 파일
  • MALWARE: 악성 파일
  • PROTECTED: 중요 표시된 파일
  • IN_PROGRESS: 업로드 중인 파일

Allowed values : LOCKED, MALWARE, PROTECTED, IN_PROGRESS 

Response Example

example

1{2  "fileId": "QDIxMDAwMDAwMDAwMTcwfDExODE1MDg3MzQ0NzJ8RHww",3  "parentFileId": "QDIxMDAwMDAwMDAwMTcwfDExNzgyODY2MjgxMDR8RHww",4  "resourceLocation": 24101,5  "fileSize": 10,6  "fileName": "works.txt",7  "filePath": "/worksFolder/mobile/",8  "fileType": "DOC",9  "createdTime": "2020-11-13T18:20:05.05+09:00",10  "modifiedTime": "2021-04-05T21:14:05.05+09:00",11  "accessedTime": "2021-04-05T21:14:05.05+09:00",12  "statuses": [],13  "hasPermission": false,14  "permissionRootFileId": null,15  "shared": false,16  "shareRootFileId": null17}