Advertisement
Guest User

Untitled

a guest
Mar 26th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. To create a new entry (on form submit):
  2. POST /timelog/users/6
  3. example body:
  4. { "projectId": 13, "minutes": 120, "timestamp": 1585218099 }
  5.  
  6. The timestamp will be used as a user-unique Id
  7.  
  8. To retrieve this entry:
  9. GET /timelog/users/6/1585218099
  10.  
  11. To retrieve multiple entries:
  12. GET /timelog?dateStart=23-03-2020&dateEnd=26-03-2020&userId=6&projectId=13
  13. filter args are optional and alter the response body below
  14. example response body:
  15. {
  16. "2020-03-23":
  17. [
  18. {
  19. "userId": 6,
  20. "entries":
  21. {
  22. "1585218099": { "projectId": 13, "minutes": 120 },
  23. "1585240189": { "projectId": 21, "minutes": 30000 }
  24. }
  25. },
  26. ...
  27. ],
  28.  
  29. "2020-03-24":
  30. [
  31. ...
  32. ],
  33.  
  34. ...
  35. }
  36.  
  37. To delete an entry:
  38. DELETE /timelog?/users/6/1585240189
  39.  
  40. Or to amend an entry:
  41. PUT /timelog?/users/6/1585240189
  42. example body:
  43. { "projectId": 13, "minutes": 30 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement