Files
tryton/modules/timesheet/doc/user_application.rst
T

32 lines
1.4 KiB
ReStructuredText
Raw Normal View History

2016-10-02 00:40:13 +02:00
Timesheet User Application
##########################
The timesheet module defines some routes for user applications:
2022-12-20 14:07:50 +01:00
- ``GET`` ``/<database_name>/timesheet/employees``:
return the list of the user employees as dictionary with the keys: ``id``
and ``name``.
2016-10-02 00:40:13 +02:00
2022-12-20 14:07:50 +01:00
- ``GET`` ``/<database_name>/timesheet/employee/<int:employee>/works``:
2016-10-02 00:40:13 +02:00
return the list of works available for the employee. The works are
2022-12-20 14:07:50 +01:00
dictionary with keys: ``id``, ``name``, ``start`` and ``end``. The dates
are in the format ``%Y-%m-%d``.
2016-10-02 00:40:13 +02:00
2022-12-20 14:07:50 +01:00
- ``GET`` ``/<database_name>/timesheet/employee/<int:employee>/lines/<date>``:
2016-10-02 00:40:13 +02:00
return the list of timesheet lines for the employee at the date
2022-12-20 14:07:50 +01:00
(``%Y-%m-%d``). The lines are dictionary with keys: ``id``, ``work``,
``work.name``, ``duration``, ``description`` and ``uuid``. The duration
is in seconds.
2016-10-02 00:40:13 +02:00
2022-12-20 14:07:50 +01:00
- ``POST`` ``/<database_name>/timesheet/line``:
2016-10-02 00:40:13 +02:00
Create a line using the data as dictionary of value. The date must be in
2022-12-20 14:07:50 +01:00
the format ``%Y-%m-%d`` and the ``duration`` in seconds. If a ``uuid``
value is provided, it will update the record if found instead of create a
new one.
2016-10-02 00:40:13 +02:00
2022-12-20 14:07:50 +01:00
- ``PUT`` ``/<database_name>/timesheet/line/<int:line>``:
Update the line using the data like for the ``POST``.
2016-10-02 00:40:13 +02:00
2022-12-20 14:07:50 +01:00
- ``DELETE`` ``/<database_name>/timesheet/line/<int:line>``:
2016-10-02 00:40:13 +02:00
Delete the line