POST/users/{userId}/drive/sharedfolders/{sharedFolderId}/files/{fileId}/link

초대받은 폴더의 파일 링크를 생성한다.

Authorization

oauth2

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

Scope

file

HTTP Request

POSThttps://www.worksapis.com/v1.0/users/{userId}/drive/sharedfolders/{sharedFolderId}/files/{fileId}/link

Path Parameters

ParameterTypeDescription
userId string 

사용자 ID

  • 메일
  • 리소스 ID
  • 외부 키 "externalKey:{externalKey}" 형태
  • me

required
example : me 
sharedFolderId string 

초대받은 폴더 ID


required
example : MTIzNDVfRF8xMjM0NQ 
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
accessType string 

링크 접근 타입

  • ORGANIZATION: 구성원만 접근 가능
  • SPECIFIC_PEOPLE: 지정한 사람만 접근 가능(보안 OTP 인증)
  • ANYONE: 모든 사람이 접근 가능

required
Allowed values : ORGANIZATION, SPECIFIC_PEOPLE, ANYONE 
linkPermissionType string 

링크 권한 타입(해당 링크에 접속하는 피공유자는 설정된 타입에 해당되는 과업만 수행할 수 있다.)

  • EDIT: 편집(이동, 삭제, 복원 등), 업로드/복사(덮어쓰기 가능), 다운로드, 미리보기
  • UPLOAD_DOWNLOAD: 업로드/복사(덮어쓰기 불가), 다운로드, 미리보기
  • UPLOAD: 업로드/복사(덮어쓰기 불가), 미리보기
  • DOWNLOAD: 다운로드, 미리보기
  • PREVIEW: 미리보기

required
Allowed values : EDIT, UPLOAD_DOWNLOAD, UPLOAD, DOWNLOAD, PREVIEW 
expirationTime string 

링크 만료 시간(만료일이 없는 경우 null 전달, ISO-8601 형식: YYYY-MM-DDThh:mm:ssTZD)

 
password string 

링크 비밀번호(접근 타입이 ANYONE일 때만 설정 가능)

주의 4-16자 이내, 숫자/영문/특수문자만 입력 가능 허용되는 특수문자: $ ₩ ` - ~ ! @ : ; % ^ & = \ " ' , _ * + | () {} [] . ? < > / #

 
specificPeople array (string) 

접근 타입이 SPECIFIC_PEOPLE일 때 구성원 목록

 

Request Example

example

1{2  "accessType": "ANYONE",3  "linkPermissionType": "EDIT",4  "expirationTime": "2020-12-16T19:40:15.15+09:00",5  "password": "12345678"6}

Response

HTTP 201

OK

PropertyTypeDescription
accessType string 

링크 접근 타입

  • ORGANIZATION: 구성원만 접근 가능
  • SPECIFIC_PEOPLE: 지정한 사람만 접근 가능(보안 OTP 인증)
  • ANYONE: 모든 사람이 접근 가능

Allowed values : ORGANIZATION, SPECIFIC_PEOPLE, ANYONE 
hasPassword boolean 

링크 접근 비밀번호 존재 여부

 
linkPermissionType string 

링크 권한 타입(해당 링크에 접속하는 피공유자는 설정된 타입에 해당되는 과업만 수행할 수 있다.)

  • EDIT: 편집(이동, 삭제, 복원 등), 업로드/복사(덮어쓰기 가능), 다운로드, 미리보기
  • UPLOAD_DOWNLOAD: 업로드/복사(덮어쓰기 불가), 다운로드, 미리보기
  • UPLOAD: 업로드/복사(덮어쓰기 불가), 미리보기
  • DOWNLOAD: 다운로드, 미리보기
  • PREVIEW: 미리보기

Allowed values : EDIT, UPLOAD_DOWNLOAD, UPLOAD, DOWNLOAD, PREVIEW 
linkUrl string 

링크 접속 URL


readOnly : true 
createdTime string 

링크 생성 시간


readOnly : true 
expirationTime string 

링크 만료 시간(만료일이 없는 경우 null)


nullable : true 
specificPeople array (string) 

접근 타입이 SPECIFIC_PEOPLE일 때 구성원 목록


nullable : true 

Response Example

example

1{2  "accessType": "SPECIFIC_PEOPLE",3  "hasPassword": false,4  "linkUrl": "https://works.do/xzO8Bv",5  "createdTime": "2024-10-10T09:18:24+09:00",6  "expirationTime": "2024-10-17T09:18:24+09:00",7  "linkPermissionType": "EDIT",8  "specificPeople": [9    "abc@example.com"10  ]11}