nesh170 / asap-inventory-system

This is a concept inventory system for ECE458. It is built by ASAPsolutions
1 stars 0 forks source link

Logging #122

Closed ankitkayastha closed 7 years ago

ankitkayastha commented 7 years ago

Logging API

Get All Logs URL: http://localhost:8000/api/logger/ Request Type: GET Response Body: { "count": 2, "next": null, "previous": null, "results": [ { "id": 3, "initiating_user": "admin", "nature": { "id": 1, "color": "blue", "tag": "ITEM_CREATED" }, "timestamp": "2017-02-23T06:12:05.003153Z", "affected_user": "ankit", "item_log": [ { "id": 1, "log_id": 3, "item": { "id": 1, "name": "resistor", "quantity": 95 } } ], "shopping_cart_log": [], "comment": null }, { "id": 4, "initiating_user": "ankit", "nature": { "id": 1, "color": "blue", "tag": "ITEM_CREATED" }, "timestamp": "2017-02-23T06:54:44.088904Z", "affected_user": "admin", "item_log": [ { "id": 2, "log_id": 4, "item": { "id": 1, "name": "resistor", "quantity": 95 } } ], "shopping_cart_log": [], "comment": null } ] }

Detailed View of Log URL: http://localhost:8000/api/logger/{log_id}/ Request Type: GET Response Body: { "id": 4, "initiating_user": "ankit", "nature": { "id": 1, "color": "blue", "tag": "ITEM_CREATED" }, "timestamp": "2017-02-23T06:54:44.088904Z", "affected_user": "admin", "item_log": [ { "id": 2, "log_id": 4, "item": { "id": 1, "name": "resistor", "quantity": 95 } } ], "shopping_cart_log": [], "comment": null }

Get List of Actions URL: http://localhost:8000/api/logger/action/ Request Type: GET Response Body: { "count": 1, "next": null, "previous": null, "results": [ { "id": 1, "color": "blue", "tag": "ITEM_CREATED" } ] }