{"info":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>What does your API do?</p>\n<h1 id=\"overview\">Overview</h1>\n<p>Things that the developers should know about</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>Some endpoints within the API require one of two types of authentication. Sensitive endpoints (like <code>/books/create</code>) require an authorization header which require a user to also be an admin.<br>Other endpoints that are user specific (like <code>/wishlist/add</code>), require an authorization header but, do not require the user to be an admin.</p>\n<h4 id=\"how-do-i-get-authorization-header\">How do I get authorization header?</h4>\n<p>To get an authorization header, you must make a request at the login endpoint. If both the right <code>username</code> and <code>password</code> parameters have been provided; you will get a response with your token to put in your authorization header.</p>\n<p>Example login response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"successful\": true,\n    \"token\": \"7b1e3f9b-8fb6-48d4-a596-7945c43dd3c6\"\n}\n\n</code></pre>\n<h1 id=\"error-codes\">Error Codes</h1>\n<p>To check if a request has been successful or not you can look at the success property in the return JSON. If it's <code>false</code> then there's been an invalid request.</p>\n<p>This is an example of what a response looks like:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": false,\n    \"message\": \"Invalid authorization\"\n}\n\n</code></pre>\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":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"}],"owner":"14131389","collectionId":"878cca43-3c92-48bb-9b29-d71fc98b2206","publishedId":"2s8YYMo1AQ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-11-07T20:47:38.000Z"},"item":[{"name":"User","item":[{"name":"Login","id":"b41206ef-876b-44fa-b382-fde5bd5a565f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"a\",\r\n    \"password\": \"a\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/user/login","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"path":["user","login"],"host":["localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"b41206ef-876b-44fa-b382-fde5bd5a565f"}],"id":"dafb34c0-2f94-4b74-bfdf-75920333be4a","_postman_id":"dafb34c0-2f94-4b74-bfdf-75920333be4a","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}}},{"name":"Books","item":[{"name":"Get","id":"8475c927-c175-4324-8f18-5d9f45575c81","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:3000/books/get?ISBN=2344249","urlObject":{"path":["books","get"],"host":["localhost:3000"],"query":[{"key":"ISBN","value":"2344249"}],"variable":[]}},"response":[],"_postman_id":"8475c927-c175-4324-8f18-5d9f45575c81"},{"name":"Create","id":"0f271444-57fe-4f26-857d-b700fa167679","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"ISBN\": \"23asdads44249\",\r\n  \"name\": \"A story about your uncle\",\r\n  \"description\": \"A cool story that your uncle told you a long time ago :)\",\r\n  \"price\": 25.99,\r\n  \"author\": \"7b1e3f9b-8fb6-48d4-a596-7945c43dd3c6\",\r\n  \"genre\": [\"Valorant\"],\r\n  \"publisher\": \"Offline\",\r\n  \"datePublished\": 1667443550000\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/books/create/","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"path":["books","create",""],"host":["localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"0f271444-57fe-4f26-857d-b700fa167679"},{"name":"Edit","id":"00fbf440-d40c-4f0e-8522-d6e310ebe342","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"The new name\",\r\n    \"price\": 10,\r\n    \"datePublished\": 1667343550000\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/books/edit?ISBN=234784242349","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"path":["books","edit"],"host":["localhost:3000"],"query":[{"key":"ISBN","value":"234784242349"}],"variable":[]}},"response":[],"_postman_id":"00fbf440-d40c-4f0e-8522-d6e310ebe342"},{"name":"Delete","id":"bcbf4136-bca1-4a1b-8dfa-ae81b2fbea57","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"localhost:3000/books/delete?ISBN=2347892342342349","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"path":["books","delete"],"host":["localhost:3000"],"query":[{"key":"ISBN","value":"2347892342342349"}],"variable":[]}},"response":[],"_postman_id":"bcbf4136-bca1-4a1b-8dfa-ae81b2fbea57"}],"id":"343bfddf-0574-499e-8156-d7d9b921c944","_postman_id":"343bfddf-0574-499e-8156-d7d9b921c944","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}}},{"name":"Author","item":[{"name":"Get","id":"896cb0eb-4615-4a62-bba5-266afa2eaf83","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"localhost:3000/author/get?ID=7b1e3f9b-8fb6-48d4-a596-7945c43dd3c6","urlObject":{"path":["author","get"],"host":["localhost:3000"],"query":[{"key":"ID","value":"7b1e3f9b-8fb6-48d4-a596-7945c43dd3c6"}],"variable":[]}},"response":[],"_postman_id":"896cb0eb-4615-4a62-bba5-266afa2eaf83"},{"name":"Create","id":"ac5859e1-add2-44bf-8541-b0ac4c891ce7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"first\": \"Steve\",\n    \"last\": \"Minecraft\",\n    \"biography\": \"That one side character from minecraft\",\n    \"publisher\": \"Mojang\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/author/create","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"path":["author","create"],"host":["localhost:3000"],"query":[],"variable":[]}},"response":[],"_postman_id":"ac5859e1-add2-44bf-8541-b0ac4c891ce7"},{"name":"Edit","id":"2b9a846e-0589-4153-b8b4-b7392903452e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"first\": \"Alex\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/author/edit?ID=7b1e3f9b-8fb6-48d4-a596-7945c43dd3c6","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"path":["author","edit"],"host":["localhost:3000"],"query":[{"key":"ID","value":"7b1e3f9b-8fb6-48d4-a596-7945c43dd3c6"}],"variable":[]}},"response":[],"_postman_id":"2b9a846e-0589-4153-b8b4-b7392903452e"},{"name":"Delete","id":"524dfb5f-d83f-41df-8fd2-8862efae9939","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"localhost:3000/author/delete?ID=d79dd72f-4d8a-4876-9d1a-69425321b5c5","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"path":["author","delete"],"host":["localhost:3000"],"query":[{"key":"ID","value":"d79dd72f-4d8a-4876-9d1a-69425321b5c5"}],"variable":[]}},"response":[],"_postman_id":"524dfb5f-d83f-41df-8fd2-8862efae9939"}],"id":"5d0360b4-e068-47b6-8a3b-adddf7e906a7","_postman_id":"5d0360b4-e068-47b6-8a3b-adddf7e906a7","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}}},{"name":"Wishlist","item":[{"name":"Get","id":"c8404bb1-969b-41a6-aff4-823d5e5d13c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"c8404bb1-969b-41a6-aff4-823d5e5d13c9"},{"name":"Create","id":"e2bacf7a-622f-474a-b0e0-ed3e0afd71af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"localhost:3000/wishlist/add?ISBN=2347892342342349&list=test","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"path":["wishlist","add"],"host":["localhost:3000"],"query":[{"key":"ISBN","value":"2347892342342349"},{"key":"list","value":"test"}],"variable":[]}},"response":[],"_postman_id":"e2bacf7a-622f-474a-b0e0-ed3e0afd71af"},{"name":"Add","id":"a8f5789d-5bea-4849-a5f6-89fd0f10e3f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"localhost:3000/wishlist/add?ISBN=2347892342342349&list=test","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"path":["wishlist","add"],"host":["localhost:3000"],"query":[{"key":"ISBN","value":"2347892342342349"},{"key":"list","value":"test"}],"variable":[]}},"response":[],"_postman_id":"a8f5789d-5bea-4849-a5f6-89fd0f10e3f6"},{"name":"Delete","id":"403b3ebf-e1b4-4a8e-929e-df54c2b96aef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"403b3ebf-e1b4-4a8e-929e-df54c2b96aef"}],"id":"801e230a-6fd3-4a28-b159-331c1f5a4cd2","_postman_id":"801e230a-6fd3-4a28-b159-331c1f5a4cd2","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}}},{"name":"Ratings","item":[{"name":"Get","id":"d1ed2d1b-cbcd-440b-8ad5-cb27c4817544","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"Get","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"host":["Get"],"query":[],"variable":[]}},"response":[],"_postman_id":"d1ed2d1b-cbcd-440b-8ad5-cb27c4817544"},{"name":"Create","id":"f64e38db-ec5d-4ffe-8bf4-747a176f08e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"Create","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"host":["Create"],"query":[],"variable":[]}},"response":[],"_postman_id":"f64e38db-ec5d-4ffe-8bf4-747a176f08e0"},{"name":"Delete","id":"cfb1a663-27e6-4469-bc32-ebc64dade9db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"Delete","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"host":["Delete"],"query":[],"variable":[]}},"response":[],"_postman_id":"cfb1a663-27e6-4469-bc32-ebc64dade9db"}],"id":"6b46dc23-a532-44ef-b581-5ab2441e5bb6","_postman_id":"6b46dc23-a532-44ef-b581-5ab2441e5bb6","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}}},{"name":"Comments","item":[{"name":"Get","id":"45ac8300-82c8-47f9-91bc-9b3182cb263e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"Get","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"host":["Get"],"query":[],"variable":[]}},"response":[],"_postman_id":"45ac8300-82c8-47f9-91bc-9b3182cb263e"},{"name":"Create","id":"7c2c4391-8204-4ec0-917a-6444e709adb6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"Create","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"host":["Create"],"query":[],"variable":[]}},"response":[],"_postman_id":"7c2c4391-8204-4ec0-917a-6444e709adb6"},{"name":"Delete","id":"6b67d901-d7cc-47ab-9c44-4203b10a708d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"Delete","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}},"urlObject":{"host":["Delete"],"query":[],"variable":[]}},"response":[],"_postman_id":"6b67d901-d7cc-47ab-9c44-4203b10a708d"}],"id":"1889f2b8-a362-44ae-888a-eb9f8b1848eb","_postman_id":"1889f2b8-a362-44ae-888a-eb9f8b1848eb","description":"","auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]},"isInherited":true,"source":{"_postman_id":"878cca43-3c92-48bb-9b29-d71fc98b2206","id":"878cca43-3c92-48bb-9b29-d71fc98b2206","name":"Group 21 FIU","type":"collection"}}}],"auth":{"type":"apikey","apikey":{"basicConfig":[{"key":"key","value":"Authorization"},{"key":"value","value":"<value>"}]}},"event":[{"listen":"prerequest","script":{"id":"bafc5027-87fb-4182-8fdc-ef505a8a7490","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8efcb47a-df2b-461b-b929-cae3683079fc","type":"text/javascript","exec":[""]}}],"variable":[{"key":"ip","value":"localhost:3000","type":"string"}]}