POST/directory/user-types/{userTypeId}/orgunit-access-restrict

사용자 유형의 조직 조회 제한을 설정한다.

구성원의 사용자 유형에 조회 제한이 설정돼 있으면 구성원에게 조회 제한이 적용된다.

구성원의 조회 제한이 구성원과 사용자 유형, 조직에 중복으로 설정돼 있으면 구성원 > 사용자 유형 > 조직의 순서로 우선 적용된다.

예를 들어, 특정 구성원의 조회 제한이 구성원과 조직에 설정돼 있으면 우선순위에 따라 구성원에 설정된 조회 제한이 적용된다.

Authorization

oauth2

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

Scope

directory

HTTP Request

POSThttps://www.worksapis.com/v1.0/directory/user-types/{userTypeId}/orgunit-access-restrict

Path Parameters

ParameterTypeDescription
userTypeId string 

사용자 유형 ID
- 리소스 ID
- 외부 키는 "externalKey:{externalKey}" 형태


required
example : employ2c-f321-47a6-ac11-e81fcc23a8c3 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
accessRestrictType string 

조회 제한 타입

  • ONLY_ME: 자신만 조회 가능
  • ONLY_MY_ORGUNIT: 소속된 조직만 조회 가능
  • ONLY_MY_AND_SPECIFIED_ORGUNIT: 소속된 조직과 선택한 특정 조직만 조회 가능

required
Allowed values : ONLY_ME, ONLY_MY_ORGUNIT, ONLY_MY_AND_SPECIFIED_ORGUNIT 
specifiedOrgUnits array (orgUnit) 

조회 제한 타입이 ONLY_MY_AND_SPECIFIED_ORGUNIT일 때 조회 가능한 특정 조직 목록


minItems : 0
maxItems : 200 

orgUnit

PropertyTypeDescription
orgUnitId string 

조직 ID

수정할 때 고객사에서 관리하는 externalKey를 사용하려면 externalKey:{externalKey} 형태로 입력해야 한다.


required 
includeSubOrgUnits boolean 

특정 조직의 하위 조직까지 조회할 수 있게 할지 여부


default : false 

Request Example

example

1{2  "accessRestrictType": "ONLY_MY_AND_SPECIFIED_ORGUNIT",3  "specifiedOrgUnits": [4    {5      "orgUnitId": "orgunitf-f27f-4af8-27e1-03817a911417",6      "includeSubOrgUnits": false7    }8  ]9}

Response

HTTP 201

OK

PropertyTypeDescription
accessRestrictType string 

조회 제한 타입

  • ONLY_ME: 자신만 조회 가능
  • ONLY_MY_ORGUNIT: 소속된 조직만 조회 가능
  • ONLY_MY_AND_SPECIFIED_ORGUNIT: 소속된 조직과 선택한 특정 조직만 조회 가능

required
Allowed values : ONLY_ME, ONLY_MY_ORGUNIT, ONLY_MY_AND_SPECIFIED_ORGUNIT 
specifiedOrgUnits array (orgUnit) 

조회 제한 타입이 ONLY_MY_AND_SPECIFIED_ORGUNIT일 때 조회 가능한 특정 조직 목록


minItems : 0
maxItems : 200 

orgUnit

PropertyTypeDescription
orgUnitId string 

조직 ID

수정할 때 고객사에서 관리하는 externalKey를 사용하려면 externalKey:{externalKey} 형태로 입력해야 한다.


required 
includeSubOrgUnits boolean 

특정 조직의 하위 조직까지 조회할 수 있게 할지 여부


default : false 
orgUnitExternalKey string 

고객사에서 관리하는 외부 키


readOnly : true 

Response Example

example

1{2  "accessRestrictType": "ONLY_MY_AND_SPECIFIED_ORGUNIT",3  "specifiedOrgUnits": [4    {5      "orgUnitId": "orgunitf-f27f-4af8-27e1-03817a911417",6      "includeSubOrgUnits": false,7      "orgUnitExternalKey": "ORGUNIT_EXT_01"8    }9  ]10}

HTTP 400

Bad Request