POST/orgunits/{orgUnitId}/orgunit-access-restrict

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

Authorization

oauth2

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

Scope

directory
orgunit

HTTP Request

POSThttps://www.worksapis.com/v1.0/orgunits/{orgUnitId}/orgunit-access-restrict

Path Parameters

ParameterTypeDescription
orgUnitId string 

組織を特定する ID (URL エンコードする)

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

required
example : orgunitf-f27f-4af8-27e1-03817a911417 

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": true7    }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