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

利用権限タイプに組織図閲覧の制限を登録する。
制限は利用権限タイプに指定されたユーザーに適用される。
閲覧制限は ユーザー → 利用権限タイプ → 組織 の順に適用される。

Authorization

oauth2

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

Scope

directory

HTTP Request

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

Path Parameters

ParameterTypeDescription
userTypeId string 

利用権限タイプを特定する ID (URL エンコードする)

  • 利用権限タイプ ID (userTypeId)
  • 利用権限タイプの ExternalKey (externalKey:{userTypeExternalKey})

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

  • 組織 ID (orgUnitId)
  • 組織の ExternalKey (externalKey:{orgUnitExternalKey})

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

  • 組織 ID (orgUnitId)
  • 組織の ExternalKey (externalKey:{orgUnitExternalKey})

required 
includeSubOrgUnits boolean 

指定した組織の下位組織を含む


default : false 
orgUnitExternalKey string 

組織の ExternalKey


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