GetSysDept - 查询企业部门信息

通过 OpenAPI 查询企业部门信息。

适用版本

企业专属版

服务接入点

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

请求语法

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

请求说明

查询指定企业部门信息

curl -X 'GET' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/departments/{id}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

请求头(Headers)

x-yunxiao-token string (必选)

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

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

请求参数

id string (必选)

企业部门 ID。您可通过调用ListSysDepts 接口获取。

返回参数

返回示例

[
    {
        "id": "ebeb5a64-c98c-478a-9d9d-513841da****",
        "name": "企业部门",
        "creatorId": "dff43c50-75c5-4d17-86bf-3e900bc7****",
        "parentId": "327cf4eb-6ef7-4f50-9a4f-7f4fd4d9****",
        "hasSub": true
    }
]

id string

部门 ID。

name string

部门名称。

creatorId string

创建人 ID。

parentId string

父部门 ID。

hasSub boolean

是否有子部门。

  • true:表示有子部门。

  • false:当不存在子部门时,该参数不返回。

错误码

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