Timetracker API
Reads and writes one timesheet, stored as a CSV. Private endpoint — every route
except /api/health needs a key.
Send the key as X-API-Key, or as Authorization: Bearer <key>.
Entries
| Method | Route | What it does |
|---|---|---|
| GET | /api/entries | List entries. Filters: project, from, to, open, limit. |
| GET | /api/entries/{id} | One entry. |
| POST | /api/entries | Add an entry. Project required, Date defaults to today. |
| PATCH | /api/entries/{id} | Change any fields of one entry. |
| DELETE | /api/entries/{id} | Delete one entry. |
Timer
| Method | Route | What it does |
|---|---|---|
| GET | /api/timer | The running entry, if any. |
| POST | /api/timer/start | Start on a project. Start time rounds down to the quarter hour. |
| POST | /api/timer/stop | Close the running entry. End time rounds up to the quarter hour. |
Both accept at (HH:MM) to log a time other than now, and a
Description. Starting while one already runs returns 409 unless
?force=true.
Columns
| Method | Route | What it does |
|---|---|---|
| GET | /api/columns | List the columns. |
| POST | /api/columns | Add one: {"name":"Kunde"}, optionally after. Backfills blank on every row. |
| DELETE | /api/columns/{name} | Remove one and its data. Needs ?confirm=true. |
id can never be deleted. The columns the timer relies on need
&force=true as well.
Reading it back
| Method | Route | What it does |
|---|---|---|
| GET | /api/summary | Hours per project. Same filters as /api/entries. |
| GET | /api/export.csv | The whole sheet as CSV, Excel-safe. |
| GET | /api/export.xlsx | Formatted workbook. |
| GET | /api/health | Liveness. No key needed. |
Examples
curl -H "X-API-Key: $KEY" https://timetracker.elias-teubner.dev/api/entries
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"Project":"Voice Service Agent"}' \
https://timetracker.elias-teubner.dev/api/timer/start
curl -X POST -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
-d '{"Description":"Hangup-Problem behoben"}' \
https://timetracker.elias-teubner.dev/api/timer/stop
curl -H "X-API-Key: $KEY" -o timesheet.xlsx \
https://timetracker.elias-teubner.dev/api/export.xlsx