Shifts
- GET /api/shifts/
Get all shifts.
- Returns:
an object mapping shift ID to Shift object
- GET /api/shifts/(int: shift_id)
Get a single shift.
- Parameters:
shift_id – the ID of the shift to get
- Status Codes:
404 Not Found – if the shift does not exist
- Returns:
a Shift object
- PUT /api/shifts/
Create a new shift.
- Reqjson:
a (partial) Shift, with at least
name
set- Status Codes:
201 Created – on success
400 Bad Request – if the new Shift is invalid
- Returns:
the new Shift object
- PATCH /api/shifts/(int: shift_id)
Edit an existing shift.
- Parameters:
shift_id – the ID of the shift to edit
- Status Codes:
404 Not Found – if the shift does not exist
- Reqjson:
a (partial) Shift object
- Returns:
the modified Shift object
- DELETE /api/shifts/(int: shift_id)
Delete an existing shift.
- Parameters:
shift_id – the ID of the shift to delete
- Status Codes:
404 Not Found – if the shift does not exist
204 No Content – on success