{"info":{"_postman_id":"c78512a7-b739-4199-b86d-1c3d1bd0bec2","name":"Bazar.com","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"33323023","collectionId":"c78512a7-b739-4199-b86d-1c3d1bd0bec2","publishedId":"2sA35Ba439","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-03-22T21:22:14.000Z"},"item":[{"name":"gateway","item":[{"name":"Get All Books","event":[{"listen":"test","script":{"id":"75c0254a-fa98-4c38-8dab-259a16a7c4b3","exec":[""],"type":"text/javascript","packages":{}}}],"id":"5c185961-e701-4bea-825f-e0e6f04f0637","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://0.0.0.0:5050/gateway/books","description":"<p>This endpoint makes an HTTP GET request to retrieve a list of books from the server. The response will be in JSON format and will include the ID, price, quantity, title, and topic of each book.</p>\n<p>Here the response body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n    {\n        \"id\": 1,\n        \"price\": 10.99,\n        \"quantity\": 89,\n        \"title\": \"How to get a good grade in DOS in 40 minutes a day\",\n        \"topic\": \"distributed_systems\"\n    },\n    {\n        \"id\": 2,\n        \"price\": 15.0,\n        \"quantity\": 47,\n        \"title\": \"RPCs for Noobs\",\n        \"topic\": \"distributed_systems\"\n    },\n    {\n        \"id\": 3,\n        \"price\": 5.0,\n        \"quantity\": 30,\n        \"title\": \"Xen and the Art of Surviving Undergraduate School\",\n        \"topic\": \"undergraduate_school\"\n    },\n    {\n        \"id\": 4,\n        \"price\": 10.0,\n        \"quantity\": 70,\n        \"title\": \"Cooking for the Impatient Undergrad\",\n        \"topic\": \"undergraduate_school\"\n    }\n]\n</code></pre>\n","urlObject":{"protocol":"http","port":"5050","path":["gateway","books"],"host":["0","0","0","0"],"query":[],"variable":[]}},"response":[],"_postman_id":"5c185961-e701-4bea-825f-e0e6f04f0637"},{"name":"Get Book By ID","id":"b8b211cb-dda9-4b94-9caf-ad0c3ad34c95","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://0.0.0.0:5050/gateway/books/1","description":"<p>This endpoint retrieves information about a specific book by its ID.</p>\n<h3 id=\"request\">Request</h3>\n<h4 id=\"http-get\">HTTP GET</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://127.0.0.1:5050/gateway/books/2\n\n</code></pre><h3 id=\"response\">Response</h3>\n<p>Upon a successful request, the server responds with a status code of 200 and a JSON object containing the details of the book, including its ID, price, quantity, title, and topic.</p>\n<p>Example response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": 2,\n    \"price\": 15.0,\n    \"quantity\": 47,\n    \"title\": \"RPCs for Noobs\",\n    \"topic\": \"distributed_systems\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"5050","path":["gateway","books","1"],"host":["0","0","0","0"],"query":[],"variable":[]}},"response":[],"_postman_id":"b8b211cb-dda9-4b94-9caf-ad0c3ad34c95"},{"name":"Get Book By Topic","id":"de3a5abb-99c4-4d4c-b88c-df08d689ea56","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://0.0.0.0:5050/gateway/books/distributed_systems","description":"<h1 id=\"get-book-details\">Get Book Details</h1>\n<p>This endpoint makes an HTTP GET request to retrieve details of a book on distributed systems.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li>Method: GET</li>\n<li>URL: <code>http://127.0.0.1:5050/gateway/books/distributed_systems</code></li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response will have a status code of 200 and a content type of <code>application/json</code>. The body of the response will contain an array of objects, each representing a book with the following properties:</p>\n<ul>\n<li><code>id</code> (number): The unique identifier of the book.</li>\n<li><code>price</code> (number): The price of the book.</li>\n<li><code>quantity</code> (number): The available quantity of the book.</li>\n<li><code>title</code> (string): The title of the book.</li>\n<li><code>topic</code> (string): The topic or subject of the book.</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n    {\n        \"id\": 1,\n        \"price\": 10.99,\n        \"quantity\": 90,\n        \"title\": \"How to get a good grade in DOS in 40 minutes a day\",\n        \"topic\": \"distributed_systems\"\n    },\n    {\n        \"id\": 2,\n        \"price\": 15.0,\n        \"quantity\": 47,\n        \"title\": \"RPCs for Noobs\",\n        \"topic\": \"distributed_systems\"\n    }\n]\n</code></pre>\n","urlObject":{"protocol":"http","port":"5050","path":["gateway","books","distributed_systems"],"host":["0","0","0","0"],"query":[],"variable":[]}},"response":[],"_postman_id":"de3a5abb-99c4-4d4c-b88c-df08d689ea56"},{"name":"Purchase","id":"bfcba67d-e5e0-4a66-8997-9465ae41a983","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://0.0.0.0:5050/gateway/purchase/1","description":"<p>This endpoint allows you to make a purchase through the gateway. Upon successful execution, it returns a status code of 200 and a JSON response.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">\"Book decreamented successfully\"\n</code></pre>\n","urlObject":{"protocol":"http","port":"5050","path":["gateway","purchase","1"],"host":["0","0","0","0"],"query":[],"variable":[]}},"response":[],"_postman_id":"bfcba67d-e5e0-4a66-8997-9465ae41a983"}],"id":"8e08196f-d96d-4d4b-a407-f085e95ce2bb","_postman_id":"8e08196f-d96d-4d4b-a407-f085e95ce2bb","description":""},{"name":"catalog","item":[{"name":"Decreament Book Quantity","id":"86521ef8-67cf-44b2-9c0d-82f166acbe45","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://0.0.0.0:5000/catalog/books/1/decreament","description":"<p>This endpoint allows you to decrement the quantity of a specific book in the catalog by sending an HTTP POST request to the specified URL.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li>No request body is required for this endpoint.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li>Status: 200</li>\n<li>Content Type: application/json</li>\n<li>Attributes:<ul>\n<li><code>book_id</code> (number): The ID of the decremented book.</li>\n<li><code>message</code> (string): Any additional message related to the decrement operation.</li>\n<li><code>total_price</code> (number): The updated total price after the decrement operation.</li>\n</ul>\n</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"book_id\": 1,\n    \"message\": \"Book decreamented successfully\",\n    \"total_price\": 10.99\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["catalog","books","1","decreament"],"host":["0","0","0","0"],"query":[],"variable":[]}},"response":[],"_postman_id":"86521ef8-67cf-44b2-9c0d-82f166acbe45"},{"name":"Get Books","id":"6d1a453b-318d-4cf2-bb72-e50889f91229","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:5000/catalog/books","description":"<p>This endpoint makes an HTTP GET request to retrieve a list of books from the catalog.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li>Method: GET</li>\n<li>URL: <code>http://127.0.0.1:5000/catalog/books</code></li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li>Status: 200</li>\n<li>Content-Type: application/json</li>\n</ul>\n<p>The response will contain a JSON array with each object representing a book from the catalog. Each book object will have the following properties:</p>\n<ul>\n<li><code>id</code> (number): The unique identifier for the book.</li>\n<li><code>price</code> (number): The price of the book.</li>\n<li><code>quantity</code> (number): The available quantity of the book.</li>\n<li><code>title</code> (string): The title of the book.</li>\n<li><code>topic</code> (string): The topic or genre of the book.</li>\n</ul>\n","urlObject":{"protocol":"http","port":"5000","path":["catalog","books"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6d1a453b-318d-4cf2-bb72-e50889f91229"},{"name":"Get Book by ID","id":"325d1d39-0a15-4437-8ea6-eb34746fdaa1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://0.0.0.0:5000/catalog/books/1","description":"<p>This endpoint retrieves details of a specific book from the catalog. The request should be made using an HTTP GET method to the specified URL with the book ID in the path parameter.</p>\n<p>The response will have a status code of 200 and a JSON content type. The body of the response will include the details of the book such as its ID, price, quantity, title, and topic.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["catalog","books","1"],"host":["0","0","0","0"],"query":[],"variable":[]}},"response":[],"_postman_id":"325d1d39-0a15-4437-8ea6-eb34746fdaa1"},{"name":"Get Books by topic","id":"1ac48007-ea72-4890-a4cd-7ca5525c0a4c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://0.0.0.0:5000/catalog/books/distributed_systems","description":"<h1 id=\"get-book-information\">Get Book Information</h1>\n<p>This endpoint retrieves information about a specific book from the catalog.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>GET /catalog/books/distributed_systems</code></p>\n<h2 id=\"response\">Response</h2>\n<ul>\n<li>Status: 200</li>\n<li>Content-Type: application/json</li>\n</ul>\n<p>Example response body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n    {\n        \"id\": 0,\n        \"price\": 0,\n        \"quantity\": 0,\n        \"title\": \"\",\n        \"topic\": \"\"\n    }\n]\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["catalog","books","distributed_systems"],"host":["0","0","0","0"],"query":[{"disabled":true,"key":"topic","value":"distributed_systems"}],"variable":[]}},"response":[],"_postman_id":"1ac48007-ea72-4890-a4cd-7ca5525c0a4c"},{"name":"test","id":"d3e93fb4-99cd-4d9b-bd01-72a6806853c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://0.0.0.0:5000/catalog","urlObject":{"protocol":"http","port":"5000","path":["catalog"],"host":["0","0","0","0"],"query":[],"variable":[]}},"response":[],"_postman_id":"d3e93fb4-99cd-4d9b-bd01-72a6806853c6"}],"id":"fbcdafe5-3258-469a-bb10-0042fe455f5b","_postman_id":"fbcdafe5-3258-469a-bb10-0042fe455f5b","description":""},{"name":"order","item":[{"name":"purchase","id":"2a8f17ff-12db-4d79-be7b-8c278b70854e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://0.0.0.0:6000/order/purchase/2","urlObject":{"protocol":"http","port":"6000","path":["order","purchase","2"],"host":["0","0","0","0"],"query":[],"variable":[]}},"response":[],"_postman_id":"2a8f17ff-12db-4d79-be7b-8c278b70854e"}],"id":"eb7cc286-10be-4951-b66b-f457a80db01f","_postman_id":"eb7cc286-10be-4951-b66b-f457a80db01f","description":""},{"name":"frontend","item":[{"name":"Frontend test","id":"4193d6f1-57a2-4fd1-8292-810acb1c876e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:6050/frontend/books","urlObject":{"protocol":"http","port":"6050","path":["frontend","books"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"4193d6f1-57a2-4fd1-8292-810acb1c876e"}],"id":"1506a2bf-f89b-4c11-b431-e54bba673e0d","_postman_id":"1506a2bf-f89b-4c11-b431-e54bba673e0d","description":""}]}