API Documentation
/sickDays
Employees can track when they are sick.
Endpoints
Method | Path |
---|---|
GET | /{id} |
GET | /search/findByEmployee |
GET | /search/findByStartDateBetweenOrEndDateBetween |
POST | / |
PUT | /{id} |
DELETE | /{id} |
Projections
Name | Description |
---|---|
withEmployee | The employee is embedded. |
GET /{id}▲
Get a single sickDay by its id.
Security
ROLE_ADMIN or owning employee.
Returns
One sickDay.
GET /search/findByEmployee▲
Find all sickDays for an employee.
Security
Only the owning employee.
Returns
A list of sickDays.
Parameters
name | type | required | description |
---|---|---|---|
employee | Long | true | The employee to fetch the sickDays for. |
GET /search/findByStartDateBetweenOrEndDateBetween▲
Find all sickDays that have the start date in a given interval or the end date in another given interval.
Security
ROLE_ADMIN
Returns
A list of sickDays.
Parameters
name | type | required | description |
---|---|---|---|
startLower | Date | true | The lower bound for the start date interval. |
startHigher | Date | true | The upper bound for the start date interval. |
endLower | Date | true | The lower bound for the end date interval. |
endHigher | Date | true | The upper bound for the end date interval. |
POST /▲
Create a new sickDay. Returns the created object. Sends an email to all ROLE_SUPERVISOR employees about the new sickDay.
Security
ROLE_ADMIN or owning employee.
Returns
A single sickDay.
PUT /{id}▲
Update the sickDay identified by id. Returns the updated object. Sends an email to all ROLE_SUPERVISOR employees about the updated sickDay.
Security
ROLE_ADMIN or owning employee.
Returns
A single sickDay.
DELETE /{id}▲
Delete the sickDay identified by id.
Security
ROLE_ADMIN
Returns
Nothing