POST/users/{userId}/drive/sharedfolders/{sharedFolderId}/files/{fileId}/lock

共有されたフォルダのファイルをロックする。

Authorization

oauth2

Access Token を指定します。
指定の方法や Access Token の取得方法は 共通仕様 を参照してください。

Scope

file

HTTP Request

POSThttps://www.worksapis.com/v1.0/users/{userId}/drive/sharedfolders/{sharedFolderId}/files/{fileId}/lock

Path Parameters

ParameterTypeDescription
userId string 

ユーザーを特定する ID (URL エンコードする)

  • ユーザー ID (userId)
  • ログイン ID (email)
  • ユーザーの ExternalKey (externalKey:{externalKey})
  • 自身 ("me")

required
example : me 
sharedFolderId string 

共有されたフォルダ ID


required
example : MTIzNDVfRF8xMjM0NQ 
fileId string 

ファイル ID


required
example : NzExNTMwMDF8MTQ2NzA1NjAxMDAwMHxGfDA 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
accessedTime string 

アクセス日時


readOnly : true 
createdTime string 

作成日時


readOnly : true 
fileId string 

ファイル ID


readOnly : true 
parentFileId string 

親ファイル ID


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 
permissionRootFileId string 

アクセス権限ルートファイル ID


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 (ENUM_FileStatus) 

ファイルステータス

  • LOCKED : ロック中
  • MALWARE : マルウェア検出
  • PROTECTED : 重要マーク中
  • UPLOAD : アップロード中
 
modifiedTime string 

更新日時


readOnly : true 

ENUM_FileStatus

PropertyTypeDescription
ENUM_FileStatus string 

ファイルステータス

  • LOCKED : ロックされたファイル
  • MALWARE : マルウェアファイル
  • PROTECTED : 重要表示されたファイル
  • UPLOAD : アップロード中

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    "LOCKED"14  ],15  "hasPermission": false,16  "permissionRootFileId": null,17  "shared": false,18  "shareRootFileId": null19}

HTTP 400

Invalid parameters received.

HTTP 403

Access is denied: no permission.