You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to be able to query for open timesheets in order to update existing time sheets (set end date) or to create new timesheets within a shell script (using curl).
Describe the solution you'd like
Add three REST endpoints:
GET /api/timesheets ->
Similar to the existing EPRs such as /api/activities and return all timesheets. As far as I can see a new model needs to be defined here (or at least added to the API documentaiton). Some kind of filter function would be great here (something like adding a get parameter "enddate"="" or "startdate"=2018/09/21" or startdate="21.09.2018"), so that only non-finished timesheets are returned. Maybe it makes sense to return only parts of the model (maybe only id/startdate/enddate while skipping comments)
GET /api/timesheets/{id}
Delivers all the details for a single timesheet (including comments). Can also be used to check if id already exists (HTTP 404 if id is not used... HTTP 200 including details in any other case)
PUT /api/timesheets/{id}
Either creates a new timesheet (if id was not used before) or updates an existing one
Describe alternatives you've considered
Not much... However, I can think of various implementations of the filter method suggested for the GET /api/timesheets. One could either use get parameters or maybe various endpoints (something like GET /api/timesheets/open, /api/timesheets/closed, ...). I personally would prefer get parameters...
Additional context
The new EPRs should also support the authentication mechanisms of the existing REST endpoints.
The text was updated successfully, but these errors were encountered:
I started working on the Timesheet endpoint. The PR #332 currently contains ONLY fetching a collection of all entries for the logged-in user and one endpoint to fetch a single entry.
There is a lot missing by, but a starting point if you want to test and/or add your own ideas.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.
lockbot
locked and limited conversation to collaborators
Jan 17, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is your feature request related to a problem? Please describe.
I want to be able to query for open timesheets in order to update existing time sheets (set end date) or to create new timesheets within a shell script (using curl).
Describe the solution you'd like
Add three REST endpoints:
Similar to the existing EPRs such as /api/activities and return all timesheets. As far as I can see a new model needs to be defined here (or at least added to the API documentaiton). Some kind of filter function would be great here (something like adding a get parameter "enddate"="" or "startdate"=2018/09/21" or startdate="21.09.2018"), so that only non-finished timesheets are returned. Maybe it makes sense to return only parts of the model (maybe only id/startdate/enddate while skipping comments)
Delivers all the details for a single timesheet (including comments). Can also be used to check if id already exists (HTTP 404 if id is not used... HTTP 200 including details in any other case)
Either creates a new timesheet (if id was not used before) or updates an existing one
Describe alternatives you've considered
Not much... However, I can think of various implementations of the filter method suggested for the GET /api/timesheets. One could either use get parameters or maybe various endpoints (something like GET /api/timesheets/open, /api/timesheets/closed, ...). I personally would prefer get parameters...
Additional context
The new EPRs should also support the authentication mechanisms of the existing REST endpoints.
The text was updated successfully, but these errors were encountered: