Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- **This is a `GET` API to fetch information related to logs that maintains the change history of exclusions for a category**
- **Request URL:**
- `/profiling/v1/partners/<partnerid>/sites/<siteid>/category/<catID>/exclusion/<exID>/exclusionlogs`
- **API Response**
- ``` javascript
- {
- "history": [
- {
- "action": "created/added/removed",
- "newExclusions": [
- "e1",
- "e2",
- "e3"
- ],
- "updatedAt": 1243243414,
- "updatedBy": "some user"
- }
- ]
- }
- ```
- `updatedExclusions` field would contain the exclusions that were added or removed.
- `action` would be decided based on the differences between the old and the new exclusions lists
- **Proposed Schema for maintaining log history**
- ```
- CREATE TABLE profiling_service_db.exclusion_change_history (
- partnerid text,
- siteid text,
- categoryid uuid,
- exclusion_id uuid,
- clientid text,
- old_exclusions list<text>,
- diff list<text>,
- updated_at bigint,
- updated_by text,
- PRIMARY KEY (partnerid, siteid, categoryid, exclusion_id, updated_at)
- );
- ```
Add Comment
Please, Sign In to add comment