# 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 (in range) as csv | | `get` | /json| from=DD.MM.YYYY
to=DD.MM.YYYY | get recordings (in range) as json | | `get` | /today | | get aggregated recordings for today as json (if any) | | `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`