GetDepartment

Updated at:

Call this API to query organization department information.

Important

The new Qoder CN documentation site is now available. Content on this site may not reflect the latest product features and changes. Visit docs.qoder.cn for the latest product documentation.

Supported editions

Enterprise Dedicated Edition, Enterprise Standard Edition

Service endpoints

Get the service endpoint and replace {domain} in the API request syntax with your endpoint.

Authorization information

Product

Resource

Required permission

Organization Management

Organization departments

Read Only

Request syntax

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

Request description

Enterprise standard edition

Query organization department information

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'

Enterprise dedicated edition

Query organization department information

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'

Request headers (Headers)

x-yunxiao-token string (Required)

The access token. See Access token for details.

Example: pt-0fh3****0fbG_35af****0484.

Request parameters

organizationId string (Required)

The organization ID. You can go to the Basic Information page in the organization management console to obtain the organization ID (organizationId).

id string (Required)

The department ID.

Response parameters

Response example

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

creatorId string

The creator ID.

hasSub string

Indicates whether the department has subdepartments.

id string

The department ID.

name string

The department name.

organizationId string

The organization ID.

parentId string

The parent department ID.

Error codes

For more information, see Error code center.