GET /system-ms/department/v1/by-parent/{parentDepartmentId}
Get all departments under respective parent department. Only Admin users can use this request.
-
Perform the authentication and login to the API. For more information, see POST /auth/login.
Use GET /system-ms/department/v1/by-parent/{parentDepartmentId} to send an HTTP GET request.
Click Try it Out option.
-
Set the parameters as listed in the following table.
Parameter Name
Sample Value
Supported Value
Description
parentDepartmentId
parentDepartmentId
integer 32
Indicates the parent ID of the department.
Note:This parameter is mandatory.
pageNo
0
integer 32
Indicates the page number.
Default Value: 0
Note:This parameter is mandatory.
pageSize
10
integer 32
Indicates the number of items to include.
Default Value: 10
Note:This parameter is mandatory.
sortBy
departmentId
string
Indicates the sort by value.
Default Value: departmentId
Note:This parameter is mandatory.
sortDir
ASC
string
Indicates the sort directory value.
Default Value: ASC
Note:This parameter is mandatory.
-
Click on Execute to generate the request URL.
Request URL:
The following table lists the expected responses.https://<IP_Address>:<PORT>/system-ms/department/v1/by-parent/1?pageNo=0&pageSize=10&sortBy=departmentId&sortDir=ASC
Response Type
Value
Schema
Valid Response
200 OK
[ { "departmentList": [ { "departmentId": 0, "departmentName": "string", "parentDepartmentId": 0, "location": { "locationId": 0, "locationName": "string", "description": "string" }, "description": "string", "udf1": "string", "udf2": "string", "udf3": "string", "udf4": "string", "udf5": "string", "udf6": "string", "udf7": "string", "udf8": "string", "udf9": "string", "udf10": "string" } ], "page": { "pageNo": 0, "pageSize": 0, "totalPages": 0, "totalElements": 0, "numberOfElements": 0, "first": true, "last": true } } ]
Error Response
400 Bad Request
Not applicable
401 Authentication Failure
Not applicable
403 Forbidden
Not applicable
404 Not found
Not applicable