API Documentation

/sickDays

Employees can track when they are sick.

Endpoints

MethodPath
GET/{id}
GET/search/findByEmployee
GET/search/findByStartDateBetweenOrEndDateBetween
POST/
PUT/{id}
DELETE/{id}

Projections

NameDescription
withEmployeeThe employee is embedded.

Structure

FieldnameFieldtypeValidations
idLong
versionInteger
startDateDatenot null
endDateDate
LinksSecurity
employeeNo update or delete.

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

nametyperequireddescription
employeeLongtrueThe 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

nametyperequireddescription
startLowerDatetrueThe lower bound for the start date interval.
startHigherDatetrueThe upper bound for the start date interval.
endLowerDatetrueThe lower bound for the end date interval.
endHigherDatetrueThe 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