{"info":{"_postman_id":"a707b37c-19f2-45d0-92d9-6551bfbc93de","name":"Take A Bao Menu API","description":"<html><head></head><body><p>The Take A Bao Menu API forms the backend for a read-only online shop menu for <a href=\"https://www.instagram.com/_takeabao/\">Take A Bao: a pop-up bao bar and fundraising platform</a>. The full project can be viewed on GitHub: <a href=\"https://github.com/rtasalem/take-a-bao-shop-menu\">take-a-bao-shop-menu</a>.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"28285986","collectionId":"a707b37c-19f2-45d0-92d9-6551bfbc93de","publishedId":"2s9Xy3try6","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-09-13T14:56:06.000Z"},"item":[{"name":"Menu Item Requests","item":[{"name":"Get All Menu Items","id":"2b6f3725-eda2-4998-bd26-c2ea2e2dc6d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8088/api/v1/menu-items","description":"<p>This <code>GET</code> request will retrieve a list of all menu items stored in the database as JSON objects. The endpoint of this HTTP request is not explicitly defined, therefore the request is mapped to the root path of the controller (relative to the base URL of the application): <code>http://localhost:8088/api/v1/menu-items</code>. Copy this URL into the request and then click <code>Send</code>.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","menu-items"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2b6f3725-eda2-4998-bd26-c2ea2e2dc6d2"},{"name":"Get Menu Item by ID","id":"550ab284-4d85-442a-ab09-441aaa4d06ee","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8088/api/v1/menu-items/id/3","description":"<p>A <code>GET</code> request that will retrieve an individual menu item (as a JSON object) if it is stored in the database using its <code>itemId</code>. The endpoint of the request is <code>id/{itemId}</code> where <code>{itemId}</code> must be replaced in the URL with a value that exists in the database (the URL shown above uses an <code>itemId</code> of 4). If the <code>itemId</code> does not exist in the database (i.e. if the menu item does not exist) then a custom runtime exception will be returned (e.g. \"Menu item with an ID of 9 does not exist.\"). After specifying a number in place {itemId}, click <code>Send</code>.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","menu-items","id","3"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"550ab284-4d85-442a-ab09-441aaa4d06ee"},{"name":"Get Menu Items by Category","id":"58ac9e40-6bbb-49f8-ba11-2f413575c1e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8088/api/v1/menu-items/category/Side","description":"<p>Menu items can be found based on their category (either main, side, or dessert) using a <code>GET</code> request with an endpoint of <code>category/{itemCategory}</code> where {itemCategory} should be replaced with one of three strings already mentioned. This means menu items of a specific category can be displayed as a list. Once a category is specified (either in lowercase or uppercase and containing only a substring of the category itself, click <code>Send</code> and a list of main, sides, or desserts will be returned in the JSON format.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","menu-items","category","Side"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"58ac9e40-6bbb-49f8-ba11-2f413575c1e3"},{"name":"Search Menu Item by Name or Description or Category","id":"1ded67b2-39ee-40c0-9fd8-0c3ac33c76a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8088/api/v1/menu-items/search?searchTerm=chilli","description":"<p>Menu items can be searched for by their name, description, or category by entering a search term that contains one of these attributes via a <code>GET</code> request. The search term is case-insensitive and a partial string part of the original name, description, or category can be entered and still yield a search results. The example given below under Query Params is <code>chilli</code>.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","menu-items","search"],"host":["localhost"],"query":[{"key":"searchTerm","value":"chilli"}],"variable":[]}},"response":[],"_postman_id":"1ded67b2-39ee-40c0-9fd8-0c3ac33c76a0"},{"name":"Add New Menu Item","id":"5b58df8f-1c13-4a23-aa3b-50e5da72bdbc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n        \"itemName\": \"Braised Beef & Ginger\",\n        \"itemDescription\": \"Savour this aromatic blend of beef and finely minced ginger. All wrapped in a freshly steamed bun, this will be sure to eliminate any craving.\",\n        \"itemPrice\": 3.0,\n        \"itemCategory\": \"main\",\n        \"itemImage\": \"http://localhost:3000/images/braised-beef-and-black-bean-sauce-bao.jpg\",\n        \"suitableForVegetarians\": false\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:8088/api/v1/menu-items","description":"<p>This <code>POST</code> request will add a new menu item to the database provided that the name of the menu item is unique. If a name is given that already exists in the database, then an exception will be thrown stating the a menu item already exists in the database with the given name. The information for a new menu item is written in the JSON format, the <code>itemId</code> does not need to be specified as the API already automatically generates an <code>itemId</code> for each new menu item via a sequence generator.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","menu-items"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5b58df8f-1c13-4a23-aa3b-50e5da72bdbc"},{"name":"Update Menu Item","id":"35d4fdd4-c5c3-4256-b938-865f1fb70fda","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n        \"itemName\": \"Mango & Peach\",\n        \"itemDescription\": \"Delight in delicate layers of ripe mango and fresh peach, a harmonious fusion that captures the essence of summer sweetness.\",\n        \"itemPrice\": 3.0,\n        \"itemCategory\": \"dessert\",\n        \"itemImage\": \"http://localhost:3000/images/mango-and-peach-bao.JPG\",\n        \"suitableForVegetarians\": true\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:8088/api/v1/menu-items/5","description":"<p>This <code>PUT</code> request will allow for the details of any menu item in the database to be updated provided the <code>itemId</code> of the menu item is added onto the end of the URL.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","menu-items","5"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"35d4fdd4-c5c3-4256-b938-865f1fb70fda"},{"name":"Delete Menu Item","id":"832a8fd3-1fe5-4f0e-a9bb-93dfa828ea24","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8088/api/v1/menu-items/9","description":"<p>This <code>DELETE</code> request will remove any menu item from the database provided that its <code>itemId</code> is added onto the end of the URL. Running the <code>GET</code> requests to retrieve all the menu items in the database or to retrieve a specific menu item in the database by specifying its <code>itemId</code> will cause a custom runtime exception to be thrown ('Menu item with an ID of <code>itemId</code> does not exist').</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","menu-items","9"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"832a8fd3-1fe5-4f0e-a9bb-93dfa828ea24"}],"id":"aea3a516-50b5-45da-ae32-9f9868985f76","description":"<p>This folder contains the <code>GET</code>, <code>POST</code>, <code>PUT</code>, and <code>DELETE</code> requests to view, add, update, and delete menu items from a H2 in-memory database.</p>\n","_postman_id":"aea3a516-50b5-45da-ae32-9f9868985f76"},{"name":"Events Requests","item":[{"name":"Get All Events","id":"7cad789a-e208-43c8-ac03-bfb0722fa882","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8088/api/v1/events","description":"<p>This <code>GET</code> request will retrieve a list of all events stored in the database as JSON objects. The endpoint of this HTTP request is not explicitly defined, therefore the request is mapped to the root path of the controller (relative to the base URL of the application): <code>http://localhost:8088/api/v1/events</code>. Copy this URL into the request and then click <code>Send</code>.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","events"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7cad789a-e208-43c8-ac03-bfb0722fa882"},{"name":"Get Event by ID","id":"76416a55-6697-4d59-b200-c7c7a88e4f1d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8088/api/v1/events/id/1","description":"<p>A <code>GET</code> request that will retrieve an individual menu item (as a JSON object) if it is stored in the database using its <code>itemId</code>. The endpoint of the request is <code>id/{eventId}</code> where <code>{eventId}</code> must be replaced in the URL with a value that exists in the database (the URL shown above uses an <code>eventId</code> of 1). If the <code>eventId</code> does not exist in the database (i.e. if the menu item does not exist) then a custom runtime exception will be returned (e.g. \"Event with an ID of 2 does not exist.\"). After specifying a number in place <code>{eventId}</code>, click <code>Send</code>.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","events","id","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"76416a55-6697-4d59-b200-c7c7a88e4f1d"},{"name":"Add New Event","id":"f7bd2b29-055f-4aa5-b59b-a09e44d8e319","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":" {\n        \"eventTitle\": \"We're Back!\",\n        \"eventDescription\": \"Our head chef, Claire, is back for our second ever fundraiser. After some experimenting in the kitchen, Claire's got some hot new recipes ready to serve at our upcoming fundraiser (watch this space for dates!). You can expect bao made with wheatflour, Claire's preferred flour to use for making bao, and even some baked bao for added flavour. We hope you're as hungry as we are!\",\n        \"eventImage\": \"http://localhost:3000/images/our-second-ever-fundraiser.JPG\"\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:8088/api/v1/events","description":"<p>This <code>POST</code> request will add a new event to the database. The information for a new event is written in the JSON format, the <code>eventId</code> does not need to be specified as the API already automatically generates an <code>eventId</code> for each new event via a sequence generator.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","events"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f7bd2b29-055f-4aa5-b59b-a09e44d8e319"},{"name":"Update Event","id":"e400e6d4-9195-45b3-9781-a176937c47c2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n        \"eventTitle\": \"Our Very First Fundraiser!!\",\n        \"eventDescription\": \"The very first fundraiser hosted by Take A Bao was organised by our founder and head chef, Claire, alongside family and friends. Held at St Charles Oratory Hall in the heart of Glasgow, money was raised for local charity, Central & West Integration Network, whose work involves improving food security, participation, and integration. A portion of the profits also went towards a medical elective in India that Claire will be completing as part of her med school studies.\",\n        \"eventImage\": \"http://localhost:3000/images/cwin-event.jpg\"\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:8088/api/v1/events/1","description":"<p>This <code>PUT</code> request will allow for the details of any event in the database to be updated provided the <code>eventId</code> of the event is added onto the end of the URL.</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","events","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e400e6d4-9195-45b3-9781-a176937c47c2"},{"name":"Delete Event","id":"f56fcf01-3653-43a7-b3eb-45ddf0090246","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8088/api/v1/events/2","description":"<p>This <code>DELETE</code> request will remove any event from the database provided that its <code>eventId</code> is added onto the end of the URL. Running the <code>GET</code> requests to retrieve all the events in the database or to retrieve a specific event in the database by specifying its <code>eventId</code> will cause a custom runtime exception to be thrown ('Event with an ID of <code>eventId</code> does not exist').</p>\n","urlObject":{"protocol":"http","port":"8088","path":["api","v1","events","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f56fcf01-3653-43a7-b3eb-45ddf0090246"}],"id":"5a08cd62-1b83-408e-ac41-9fe2eead44c8","description":"<p>This folder contains the <code>GET</code>, <code>POST</code>, <code>PUT</code>, and <code>DELETE</code> requests to view, add, update, and delete events from a H2 in-memory database.</p>\n","_postman_id":"5a08cd62-1b83-408e-ac41-9fe2eead44c8"}]}