| Name | Description |
---|
1 | Anchor |
---|
| Add department |
---|
| Add department |
---|
| Add department | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Add a new department. |
Name | Description |
---|
URL | /department | HTTP Method | POST | Body Parameters | Parameter | Description |
---|
id | Department ID. | name | Department name. | description | Description of department. | organization | Key | Description |
---|
id | ID of the organization that this department belongs to. |
|
| Sample Response | Code Block |
---|
| {
"id": "apiTestDept",
"name": "API TEST Department",
"description": "This is a department created by API.",
"organization": {
"id": "ORG-001"
}
} |
|
|
2 | Anchor |
---|
| Assign user to department |
---|
| Assign user to department |
---|
| Assign user to department | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Assign a Joget user to a department. |
Name | Description |
---|
URL | /department/assignUser/{department}/{username} | HTTP Method | POST | Path Parameters | Parameter | Description |
---|
department | Department ID. | username | Username of Joget user. |
| Sample Response | Code Block |
---|
| {
"userId": "cat",
"startDate": null,
"endDate": null,
"employeeCode": "",
"gradeId": "G-003",
"departmentId": "apiTestDept",
"organizationId": "ORG-001"
} |
|
|
3 | Anchor |
---|
| Delete department |
---|
| Delete department |
---|
| Delete department | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Delete a department via department ID. |
Name | Description |
---|
URL | /department/{id} | HTTP Method | DELETE | Path Parameters | Parameter | Description |
---|
id | Department ID. |
| Sample Response | Code Block |
---|
| {
"date": "Wed Aug 28 01:29:38 SGT 2019",
"code": "200",
"message": "Successful operation"
} |
|
|
4 | Anchor |
---|
| Find department |
---|
| Find department |
---|
| Find department | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| 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 | Code Block |
---|
| [
{
"id": "D-001",
"name": "CEO Office",
"description": "",
"organization": {
"id": "ORG-001"
}
},
{
"id": "D-002",
"name": "Human Resource and Admin",
"description": "",
"organization": {
"id": "ORG-001"
}
},
.....
] |
|
|
5 | Anchor |
---|
| Get department by ID |
---|
| Get department by ID |
---|
| Get department by ID | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Get details of a department via department ID. |
Name | Description |
---|
URL | /department/{id} | HTTP Method | GET | Path Parameters | Parameter | Description |
---|
id | Department ID. |
| Sample Response | Code Block |
---|
| {
"id": "D-001",
"name": "CEO Office",
"description": "",
"organization": {
"id": "ORG-001"
}
} |
|
|
6 | Anchor |
---|
| Unassign user from department |
---|
| Unassign user from department |
---|
| Unassign user from department | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Unassign a Joget user from a department. |
Name | Description |
---|
URL | /department/unassignUser/{department}/{username} | HTTP Method | DELETE | Path Parameters | Parameter | Description |
---|
department | Department ID. | username | Username of Joget user. |
| Sample Response | Code Block |
---|
| {
"date": "Thu Dec 05 03:29:56 SGT 2019",
"code": "200",
"message": "Successful operation"
} |
|
|
7 | Anchor |
---|
| Update department |
---|
| Update department |
---|
| Update department | Panel |
---|
borderColor | black |
---|
bgColor | #fbfff5 |
---|
borderStyle | solid |
---|
| Update the details of a department. |
Name | Description |
---|
URL | /department | HTTP Method | PUT | Body Parameters | Parameter | Description |
---|
id | Department ID. | name | Department name. | description | Description of department. | organization | Key | Description |
---|
id | ID of the organization that this department belongs to. |
|
| Sample Response | Code Block |
---|
| {
"id": "apiTestDept",
"name": "API TEST Department",
"description": "I update this department description via API.",
"organization": {
"id": "ORG-001"
}
} |
|
|