查询组织部门信息

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

适用版本

企业专属版、企业标准版

服务接入点

获取服务接入点,替换 API 请求语法中的 {domain}

授权信息

产品

资源

所需权限

组织管理

组织部门

只读

请求语法

GET https://{domain}/oapi/v1/platform/organizations/{organizationId}/departments/{id}

请求说明

企业标准版

查询组织部门信息

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

企业专属版

查询组织部门信息

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

请求头(Headers)

x-yunxiao-token string (必选)

个人访问令牌。您可参考个人访问令牌获取。

示例:pt-0fh3****0fbG_35af****0484。

请求参数

organizationId string (必选)

组织 ID。您可前往组织管理后台的基本信息页面获取组织ID(organizationId)

id string(必选)

部门 ID。

返回参数

返回示例

{
    "creatorId": "99d1****6124",
    "hasSub": true,
    "id": "99d1****6124",
    "name": "示例",
    "organizationId": "99d1****6124",
    "parentId": "99d1****6124"
}

creatorId string

创建人 ID。

hasSub string

是否有子部门。

id string

部门 ID。

name string

部门名称。

organizationIdstring

组织 ID。

parentIdstring

父部门 ID。

错误码

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