API Documentation

/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

MethodPath
GET/{id}
GET/search/findByEmployeeAndDateOrderByStartTimeAsc
GET/search/findByEmployeeAndDateBetweenOrderByDateAscStartTimeAsc
GET/search/findByProjectAndDateBetweenOrderByDateAscStartTimeAsc
GET/search/findByDateBetween
POST/
PUT/{id}
DELETE/{id}

Projections

NameDescription
withProjectThe project is embedded.
withEmployeeThe employee is embedded.

Structure

FieldnameFieldtypeValidations
idLong
versionInteger
dateDatenot null
startTimeTime
endTimeTime
commentString
LinksSecurity
employeeNo update or delete.
projectUpdate by ROLE_ADMIN or owning employee, no delete.

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

nametyperequireddescription
employeeLongtrueThe id of the employee to search for.
dateDatetrueThe 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

nametyperequireddescription
employeeLongtrueThe id of the employee to search for.
startDatetrueThe start of the interval.
endDatetrueThe 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

nametyperequireddescription
projectLongtrueThe id of the project to search for.
startDatetrueThe start of the interval.
endDatetrueThe end of the interval.

GET /search/findByDateBetween

Find all working times in a time interval.

Security

ROLE_ADMIN.

Returns

A list of workTimes.

Parameters

nametyperequireddescription
startDatetrueThe start of the interval.
endDatetrueThe 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