{"info":{"_postman_id":"ec32cd95-1d0b-4c2d-97a6-19b179c4134f","name":"ClubSeek API","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>ClubSeek is service that specializes in recommending bars based on user preferences of quality and occupancy.</p>\n<h1 id=\"overview\">Overview</h1>\n<p>Clients can use the API to view available Bars and get recommendations based on their personal preferences.</p>\n<p>Bar Owners can use the API to perform CRUD operations on Bars and view clients assigned to their bar</p>\n<h1 id=\"quick-start\">Quick Start</h1>\n<p>The application runs on localhost:8000 by default and the database runs on localhost:3306 (Disable any other MySQL Databases running locally to use this application).</p>\n<p>Install the Postman API collection, add AuthZ information from the README Document, and start adding Bars!</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>API Endpoints open to clients are public and do not require authentication. Edit operations assigned to bar owners require basic authentication (/bars POST, PUT and /users GET)</p>\n<h1 id=\"error-codes\">Error Codes</h1>\n<p>200 OK: Request Successful<br>211 No Content: No Clients or Bars to Return<br>400 Bad Request: Inputted Information is Invalid (Context in Response Output)<br>401 Unauthorized: Authentication Credentials Missing or Invalid<br>503 Service Unavailable: API Client is unable to connect to Database</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Overview","slug":"overview"},{"content":"Quick Start","slug":"quick-start"},{"content":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"}],"owner":"16583544","collectionId":"ec32cd95-1d0b-4c2d-97a6-19b179c4134f","publishedId":"UyrGBZmX","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-04-30T21:01:52.000Z"},"item":[{"name":"Add Bars","id":"d404900f-eb66-437d-a772-d8e03839b535","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"[\n    {\n        \"barName\": \"SuperEshaan\",\n        \"wowFactor\": 30,\n        \"capacity\": 100,\n        \"currentTraffic\": 20,\n        \"address\": \"30 Eshaan Drive Eoin, NJ 08841\"\n    },\n    {\n        \"barName\": \"SuperAwais\",\n        \"wowFactor\": 99,\n        \"capacity\": 1000,\n        \"currentTraffic\": 900,\n        \"address\": \"84 Awais Drive Akku, NJ 08841\"\n    }, \n    {\n        \"barName\": \"SuperAkku\",\n        \"wowFactor\": 40,\n        \"capacity\": 300,\n        \"currentTraffic\": 241,\n        \"address\": \"84 Akku Drive Awais, NJ 08841\"\n    }, \n    {\n        \"barName\": \"SuperSidhu\",\n        \"wowFactor\": 89,\n        \"capacity\": 1000,\n        \"currentTraffic\": 800,\n        \"address\": \"84 Sidhu Drive Awais, NJ 08841\"\n    }\n]","options":{"raw":{"language":"json"}}},"url":"localhost:8000/bars","description":"<h5 id=\"schema\">Schema</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    'type': 'array',\n    \"minItems\": 1,\n    'items': {\n        'barName': {'type': 'string',  \"minLength\": 4, \"maxLength\": 30},\n        'wowFactor': {'type': 'integer', \"minimum\": 1, \"maximum\": 100},\n        'capacity': {'type': 'integer', \"minimum\": 1, \"maximum\": 1000},\n        'currentTraffic': {'type': 'integer', \"minimum\": 1, \"maximum\": 1000},\n        'address': {'type': 'string', \"minLength\": 4, \"maxLength\": 255},\n    },\n    'required': ['barName', 'wowFactor', 'capacity', 'currentTraffic']\n}\n\n</code></pre>\n<h5 id=\"notes\"><strong>Notes</strong></h5>\n<ul>\n<li><code>currentTraffic</code> can't be greater than <code>capacity</code></li>\n<li>The Primary Keys for Bars in the Database is <code>barName</code> and <code>address</code><ul>\n<li>These attributes can't be updated once entered</li>\n</ul>\n</li>\n<li>Bars cannot be updated with this endpoint. Use the /bars PUT endpoint for updating bars</li>\n</ul>\n<h5 id=\"http-responses\"><strong>HTTP Responses</strong></h5>\n<ul>\n<li>200 OK<ul>\n<li>Operation Successful</li>\n</ul>\n</li>\n<li>400 Bad Request<ul>\n<li>A Bar has a <code>currentTraffic</code> that is greater than <code>capacity</code></li>\n<li>A Bar already exists in the database</li>\n</ul>\n</li>\n<li>401 Unauthorized<ul>\n<li>Authentication Credentials Missing or Invalid</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"port":"8000","path":["bars"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d404900f-eb66-437d-a772-d8e03839b535"},{"name":"View Bars","id":"fca290a7-035d-4b41-8383-f55529525577","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"localhost:8000/bars","description":"<h5 id=\"notes\">Notes</h5>\n<ul>\n<li>Bars are returned as an array of JSON Objects</li>\n</ul>\n<h5 id=\"http-responses\">HTTP Responses</h5>\n<ul>\n<li>200 OK<ul>\n<li>Operation Successful</li>\n</ul>\n</li>\n<li>211 No Content<ul>\n<li>No Clients or Bars to Return</li>\n</ul>\n</li>\n</ul>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"}]},"isInherited":true,"source":{"_postman_id":"ec32cd95-1d0b-4c2d-97a6-19b179c4134f","id":"ec32cd95-1d0b-4c2d-97a6-19b179c4134f","name":"ClubSeek API","type":"collection"}},"urlObject":{"port":"8000","path":["bars"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fca290a7-035d-4b41-8383-f55529525577"},{"name":"Update Bars","id":"28903849-8f7b-4efb-beab-d56220601388","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"barName\": \"SuperEshaan\",\n    \"address\": \"30 Eshaan Drive Eoin, NJ 08841\",\n    \"wowFactorChange\": 31,\n    \"capacityChange\": 100,\n    \"currentTrafficChange\": 20\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/bars","description":"<h5 id=\"schema\">Schema</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    'type': 'object',\n    'properties': {\n        'barName': {'type': 'string',  \"minLength\": 4, \"maxLength\": 30},\n        'address': {'type': 'string', \"minLength\": 4, \"maxLength\": 255},\n        'wowFactorChange': {'type': 'integer', \"minimum\": 1, \"maximum\": 100},\n        'capacityChange': {'type': 'integer', \"minimum\": 1, \"maximum\": 1000},\n        'currentTrafficChange': {'type': 'integer', \"minimum\": 1, \"maximum\": 1000}\n    },\n    'required': ['barName', 'address']\n}\n\n</code></pre>\n<h5 id=\"notes\"><strong>Notes</strong></h5>\n<ul>\n<li><code>barName</code> and <code>address</code> can't be updated once entered<ul>\n<li>Delete and re-add Bar to change these attributes</li>\n</ul>\n</li>\n<li><code>currentTraffic</code> can't be greater than <code>capacity</code></li>\n</ul>\n<h5 id=\"http-responses\"><strong>HTTP Responses</strong></h5>\n<ul>\n<li>200 OK<ul>\n<li>Operation Successful</li>\n</ul>\n</li>\n<li>400 Bad Request<ul>\n<li>A Bar has a <code>currentTraffic</code> that is greater than <code>capacity</code></li>\n<li>There is no Bar with the following <code>barName</code> and <code>address</code></li>\n</ul>\n</li>\n<li>401 Unauthorized<ul>\n<li>Authentication Credentials Missing or Invalid</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"port":"8000","path":["bars"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"28903849-8f7b-4efb-beab-d56220601388"},{"name":"Delete Bar","id":"cb3dadfc-9c52-4058-93e5-3d9fed502c31","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"barName\": \"SuperAkku\",\n    \"address\": \"84 Akku Drive Awais, NJ 08841\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/bars","description":"<h5 id=\"schema\">Schema</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    'type': 'object',\n    'properties': {\n        'barName': {'type': 'string',  \"minLength\": 4, \"maxLength\": 30},\n        'address': {'type': 'string',  \"minLength\": 4, \"maxLength\": 255}\n    },\n    'required': ['barName', 'address']\n}\n\n</code></pre>\n<h5 id=\"notes\"><strong>Notes</strong></h5>\n<ul>\n<li><code>barName</code> and <code>address</code> are primary keys and must be supplied to identify and delete a Bar</li>\n</ul>\n<h5 id=\"http-responses\"><strong>HTTP Responses</strong></h5>\n<ul>\n<li>200 OK<ul>\n<li>Operation Successful</li>\n</ul>\n</li>\n<li>400 Bad Request<ul>\n<li>There is no Bar with the following <code>barName</code> and <code>address</code></li>\n</ul>\n</li>\n<li>401 Unauthorized<ul>\n<li>Authentication Credentials Missing or Invalid</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"port":"8000","path":["bars"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"cb3dadfc-9c52-4058-93e5-3d9fed502c31"},{"name":"Bar Selection","id":"3bc9fa9d-7716-467d-ab3a-6097c1d32b02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Eshaan Mathur\",\n    \"phoneNumber\": \"9072834045\",\n    \"minWowFactor\": 20,\n    \"maxTraffic\": 100,\n    \"preference\": \"wowFactor\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8000/barSelection","description":"<h5 id=\"schema\">Schema</h5>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    'type': 'object',\n    'properties': {\n        'name': {'type': 'string',  \"minLength\": 4, \"maxLength\": 30},\n        'phoneNumber': {'type': 'string' , \"minLength\": 10, \"maxLength\": 15},\n        'minWowFactor': {'type': 'integer', \"minimum\": 1, \"maximum\": 100},\n        'maxTraffic': {'type': 'integer', \"minimum\": 1, \"maximum\": 1000},\n        'preference': {'type': 'string'}\n    },\n    'required': ['name', 'phoneNumber']\n}\n\n</code></pre>\n<h5 id=\"notes\"><strong>Notes</strong></h5>\n<ul>\n<li>Once a Bar has been selected for a Client, their information and Bar assignment will be stored. You can view Users with the /users GET endpoint (AuthZ required)<ul>\n<li><code>name</code> and <code>phoneNumber</code> are primary keys for the Client</li>\n<li>The Users Table is cleared every night. Only one request is allowed per client per night.</li>\n</ul>\n</li>\n<li><code>preference</code> can be <code>capacity</code> or <code>wowFactor</code>. If the attribute is not defined it will default to <code>capacity</code></li>\n</ul>\n<h5 id=\"http-responses\"><strong>HTTP Responses</strong></h5>\n<ul>\n<li>200 OK<ul>\n<li>Operation Successful</li>\n</ul>\n</li>\n<li>211 No Content:<ul>\n<li>No Bars Meet Minimum Requirements</li>\n</ul>\n</li>\n<li>400 Bad Request<ul>\n<li>A Client already exists in the Users Table (Only One Request is allowed per Client per night)</li>\n</ul>\n</li>\n</ul>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"}]},"isInherited":true,"source":{"_postman_id":"ec32cd95-1d0b-4c2d-97a6-19b179c4134f","id":"ec32cd95-1d0b-4c2d-97a6-19b179c4134f","name":"ClubSeek API","type":"collection"}},"urlObject":{"port":"8000","path":["barSelection"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3bc9fa9d-7716-467d-ab3a-6097c1d32b02"},{"name":"View Users","id":"bed024d2-2946-4cc3-9c63-c400108ed891","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"},{"key":"password","value":"<password>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8000/users","description":"<h5 id=\"notes\">Notes</h5>\n<ul>\n<li>Users are returned as an array of JSON Objects</li>\n</ul>\n<h5 id=\"http-responses\">HTTP Responses</h5>\n<ul>\n<li>200 OK<ul>\n<li>Operation Successful</li>\n</ul>\n</li>\n<li>211 No Content<ul>\n<li>No Clients or Bars to Return</li>\n</ul>\n</li>\n<li>401 Unauthorized<ul>\n<li>Authentication Credentials Missing or Invalid</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"port":"8000","path":["users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"bed024d2-2946-4cc3-9c63-c400108ed891"},{"name":"Readiness Probe","id":"366bc7a9-2317-4bbf-b9a0-6dae9a2ce542","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8000/readiness","description":"<h5 id=\"notes\">Notes</h5>\n<ul>\n<li>Used to Check if API Client has connection with Database</li>\n</ul>\n<h5 id=\"http-responses\">HTTP Responses</h5>\n<ul>\n<li>200 OK<ul>\n<li>API Ready for Requests</li>\n</ul>\n</li>\n<li>503 Service Unavailable<ul>\n<li>API Client is unable to connect to Database</li>\n</ul>\n</li>\n</ul>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"}]},"isInherited":true,"source":{"_postman_id":"ec32cd95-1d0b-4c2d-97a6-19b179c4134f","id":"ec32cd95-1d0b-4c2d-97a6-19b179c4134f","name":"ClubSeek API","type":"collection"}},"urlObject":{"port":"8000","path":["readiness"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"366bc7a9-2317-4bbf-b9a0-6dae9a2ce542"}],"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"<username>"}]}},"event":[{"listen":"prerequest","script":{"id":"2bc8e9d5-7c87-42cd-a4ee-0b2745d8a582","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"23d895dc-e8c6-4b19-965f-98a14119668d","type":"text/javascript","exec":[""]}}]}