Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To create a new entry (on form submit):
- POST /timelog/users/6
- example body:
- { "projectId": 13, "minutes": 120, "timestamp": 1585218099 }
- The timestamp will be used as a user-unique Id
- To retrieve this entry:
- GET /timelog/users/6/1585218099
- To retrieve multiple entries:
- GET /timelog?dateStart=23-03-2020&dateEnd=26-03-2020&userId=6&projectId=13
- filter args are optional and alter the response body below
- example response body:
- {
- "2020-03-23":
- [
- {
- "userId": 6,
- "entries":
- {
- "1585218099": { "projectId": 13, "minutes": 120 },
- "1585240189": { "projectId": 21, "minutes": 30000 }
- }
- },
- ...
- ],
- "2020-03-24":
- [
- ...
- ],
- ...
- }
- To delete an entry:
- DELETE /timelog?/users/6/1585240189
- Or to amend an entry:
- PUT /timelog?/users/6/1585240189
- example body:
- { "projectId": 13, "minutes": 30 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement