文档

GetDepartment - 查询组织部门信息

更新时间:

通过 OpenAPI 查询组织部门信息。

适用版本

企业标准版、企业专属版

说明

专属版“组织”对应标准版“企业”概念,本文在专属版中代表组织相关接口,在标准版中代表企业相关接口。

服务接入点与授权信息

请求语法

GET  https://<domain>/oapi/v1/platform/organizations/<organizationId>/departments/<id>

请求头

参数

类型

是否必填

描述

示例值

x-yunxiao-token

string

个人访问令牌。

pt-0fh3****0fbG_35af****0484

请求参数

参数

类型

位置

是否必填

描述

示例值

organizationId

string

path

组织 ID。

99d1****71d4

id

string

path

部门 ID。

8446****ce9f

请求示例

curl -X 'GET' \
  'https://test.rdc.aliyuncs.com/oapi/v1/platform/organizations/99d1****71d4/departments/8446****ce9f' \
  -H 'accept: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

返回参数

参数

类型

描述

示例值

creatorId

string

创建者 ID。

d402****9ae6

hasSub

boolean

是否有子部门。

true

id

string

部门 ID。

8446****ce9f

name

string

名称。

组织部门

organizationId

string

组织 ID。

9a2b****5ef1

parentId

string

父 ID。

f5b8****7a1c

返回示例

 {
    "creatorId": "d402****9ae6",
    "hasSub": true,
    "id": "8446****ce9f",
    "name": "组织部门",
    "organizationId": "9a2b****5ef1",
    "parentId": "f5b8****7a1c"
 }

错误码

访问错误码中心查看 API 相关错误码。