POST
{
"command": "SET_PROCESS_THRESHOLD",
"parameters": {
"processName": "New Vacation Request",
"newTargetDurationInMillis": "NULL | 0"
}
}
- How to know if the user is using the API properly?
- We should notify if the user didn't sent
newTargetDurationInMillis
Possible bad usage:
{
"command": "SET_PROCESS_THRESHOLD",
"parameters": {
"processName": "New Vacation Request",
"newTargetDurationInMilli": 345345345
}
}
-> This will remove the target duration... hard to know why.
POST
{
"command": "REMOVE_PROCESS_THRESHOLD",
"parameters": {
"processName": "New Vacation Request"
}
}
- It's a command and follow the same "standard" with POST
- Required the front to know that instead of sending empty, it should send another command.
DELETE
{
"command": "PROCESS_THRESHOLD",
"parameters": {
"processName": "New Vacation Request"
}
}
- Same as previous, but sending with a delete verb.
- However the resource is not deleted, just the property.
DELETE
{
"command": "PROCESS",
"parameters": {
"processName": "New Vacation Request"
}
}
- DELETE verb to delete the Process resource.
- Too easy to implement...