GET/users/{userId}/orgunits

ユーザーが所属する組織のリストを取得する。
原職・兼職の組織が含まれる。

Authorization

oauth2

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

Scope

user
user.read
directory
directory.read

HTTP Request

GEThttps://www.worksapis.com/v1.0/users/{userId}/orgunits

Path Parameters

ParameterTypeDescription
userId string 

ユーザーを特定する ID (URL エンコードする)

  • ユーザー ID (userId)
  • ログイン ID (email)
  • ユーザーの ExternalKey (externalKey:{userExternalKey})

required
example : userf7da-f82c-4284-13e7-030f3b4c756x 

Query Parameters

ParameterTypeDescription
count integer 

取得数


default : 100
minimum : 1
maximum : 100
example : 100
format : int32 
cursor string 

リストのカーソル値 (URL エンコードする)


example : JlIBsfJogXpzDGY8OscZziqZpYqCAu3RbZbaFzBb1od6lWQtSdPUd2FIdCuaGgu8DA== 
membershipType string 

取得する組織

  • ALL (既定): 下位組織を介して所属する組織も含む。
  • DIRECT : ユーザーが直接所属する組織のみを含む。

default : ALL
Allowed values : DIRECT, ALL 

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 

Response

HTTP 200

OK

PropertyTypeDescription
orgUnits array (UserOrgUnit) 

List of team information

 
responseMetaData object (responseMetaData) 

レスポンスのメタデータ

 

UserOrgUnit

PropertyTypeDescription
orgUnitId string 

組織 ID


readOnly : true 
domainId integer 

ドメイン ID


format : int32 
orgUnitName string 

組織名

 
isPrimaryOrgUnit boolean 

代表組織フラグ

 
isPrimaryOrganization boolean 

代表ドメインフラグ

 
useTeamFeature boolean 

組織のトークルーム機能の利用フラグ

 
visible boolean 

ユーザー公開フラグ

 
isManager boolean 

組織長フラグ

 

responseMetaData

PropertyTypeDescription
nextCursor string 

次のリスト取得時に使用するカーソル値

 

Response Example

example

1{2  "orgUnits": [3    {4      "orgUnitId": "orgunitf-f27f-4af8-27e1-03817a911417",5      "domainId": 10000001,6      "orgUnitName": "Development",7      "isPrimaryOrgUnit": true,8      "isPrimaryOrganization": true,9      "useTeamFeature": true,10      "visible": true,11      "isManager": false12    }13  ],14  "responseMetaData": {15    "nextCursor": "JlIBsfJogXpzDGY8OscZziqZpYqCAu3RbZbaFzBb1od6lWQtSdPUd2FIdCuaGgu8DA=="16  }17}

HTTP 403

Forbidden

HTTP 404

Not Found