PATCH/sharedrives/{sharedriveId}

Updates a collaborative drive.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

file

HTTP Request

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

Path Parameters

ParameterTypeDescription
sharedriveId string 

Collaborative drive ID


required
example : @2101000000000008 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Request Body

It is used to update a collaborative drive.

PropertyTypeDescription
accessDenies array (ShareDriveAccessDeny) 

List of user types to restrict access by.
You can control access based on each user type.

Note
It is available only if accessibleRange is DOMAIN.

 
description string 

Description


minLength : 0
maxLength : 300 
masters array (ShareDriveMaster) 

List of master IDs

 
name string 

First name


minLength : 1
maxLength : 80 
permissionType string 

Permission type

  • READ: Read permission
  • WRITE: Write permission

Allowed values : READ, WRITE 
accessibleRange string 

Accessible range

  • TENANT: Accessible to all corporate group members
  • DOMAIN: Accessible to all company members
  • MEMBER: Accessible to only the specified members in a corporate group If the accessibleRange value is changed from MEMBER to TENANT or DOMAIN, the permissions for the collaborative drive are disabled and the previous permissions are removed.
    If the accessibleRange value is changed from TENANT or DOMAIN to MEMBER, the accessDenies values are removed.

Note
If the accessDenies parameter is specified, you cannot change the accessibleRange value from DOMAIN to TENANT.
If folder access permissions are set, you cannot change the accessibleRange value from TENANT or DOMAIN to MEMBER.


Allowed values : TENANT, DOMAIN, MEMBER
nullable : true 

ShareDriveAccessDeny

PropertyTypeDescription
id string 

Access denial ID
If the type parameter is user-type, you need to enter a `userTypeId'.

 
type string 

Access denial type


Allowed values : user-type 

ShareDriveMaster

PropertyTypeDescription
id string 

Master user 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) 

Access denials

 
createdTime string 

Creation date


readOnly : true 
description string 

Description

 
hasPermission boolean 

Indicates whether a specified member is granted access permission.


readOnly : true 
accessibleRange string 

Accessible range

  • TENANT: Accessible to all corporate group members
  • DOMAIN: Accessible to all company members
  • MEMBER: Accessible to only the specified members in a corporate group

Note

  • If it is MEMBER, hasPermission is set to true.

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

Master

 
name string 

First name

 
quota object (quota) 

Capacity information


readOnly : true 
sharedriveId string 

Collaborative drive ID


readOnly : true 
permissionType string 

Permission type

  • READ: Read permission
  • WRITE: Write permission

Allowed values : READ, WRITE 

ShareDriveAccessDeny

PropertyTypeDescription
id string 

Access denial ID
If the type parameter is user-type, you need to enter a `userTypeId'.

 
name string 

Access denial name


readOnly : true 
type string 

Access denial type


Allowed values : user-type 

ShareDriveMaster

PropertyTypeDescription
id string 

Master user ID

 
name string 

Master user name


readOnly : true 

quota

PropertyTypeDescription
trash integer 

Trash size


format : int64
readOnly : true 
used integer 

Used size


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": "Part-time job"22    }23  ],24  "permissionType": "READ",25  "accessibleRange": "DOMAIN"26}

HTTP 403

Forbidden