/workTimes
Employees can track their working times on projects. Multiple working times per day are allowed. Supervisors can create billable times out of working times.
Endpoints
Projections
Name | Description |
---|---|
withProject | The project is embedded. |
withEmployee | The employee is embedded. |
GET /{id}▲
Get a single workTime by its id.
Security
ROLE_SUPERVISOR or owning employee.
Returns
One workTime.
GET /search/findByEmployeeAndDateOrderByStartTimeAsc▲
Find all working times for an employee and a given date.
Security
ROLE_SUPERVISOR or owning employee.
Returns
A list of workTimes.
Parameters
name | type | required | description |
---|---|---|---|
employee | Long | true | The id of the employee to search for. |
date | Date | true | The date to search for. |
GET /search/findByEmployeeAndDateBetweenOrderByDateAscStartTimeAsc▲
Find all working times for an employee in a time interval.
Security
ROLE_SUPERVISOR or owning employee.
Returns
A list of workTimes.
Parameters
name | type | required | description |
---|---|---|---|
employee | Long | true | The id of the employee to search for. |
start | Date | true | The start of the interval. |
end | Date | true | The end of the interval. |
GET /search/findByProjectAndDateBetweenOrderByDateAscStartTimeAsc▲
Find all working times for a project in a time interval.
Security
ROLE_SUPERVISOR.
Returns
A list of workTimes.
Parameters
name | type | required | description |
---|---|---|---|
project | Long | true | The id of the project to search for. |
start | Date | true | The start of the interval. |
end | Date | true | The end of the interval. |
GET /search/findByDateBetween▲
Find all working times in a time interval.
Security
ROLE_ADMIN.
Returns
A list of workTimes.
Parameters
name | type | required | description |
---|---|---|---|
start | Date | true | The start of the interval. |
end | Date | true | The end of the interval. |
POST /▲
Create a new workTime. Returns the created object.
Security
Only the proposed owner of the workTime.
Returns
A single workTime.
PUT /{id}▲
Update the workTime identified by id. Returns the updated object.
Security
ROLE_ADMIN or owning employee.
Returns
A single workTime.
DELETE /{id}▲
Delete the workTime identified by id.
Security
ROLE_ADMIN or owning employee.
Returns
Nothing