Call this API to query the list of organization departments.
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 |
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
Request description |
Query the list of organization departments
Query all subdepartments under a specific department
|
Request headers (Headers) |
|
|
The access token. See Access token for details. Example: pt-0fh3****0fbG_35af****0484. |
|
Request parameters |
|
|
organizationId The organization ID. You can go to the System Management page in the Organization Management console to obtain the organization ID (organizationId). |
|
|
parentId The parent department ID. |
|
|
page The current page. |
|
|
perPage The number of entries per page. Valid values: |
Response parameters |
Sample response
|
|
creatorId The creator ID. |
|
|
hasSub Indicates whether the department has subdepartments. |
|
|
id The department ID. |
|
|
name The department name. |
|
|
organizationId The organization ID. |
|
|
parentId The parent department ID. |
Response header
|
Parameter |
Description |
Sample value |
|
x-next-page |
The next page. |
1 |
|
x-page |
The current page. |
2 |
|
x-per-page |
The number of entries per page. |
1 |
|
x-prev-page |
The previous page. |
2 |
|
x-total |
The total number of entries. |
1 |
|
x-total-pages |
The total number of pages. |
10 |
Error codes
For more information, see Error code center.