simple working day time tracking with a basic rest api
Find a file
2023-02-02 12:48:05 +01:00
.vscode some minor improvements 2023-02-01 14:10:00 +01:00
docker fixed some minor bugs, added docker files 2023-01-31 16:46:28 +01:00
internal improvements and fixes 2023-02-02 12:48:05 +01:00
.gitignore added gitignore file and updated some stuff 2023-01-30 10:31:47 +01:00
config.yml improvements and fixes 2023-02-02 12:48:05 +01:00
docker-compose.yml updated docker files and config 2023-01-31 17:07:36 +01:00
go.mod initial commit 2023-01-27 17:11:22 +01:00
go.sum initial commit 2023-01-27 17:11:22 +01:00
LICENSE.md initial commit 2023-01-27 17:11:22 +01:00
main.go initial commit 2023-01-27 17:11:22 +01:00
README.md improvements and fixes 2023-02-02 12:48:05 +01:00

worklog

simple workday recording with a basic rest api

endpoints

method url arguments description
get /csv from=DD.MM.YYYY
to=DD.MM.YYYY
get recordings (for specified range) as csv
get /json from=DD.MM.YYYY
to=DD.MM.YYYY
get recordings (for specified range) as json
get /today get aggregated recordings for today as json (if any)
get /overtime get aggregated overtime (for specified range)
post /start start a new recording
post /stop stop the current recording (if any)

note:
the api uses basic authentication so each request has to include an Authorization request header.

examples

start a new recording:
curl -X POST -u username:password http://localhost:3333/start

stop the current recording:
curl -X POST -u username:password http://localhost:3333/stop

get all recordings as json:
curl -u username:password http://localhost:3333/json

get all recordings for january 2023 as csv:
curl -u username:password http://localhost:3333/csv?from=01.01.2023&to=31.01.2023

configuration

configuration is entirely done inside the file config.yml.
you can specify the location of the config file with the optional argument --config or -c when starting the server.
otherwise the program will try to find a config file at the following locations:

  • $HOME/.config/worklog/config.yml
  • $PWD/config.yml