Guest User

Untitled

a guest
Feb 15th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. **This is a `GET` API to fetch information related to logs that maintains the change history of exclusions for a category**
  2.  
  3. **Request URL:**
  4. `/profiling/v1/partners/<partnerid>/sites/<siteid>/category/<catID>/exclusion/<exID>/exclusionlogs`
  5.  
  6. **API Response**
  7. ``` javascript
  8.  
  9. {
  10. "history": [
  11. {
  12. "action": "created/added/removed",
  13. "newExclusions": [
  14. "e1",
  15. "e2",
  16. "e3"
  17. ],
  18. "updatedAt": 1243243414,
  19. "updatedBy": "some user"
  20. }
  21. ]
  22. }
  23. ```
  24. `updatedExclusions` field would contain the exclusions that were added or removed.
  25. `action` would be decided based on the differences between the old and the new exclusions lists
  26.  
  27. **Proposed Schema for maintaining log history**
  28. ```
  29. CREATE TABLE profiling_service_db.exclusion_change_history (
  30. partnerid text,
  31. siteid text,
  32. categoryid uuid,
  33. exclusion_id uuid,
  34. clientid text,
  35. old_exclusions list<text>,
  36. diff list<text>,
  37. updated_at bigint,
  38. updated_by text,
  39. PRIMARY KEY (partnerid, siteid, categoryid, exclusion_id, updated_at)
  40. );
  41. ```
Add Comment
Please, Sign In to add comment