You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 10
Next »
Department API can perform functions to interact or exchange data for Department.
| Name | Description |
---|
1 | | Name | Description |
---|
URL | /department | HTTP Method | POST | Body Parameters | Parameter | Description |
---|
id | Department ID. | name | Department name. | description | Description of department. |
| Sample Response |
{
"id": "apiTestDept",
"name": "API TEST Department",
"description": "This is a department created by API."
}
|
|
2 | |
Delete a department via department ID.
Name | Description |
---|
URL | /department/{id} | HTTP Method | DELETE | Path Parameters | Parameter | Description |
---|
id | Department ID. |
| Sample Response |
{
"date": "Wed Aug 28 01:29:38 SGT 2019",
"code": "200",
"message": "Successful operation"
}
|
|
3 | |
Gets all departments from all organizations by default. Able to filter or sort the returned results via parameters.
Name | Description |
---|
URL | /department/find | HTTP Method | GET | Query String Parameters | Parameter | Description |
---|
nameFilter | Filters the response via department ID. | organizationId | Filter departments that belong to an organization, via organization ID. | sort | Department data column to sort. Must be used in conjunction with "sortDescending" parameter. | sortDescending | Sort the specified "sort" parameter value in ascending or descending order. Expects a boolean value. Must be used in conjunction with "sort" parameter. | startOffset | Starting position of records to start query. Expects an integer. | pageSize | Number of results to return. Expects an integer. |
| Sample Response |
[
{
"id": "D-001",
"name": "CEO Office",
"description": ""
},
{
"id": "D-002",
"name": "Human Resource and Admin",
"description": ""
},
.....
]
|
|
4 | |
Get details of a department via department ID.
Name | Description |
---|
URL | /department/{id} | HTTP Method | GET | Query String Parameters | | Sample Response | |
|
5 | Update department |
Update the details of a department.
Name | Description |
---|
URL | /department | HTTP Method | PUT | Query String Parameters | | Sample Response | |
|