Update API Endpoints

Marcel Schwarz 2020-04-21 06:46:13 +00:00
parent a70a6df40c
commit 61aca90aeb

@ -7,13 +7,13 @@
## Endpoints (GET)
* "/login?username=bla&password=bla" → Returns a session token (later for authentication #16)
* "/logout?token=tk" → Invalidates the local token
* "/users" → returns list of all users
* "/users/{uid}" → returns a single user
* "/users/{uid}/accounts" → returns all timetrack account ids of that user
* "/accounts/{accountid}" → all metadata of that account
* "/records?uid=bla&[startdate=date, enddate=date, timetrackaccount=[all, account1, account2]]" -> returns all records which match these params
* "/records/start?accountid=bla" → start new record for that account
* "/records/stop?accountid=bla" → stop recording for that account
* "/users?token=tk" → returns list of all users
* "/users/{uid}?token=tk" → returns a single user
* "/users/{uid}/accounts?token=tk" → returns all timetrack account ids of that user
* "/accounts/{accountid}?token=tk" → all metadata of that account
* "/records?token=tk&uid=bla&[startdate=date, enddate=date, timetrackaccount=[all, account1, account2]]" -> returns all records which match these params
* "/records/start?token=tk&accountid=bla" → start new record for that account
* "/records/stop?token=tk&accountid=bla" → stop recording for that account
## Endpoints (POST)
* "/users?token=tk" → Payload user data in request body