POST/sharedrives/{sharedriveId}/files/{fileId}/permissions

共有ドライブのフォルダアクセス権限を登録する。

Authorization

oauth2

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

Scope

file

HTTP Request

POSThttps://www.worksapis.com/v1.0/sharedrives/{sharedriveId}/files/{fileId}/permissions

Path Parameters

ParameterTypeDescription
sharedriveId string 

共有ドライブ ID (URL エンコードする)


required
example : @2101000000000008 
fileId string 

ファイル ID


required
example : NzExNTMwMDF8MTQ2NzA1NjAxMDAwMHxGfDA 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
userId string 

ユーザー ID

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

required
minLength : 1 
type string 

編集権限

  • READ : 読み込み権限
  • WRITE : 書き込み権限

required
Allowed values : READ, WRITE 

Request Example

example

1{2  "userId": "works@example.com",3  "type": "WRITE"4}

Response

HTTP 201

OK

PropertyTypeDescription
permissions array (FolderPermission) 

権限情報

 

FolderPermission

PropertyTypeDescription
permissionId string 

アクセス権限 ID


required
minLength : 1
readOnly : true 
type string 

編集権限

  • READ : 読み込み権限
  • WRITE : 書き込み権限

required
Allowed values : READ, WRITE 
userId string 

ユーザー ID (userId)
組織 ID (orgUnitId)
グループ ID (groupId)


required
minLength : 1
readOnly : true 
userType string 

ユーザータイプ

  • USER : ユーザー
  • ORGUNIT : 組織
  • GROUP : グループ

required
Allowed values : USER, ORGUNIT, GROUP 
userName string 

ユーザー名
組織名
グループ名


required
minLength : 1
readOnly : true 

Response Example

example

1{2  "permissions": [3    {4      "permissionId": "QDIxMDAwMDAwMDAwMTcwfEdST1VQfDEwMTAwMDAwMDExNDY1MA",5      "type": "WRITE",6      "userId": "group127-8545-4463-603b-04d550d23bf",7      "userType": "GROUP",8      "userName": "グループ1"9    }10  ]11}