ListSysDepts - List departments
Retrieves a list of departments in an organization.
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
|
Product |
Resource |
Required permission |
|
Organization settings |
Departments |
Read-Only |
Request syntax
GET https://{domain}/oapi/v1/platform/departments?parentId={parentId}&page={page}&perPage={perPage}
Request details |
List top-level departments
List subdepartments
|
Request headers |
|
|
The access token. See Access token for details. Example: pt-0fh3****0fbG_35af****0484. |
|
Query parameters |
|
|
parentId The ID of the parent department.
|
|
|
page The page number of the results to return. |
|
|
perPage The number of items to return per page. Valid values: |
Response parameters |
Response example
|
|
id The unique ID of the department. |
|
|
name The name of the department. |
|
|
creatorId The ID of the user who created the department. |
|
|
parentId The ID of the parent department. |
|
|
hasSub Indicates whether the department has subdepartments.
|
Response headers
|
Parameter |
Description |
Example value |
|
|
The next page |
2 |
|
|
The current page |
1 |
|
|
The number of entries per page |
100 |
|
|
The previous page |
0 |
|
|
The request ID |
37294673-00CA-5B8B-914F-A8B35511E90A |
|
|
The total number of entries |
10 |
|
|
The total number of pages |
1 |
Error codes
For more information, see Error code center.