PATCH/sharedrives/{sharedriveId}

共有ドライブを部分更新する。
共有ドライブに権限が設定されている場合には、例外管理を修正できない。この場合には、"INVALID_PARAMETER" エラーが発生する。

Authorization

oauth2

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

Scope

file

HTTP Request

PATCHhttps://www.worksapis.com/v1.0/sharedrives/{sharedriveId}

Path Parameters

ParameterTypeDescription
sharedriveId string 

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


required
example : @2101000000000008 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Request Body

共有ドライブ部分修正リクエスト

PropertyTypeDescription
accessDenies array (ShareDriveAccessDeny) 

アクセス制限 ID (user-type) リスト
accessibleRange = DOMAIN の場合に指定できる。

 
description string 

説明


minLength : 0
maxLength : 300 
masters array (ShareDriveMaster) 

マスター ID リスト

 
name string 

名前


minLength : 1
maxLength : 80 
permissionType string 

編集権限

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

Allowed values : READ, WRITE 
accessibleRange string 

共有範囲

  • TENANT: グループ会社全体のメンバーがアクセス可能
  • DOMAIN: ドメイン全体のメンバーがアクセス可能
  • MEMBER: グループ会社内の指定されたメンバーのみアクセス可能
    MEMBER から TENANT または DOMAIN に変更すると、共有ドライブの permission はすべて無効になり、登録済みの権限は削除される。
    DOMAIN から MEMBER に変更すると、登録されたアクセス制限リスト accessDenies は削除される。 DOMAIN で アクセス制限リスト accessDenies が設定されている場合には、TENANT には変更できない。 フォルダアクセス権が設定されている場合には、TENANT または DOMAIN から MEMBER に変更できない。

Allowed values : TENANT, DOMAIN, MEMBER
nullable : true 

ShareDriveAccessDeny

PropertyTypeDescription
id string 

アクセス制限 ID

 
type string 

アクセス制限の種類


Allowed values : user-type 

ShareDriveMaster

PropertyTypeDescription
id string 

管理者のユーザー ID

 

Request Example

example

1{2  "name": "share drive",3  "description": "description here",4  "masters": [5    {6      "id": "userf7da-f82c-4284-13e7-030f3b4c756x"7    }8  ],9  "accessDenies": [10    {11      "id": "041b68d3-263a-4fbe-9bc5-0350c49d1c42",12      "type": "user-type"13    }14  ],15  "accessibleRange": "DOMAIN"16}

Response

HTTP 200

OK

PropertyTypeDescription
accessDenies array (ShareDriveAccessDeny) 

アクセス制限リスト

 
createdTime string 

作成日時


readOnly : true 
description string 

説明

 
hasPermission boolean 

アクセス権限有りフラグ


readOnly : true 
accessibleRange string 

共有範囲

  • TENANT: グループ会社全体のメンバーがアクセス可能
  • DOMAIN: ドメイン全体のメンバーがアクセス可能
  • MEMBER: グループ会社内の指定されたメンバーのみアクセス可能

注意
MEMBER の場合には、hasPermission:true に設定される。


Allowed values : TENANT, DOMAIN, MEMBER
nullable : false 
masters array (ShareDriveMaster) 

管理者ユーザー

 
name string 

共有ドライブ名

 
quota object (quota) 

容量情報


readOnly : true 
sharedriveId string 

共有ドライブ ID


readOnly : true 
permissionType string 

編集権限

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

Allowed values : READ, WRITE 

ShareDriveAccessDeny

PropertyTypeDescription
id string 

アクセス制限 ID

 
name string 

アクセス制限名


readOnly : true 
type string 

アクセス制限の種類


Allowed values : user-type 

ShareDriveMaster

PropertyTypeDescription
id string 

管理者のユーザー ID

 
name string 

管理者のユーザー名


readOnly : true 

quota

PropertyTypeDescription
trash integer 

ゴミ箱の容量


format : int64
readOnly : true 
used integer 

使用容量


format : int64
readOnly : true 

Response Example

example

1{2  "sharedriveId": "@2101000000000008",3  "name": "share drive",4  "description": "description here",5  "createdTime": "2020-12-16T19:40:15.15+09:00",6  "quota": {7    "used": 46426,8    "trash": 09  },10  "hasPermission": false,11  "masters": [12    {13      "id": "userf7da-f82c-4284-13e7-030f3b4c756x",14      "name": "User Name"15    }16  ],17  "accessDenies": [18    {19      "type": "user-type",20      "id": "041b68d3-263a-4fbe-9bc5-0350c49d1c42",21      "name": "アルバイト"22    }23  ],24  "permissionType": "READ",25  "accessibleRange": "DOMAIN"26}

HTTP 403

Forbidden