POST/sharedrives

공용 드라이브(공용 폴더)를 생성한다.
그룹사 내의 특정 사용자/조직/그룹으로 권한을 제한하려면 권한 생성 API를 이용한다.
마스터로 지정된 사용자는 공용 드라이브 수정, 권한 생성, 권한 해제를 할 수 있다.

Authorization

oauth2

OAuth 2.0 인증.
자세한 인증 방식은 인가·인증을 참고한다.

Scope

file

HTTP Request

POSThttps://www.worksapis.com/v1.0/sharedrives

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Request Body

공용 드라이브 생성 시 사용한다.

PropertyTypeDescription
accessDenies array (ShareDriveAccessDeny) 

접근을 제한할 사용자 유형 목록
사용자 유형별 접근을 제어할 수 있다.

제약사항
accessibleRange: DOMAIN일 때만 지정할 수 있다.

 
description string 

설명


minLength : 0
maxLength : 300 
masters array (ShareDriveMaster) 

마스터 ID 목록


required 
name string 

이름


required
minLength : 1
maxLength : 80 
permissionType string 

편집 권한

  • READ: 읽기 권한
  • WRITE: 쓰기 권한

default : WRITE
Allowed values : READ, WRITE 
accessibleRange string 

접근 범위

  • TENANT: 그룹사 전체 구성원 접근 가능
  • DOMAIN: 회사 전체 구성원 접근 가능
  • MEMBER: 그룹사 내 지정된 구성원만 접근 가능

default : DOMAIN
Allowed values : TENANT, DOMAIN, MEMBER 

ShareDriveAccessDeny

PropertyTypeDescription
id string 

접근 제한 ID
type: user-type이면 userTypeId를 입력해야 한다.

 
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 201

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
type: user-type이면 userTypeId를 입력해야 한다.

 
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