POST/sharedrives/{sharedriveId}/permissions
共有ドライブの権限を登録する。
ドメイン内の特定のユーザー/組織/グループに権限を付与できる。
共有ドライブのマスターには既定で権限が与えられているため、権限付与を行うことはできない。
共有ドライブ権限が設定されておらず、個々のフォルダに権限が作成されている場合には、個々のフォルダのアクセス権をすべて解除したあとで共有ドライブの権限を登録できる。
設定されている例外管理は削除される。
共有ドライブの共有範囲 accessibleRange が MEMBER に変更される。
共有範囲 accessibleRange を DOMAIN または TENANT に変更するには、共有ドライブ - 共有ドライブの部分更新 を使用します。
Access Token を指定します。
指定の方法や Access Token の取得方法は 共通仕様 を参照してください。
file
| Parameter | Type | Description |
|---|---|---|
| sharedriveId | string | 共有ドライブ ID (URL エンコードする) required example : @2101000000000008 |
| Header | type | Description |
|---|---|---|
| Authorization | string | Bearer {token} required |
共有ドライブ権限登録リクエスト
| Property | Type | Description |
|---|---|---|
| userId | string | ユーザー ID
required minLength : 1 |
| userType | string | ユーザータイプ
required Allowed values : USER, ORGUNIT, GROUP |
| type | string | 編集権限
default : WRITE Allowed values : READ, WRITE |
example
1{2 "userId": "works@example.com",3 "userType": "USER",4 "type": "READ"5}OK
| Property | Type | Description |
|---|---|---|
| permissionId | string | アクセス権限 ID required minLength : 1 readOnly : true |
| type | string | 編集権限
required Allowed values : READ, WRITE |
| userId | string | ユーザー ID (userId) required minLength : 1 readOnly : true |
| userType | string | ユーザータイプ
required Allowed values : USER, ORGUNIT, GROUP |
| userName | string | ユーザー名 required minLength : 1 readOnly : true |
example
1{2 "permissionId": "QDIxMDAwMDAwMDAwMTcwfEdST1VQfDEwMTAwMDAwMDExNDY1MA",3 "type": "WRITE",4 "userId": "group127-8545-4463-603b-04d550d23bf",5 "userType": "GROUP",6 "userName": "グループ1"7}Forbidden