Grade API can interact with Grade and its users.
| Name | Description |
---|
1 | | Name | Description |
---|
URL | /grade | HTTP Method | POST | Body Parameters | Parameter | Description |
---|
id | Grade ID. | name | Grade name. | description | Description of grade. | organization | Key | Description |
---|
id | ID of the organization that this grade belongs to. |
|
| Sample Response |
{
"id": "apiTestGrade",
"name": "API Test Grade",
"description": "This is a grade created by API.",
"organization": {
"id": "ORG-001"
}
}
|
|
2 | |
Assign a Joget user to a grade.
Name | Description |
---|
URL | /grade/assignUser/{grade}/{username} | HTTP Method | POST | Path Parameters | Parameter | Description |
---|
grade | Grade ID. | username | Username of Joget user. |
| Sample Response |
{
"userId": "cat",
"startDate": null,
"endDate": null,
"employeeCode": "",
"gradeId": "apiTestGrade",
"departmentId": null,
"organizationId": "ORG-001"
}
|
|
3 | |
Delete a grade via grade ID.
Name | Description |
---|
URL | /grade/{id} | HTTP Method | DELETE | Path Parameters | Parameter | Description |
---|
id | Grade ID. |
| Sample Response |
{
"date": "Wed Aug 28 15:43:58 SGT 2019",
"code": "200",
"message": "Successful operation"
}
|
|
4 | |
Gets all grades from all organizations by default. Able to filter or sort the returned results via parameters.
Name | Description |
---|
URL | /grade/find | HTTP Method | GET | Query String Parameters | Parameter | Description |
---|
nameFilter | Filters the response via grade ID. | organizationId | Filter grades that belong to an organization, via organization ID. | sort | Grade 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": "G-001",
"name": "Board Members",
"description": "",
"organization": {
"id": "ORG-001"
}
},
{
"id": "G-002",
"name": "Managers",
"description": "",
"organization": {
"id": "ORG-001"
}
},
.....
]
|
|
5 | |
Get details of a grade via grade ID.
Name | Description |
---|
URL | /grade/{id} | HTTP Method | GET | Path Parameters | Parameter | Description |
---|
id | Grade ID. |
| Sample Response |
{
"id": "G-001",
"name": "Board Members",
"description": "",
"organization": {
"id": "ORG-001"
}
}
|
|
6 | |
Unassign a Joget user from a grade.
Name | Description |
---|
URL | /grade/unassignUser/{grade}/{username} | HTTP Method | DELETE | Path Parameters | Parameter | Description |
---|
grade | Grade ID. | username | Username of Joget user. |
| Sample Response |
{
"date": "Thu Dec 05 03:29:56 SGT 2019",
"code": "200",
"message": "Successful operation"
}
|
|
7 | |
Update the details of a grade.
Name | Description |
---|
URL | /grade | HTTP Method | PUT | Body Parameters | Parameter | Description |
---|
id | Grade ID. | name | Grade name. | description | Description of grade. | organization | Key | Description |
---|
id | ID of the organization that this grade belongs to. |
|
| Sample Response |
{
"id": "apiTestGrade",
"name": "API Test Grade",
"description": "This grade is updated via API.",
"organization": {
"id": "ORG-001"
}
}
|
|