{"info":{"_postman_id":"13bc2e98-6c1b-4d12-acc5-6b7b80986269","name":"Library Management System","description":"<html><head></head><body><h1 id=\"get-started-here\">Get started here</h1>\n<p>This template guides you through CRUD operations (GET, POST, PUT, DELETE)</p>\n<h2 id=\"how-to-use-this-template\"><strong>How to use this template</strong></h2>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Get started here","slug":"get-started-here"}],"owner":"32182485","collectionId":"13bc2e98-6c1b-4d12-acc5-6b7b80986269","publishedId":"2sA35LUJub","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-04-04T10:09:49.000Z"},"item":[{"name":"Patron","item":[{"name":"Get Patron","event":[{"listen":"test","script":{"id":"82900f7c-f044-431e-8f49-0be60b0d4682","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"a3a4ab3b-08f4-4dbc-8fea-34b968776c9d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/api/v1/patrons","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request.</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - JSON data.</p>\n","urlObject":{"port":"8080","path":["api","v1","patrons"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"204f0ddb-1c67-4cef-beba-78bc4875cb71","name":"Get Patron Success","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/api/v1/patrons"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:13:28 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"firstName\": \"Chekwube\",\n        \"lastName\": \"Alaekwe\",\n        \"email\": \"barth1@gmail.com\",\n        \"phone\": \"+2348138739452\",\n        \"address\": \"No 54 okpanam\",\n        \"createdDate\": \"2024-05-11T19:08:51.526738\",\n        \"lastModified\": \"2024-05-11T19:11:37.4649\"\n    }\n]"}],"_postman_id":"a3a4ab3b-08f4-4dbc-8fea-34b968776c9d"},{"name":"Get Patron By Id","event":[{"listen":"test","script":{"id":"82900f7c-f044-431e-8f49-0be60b0d4682","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"6a2b168f-4ee0-4a7a-90ba-5a7724268bdf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/api/v1/patrons/1","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have <code>id=1</code>).</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - JSON data.</p>\n","urlObject":{"port":"8080","path":["api","v1","patrons","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6778401d-615e-4328-aabd-90a63a42d2b1","name":"Get Patron By Id Success","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/api/v1/patrons/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:14:17 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"firstName\": \"Chekwube\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\",\n    \"createdDate\": \"2024-05-11T19:08:51.526738\",\n    \"lastModified\": \"2024-05-11T19:11:37.4649\"\n}"},{"id":"4d3bba69-7580-4d89-ac35-86fb9c5c47cd","name":"Get Patron By Id Failed","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/api/v1/patrons/2"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:14:41 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Patron not found with id: 2\"\n}"}],"_postman_id":"6a2b168f-4ee0-4a7a-90ba-5a7724268bdf"},{"name":"Add Patron","event":[{"listen":"test","script":{"id":"360274e9-c36c-43cc-a7e7-d5b85a07f947","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"9ea55358-e353-4edc-ac61-64572cd35ea4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"firstName\": \"barth\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons","description":"<p>This is a POST request, submitting data to an API via the request body. This request submits JSON data, and the data is reflected in the response.</p>\n<p>A successful POST request typically returns a <code>200 OK</code> or <code>201 Created</code> response code.</p>\n<p><code>Example of Request Body:</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"firstName\": \"String\",\n    \"lastName\": \"String\",\n    \"email\": \"Email\"\n    \"phone\": \"String\",\n    \"address\": \"String\"\n}\n\n</code></pre>\n","urlObject":{"port":"8080","path":["api","v1","patrons"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"af4a6a60-0598-4635-812e-7ce07e5e7462","name":"Add Patron Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"firstName\": \"barth\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:01:05 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"firstName\": \"barth\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\",\n    \"createdDate\": \"2024-05-11T19:01:05.518955341\",\n    \"lastModified\": null\n}"},{"id":"5db9a814-34d7-430e-8b90-72aa9ead7e64","name":"Add Existing Patron Failed","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"firstName\": \"barth\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:01:49 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Patron with email address of: barth1@gmail.com already exist\"\n}"},{"id":"64027e5d-1926-4958-b4d1-023d91c081a6","name":"Add Patron with blank required field","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"firstName\": \"\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:02:51 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"First name is required\"\n}"}],"_postman_id":"9ea55358-e353-4edc-ac61-64572cd35ea4"},{"name":"Delete Patron","event":[{"listen":"test","script":{"id":"22268616-4eb2-4642-88f6-4c039f2ec259","exec":["pm.test(\"Successful DELETE request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 202, 204]);","});",""],"type":"text/javascript","packages":{}}}],"id":"583d450e-6fef-426d-834f-eb1fecf35d3a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons/1","description":"<p>This is a DELETE request, and it is used to delete data that was previously created via a POST request. You typically identify the entity being updated by including an identifier in the URL (eg. <code>id=1</code>).</p>\n<p>A successful DELETE request typically returns a<code>204 No Content</code> response code.</p>\n","urlObject":{"port":"8080","path":["api","v1","patrons","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"c3289886-2d09-4d03-9408-2dc44d17faae","name":"Delete Patron with wrong id","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons/4"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:18:00 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"No patron with id 4\"\n}"},{"id":"e6dc7c24-496f-4d41-837f-60f86186c86d","name":"Delete Patron Success","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons/1"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Date","value":"Sat, 11 May 2024 18:18:30 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"583d450e-6fef-426d-834f-eb1fecf35d3a"},{"name":"Update Patron","id":"e1ac6b00-8924-4c57-b1e9-11a481530f1d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"firstName\": \"Chekwube\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons/2","urlObject":{"port":"8080","path":["api","v1","patrons","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6847acaf-0693-455f-bb1b-9c3a487aeb8f","name":"Update Patron Success","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"firstName\": \"Chekwube\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons/1"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:11:37 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"firstName\": \"Chekwube\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\",\n    \"createdDate\": null,\n    \"lastModified\": \"2024-05-11T19:11:37.464899685\"\n}"},{"id":"2c5f9239-fe34-47ac-b905-7b86a5d41dbb","name":"Update Patron with wrong id","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"firstName\": \"Chekwube\",\n    \"lastName\": \"Alaekwe\",\n    \"email\": \"barth1@gmail.com\",\n    \"phone\": \"+2348138739452\",\n    \"address\": \"No 54 okpanam\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/patrons/2"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:12:26 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"No Patron with id 2\"\n}"}],"_postman_id":"e1ac6b00-8924-4c57-b1e9-11a481530f1d"}],"id":"5f8ae086-3558-41f3-8593-7a824328ec24","_postman_id":"5f8ae086-3558-41f3-8593-7a824328ec24","description":""},{"name":"Book","item":[{"name":"Get Books","event":[{"listen":"test","script":{"id":"82900f7c-f044-431e-8f49-0be60b0d4682","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"4a58b35a-7d05-4ffd-be1f-944ef7f538a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/api/v1/books","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request.</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - JSON data.</p>\n<p>Example of response body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n    {\n        \"id\": 1,\n        \"title\": \"War Zone\",\n        \"author\": \"Mac\",\n        \"publicationYear\": 2012,\n        \"isbn\": \"9780007225347\",\n        \"createdDate\": \"2024-04-04T08:26:27.587344\",\n        \"lastModified\": null\n    },\n    {\n        \"id\": 2,\n        \"title\": \"War\",\n        \"author\": \"Mac\",\n        \"publicationYear\": 2012,\n        \"isbn\": \"9780007225347\",\n        \"createdDate\": \"2024-04-04T08:26:39.434158\",\n        \"lastModified\": null\n    },\n    {\n        \"id\": 3,\n        \"title\": \"Battle Ground\",\n        \"author\": \"Mac\",\n        \"publicationYear\": 2012,\n        \"isbn\": \"9780007225347\",\n        \"createdDate\": \"2024-04-04T08:27:46.516427\",\n        \"lastModified\": null\n    }\n]\n\n</code></pre>\n","urlObject":{"port":"8080","path":["api","v1","books"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"f0748bd4-fd93-43af-9ab9-de9d46b66c74","name":"Get Books  Success","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/api/v1/books"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:48:42 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"title\": \"War 1\",\n        \"author\": \"Mac\",\n        \"publicationYear\": 2020,\n        \"isbn\": \"9780007225347\",\n        \"createdDate\": \"2024-05-11T19:47:31.922075\",\n        \"lastModified\": \"2024-05-11T19:48:02.026312\"\n    }\n]"}],"_postman_id":"4a58b35a-7d05-4ffd-be1f-944ef7f538a3"},{"name":"Get Book By Id","event":[{"listen":"test","script":{"id":"82900f7c-f044-431e-8f49-0be60b0d4682","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"c281fcca-beb9-407d-9c22-0ad6c3350fd0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/api/v1/books/1","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have <code>id=1</code>).</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - JSON data.</p>\n<p>Example of response body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"id\": 2,\n    \"title\": \"War\",\n    \"author\": \"Mac\",\n    \"publicationYear\": 2012,\n    \"isbn\": \"9780007225347\",\n    \"createdDate\": \"2024-04-04T08:26:39.434158\",\n    \"lastModified\": null\n}\n\n</code></pre>\n","urlObject":{"port":"8080","path":["api","v1","books","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6c1d84f8-17c9-4b3b-8756-e0f755be4ee6","name":"Get Book By Id, with wrong id Failed","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/api/v1/books/2"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:49:32 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Book not found with id: 2\"\n}"},{"id":"a0238419-511b-425c-9b22-7b598c9ef7d3","name":"Get Book By Id Success","originalRequest":{"method":"GET","header":[],"url":"localhost:8080/api/v1/books/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:50:19 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"title\": \"War 1\",\n    \"author\": \"Mac\",\n    \"publicationYear\": 2020,\n    \"isbn\": \"9780007225347\",\n    \"createdDate\": \"2024-05-11T19:47:31.922075\",\n    \"lastModified\": \"2024-05-11T19:48:02.026312\"\n}"}],"_postman_id":"c281fcca-beb9-407d-9c22-0ad6c3350fd0"},{"name":"Save Book","event":[{"listen":"test","script":{"id":"360274e9-c36c-43cc-a7e7-d5b85a07f947","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"e60ad1a3-765a-4087-a00c-b954c267b474","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"title\": \"Battle Ground\",\n    \"author\": \"Mac\",\n    \"publicationYear\": 2012,\n    \"isbn\": \"9780007225347\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/books","description":"<p>This is a POST request, submitting data to an API via the request body. This request submits JSON data, and the data is reflected in the response.</p>\n<p>A successful POST request typically returns a <code>200 OK</code> or <code>201 Created</code> response code.</p>\n","urlObject":{"port":"8080","path":["api","v1","books"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"92feae80-4c9a-44ff-b75f-38a6f1ed093a","name":"Save Book Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"title\": \"Battle Ground\",\n    \"author\": \"Mac\",\n    \"publicationYear\": 2012,\n    \"isbn\": \"9780007225347\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/books"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:20:46 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"title\": \"Battle Ground\",\n    \"author\": \"Mac\",\n    \"publicationYear\": 2012,\n    \"isbn\": \"9780007225347\",\n    \"createdDate\": \"2024-05-11T19:20:46.524772816\",\n    \"lastModified\": null\n}"},{"id":"24f5de38-b433-4dcd-94a6-b7ea28849afb","name":"Save Book with blank required field","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"title\": \"Battle Ground\",\n    \"author\": \"\",\n    \"publicationYear\": 2012,\n    \"isbn\": \"9780007225347\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/books"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:21:41 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Book must have an Author\"\n}"}],"_postman_id":"e60ad1a3-765a-4087-a00c-b954c267b474"},{"name":"Update Book","event":[{"listen":"test","script":{"id":"f9856bc2-52ee-4d0a-b74f-eaf679cf812b","exec":["pm.test(\"Successful PUT request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201, 204]);","});",""],"type":"text/javascript","packages":{}}}],"id":"0a310914-fbb9-4900-9b2d-bbe4120bf66c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"title\": \"War 1\",\n    \"author\": \"Mac\",\n    \"publicationYear\": 2020,\n    \"isbn\": \"9780007225347\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/books/1","description":"<p>This is a PUT request and it is used to overwrite an existing piece of data. For instance, after you create an entity with a POST request, you may want to modify that later. You can do that using a PUT request. You typically identify the entity being updated by including an identifier in the URL (eg. <code>id=1</code>).</p>\n<p>A successful PUT request typically returns a<code>201 Created</code>, response code.</p>\n","urlObject":{"port":"8080","path":["api","v1","books","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1c77e20a-618e-47f2-bf03-2d27486293c1","name":"Update Book Success","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"title\": \"War 1\",\n    \"author\": \"Mac\",\n    \"publicationYear\": 2020,\n    \"isbn\": \"9780007225347\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/books/1"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:36:01 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"title\": \"War 1\",\n    \"author\": \"Mac\",\n    \"publicationYear\": 2020,\n    \"isbn\": \"9780007225347\",\n    \"createdDate\": \"2024-05-11T19:35:42.690542\",\n    \"lastModified\": \"2024-05-11T19:36:01.163178454\"\n}"},{"id":"ed8724b4-f249-4276-b6e3-659cdb59385f","name":"Update Book with wrong id Failed","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n\t\"title\": \"War 1\",\n    \"author\": \"Mac\",\n    \"publicationYear\": 2020,\n    \"isbn\": \"9780007225347\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/books/2"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:36:46 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Book not found with id: 2\"\n}"}],"_postman_id":"0a310914-fbb9-4900-9b2d-bbe4120bf66c"},{"name":"Delete Book","event":[{"listen":"test","script":{"id":"22268616-4eb2-4642-88f6-4c039f2ec259","exec":["pm.test(\"Successful DELETE request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 202, 204]);","});",""],"type":"text/javascript","packages":{}}}],"id":"9268ed34-de62-44da-a604-4e23907437ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/books/2","description":"<p>This is a DELETE request, and it is used to delete data that was previously created via a POST request. You typically identify the entity being updated by including an identifier in the URL (eg. <code>id=1</code>).</p>\n<p>A successful DELETE request typically returns a<code>204 No Content</code> response code.</p>\n","urlObject":{"port":"8080","path":["api","v1","books","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e5f66bb7-4126-4127-ab46-008cf22085e2","name":"Delete Book with wrong id Failed","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/books/1"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 18:51:16 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"No book with the id of 2\"\n}"},{"id":"59b71d09-3c63-42e6-8480-27e17f1df8cc","name":"Delete Book Success","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/books/1"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Date","value":"Sat, 11 May 2024 18:52:13 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"9268ed34-de62-44da-a604-4e23907437ec"}],"id":"81b6eccf-7644-4abf-98a5-4591a4033173","_postman_id":"81b6eccf-7644-4abf-98a5-4591a4033173","description":""},{"name":"Borrowing Record","item":[{"name":"Borrow Book","id":"d588344d-71f4-417c-8a62-ac0c91b5685e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bookId\": 1,\n    \"patronId\": 1\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/borrow/1/patron/1","description":"<p>This is a POST request that allows a patron to borrow book from the library. Submitting data to an API via the request body. This request submits JSON data, and the data is reflected in the response.</p>\n<p>A successful POST request typically returns a <code>200 OK</code> or <code>201 Created</code> response code with message \"Book borrowed successfully\"</p>\n<p>Link Description:<br /><code>localhost:8080/api/v1/borrow/{bookId}/patron/{patronId}</code></p>\n","urlObject":{"port":"8080","path":["api","v1","borrow","1","patron","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"41b8405b-20ac-4584-b998-cdfee44b78aa","name":"Borrow Book Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bookId\": 1,\n    \"patronId\": 1\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/borrow/1/patron/1"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"text/plain;charset=UTF-8"},{"key":"Content-Length","value":"26"},{"key":"Date","value":"Sat, 11 May 2024 19:00:46 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Book borrowed successfully"},{"id":"42da0a25-d69c-4d76-8e41-4398ef86786e","name":"Borrow Book that is currently borrowed by the same patron","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bookId\": 1,\n    \"patronId\": 1\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/borrow/1/patron/1"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 22:06:48 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"This book was borrowed and has not been returned by the same patron\"\n}"},{"id":"4d02a44c-2b31-4a62-b5d2-74ac1901f4fa","name":"Borrow Book with id that does not exist","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bookId\": 1,\n    \"patronId\": 1\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/borrow/1/patron/1"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 22:19:57 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"No book with id 1\"\n}"}],"_postman_id":"d588344d-71f4-417c-8a62-ac0c91b5685e"},{"name":"Return book","id":"835be566-0adb-44b2-bd2e-60c28d2402cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"url":"localhost:8080/api/v1/return/1/patron/1","description":"<p>This is a PUT request that allows a patron to return borrowed book. Submitting data to an API via the request body.</p>\n<p>A successful POST request typically returns a <code>200 OK</code> or <code>201 Created</code> response code with message \"Book borrowed successfully\"</p>\n<p>Link Description:<br /><code>localhost:8080/api/v1/borrow/{bookId}/patron/{patronId}</code></p>\n","urlObject":{"port":"8080","path":["api","v1","return","1","patron","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6cc58704-83d2-4366-89b7-e5c12171c930","name":"Return book Success","originalRequest":{"method":"PUT","header":[],"url":"localhost:8080/api/v1/return/1/patron/1"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"text/plain;charset=UTF-8"},{"key":"Content-Length","value":"26"},{"key":"Date","value":"Sat, 11 May 2024 22:09:01 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"Book returned successfully"},{"id":"0682a113-cc35-4487-9207-9fca4c92c03c","name":"Return book that is not borrowed","originalRequest":{"method":"PUT","header":[],"url":"localhost:8080/api/v1/return/1/patron/2"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 22:11:09 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"No borrowing record found for bookId 1 patronId 1\"\n}"}],"_postman_id":"835be566-0adb-44b2-bd2e-60c28d2402cd"}],"id":"b15c0a85-de14-48b5-b88b-c86dd464038e","_postman_id":"b15c0a85-de14-48b5-b88b-c86dd464038e","description":""},{"name":"Authentication","item":[{"name":"Register","id":"ab8d75cf-0de6-4973-945d-5900258c0157","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"Barth\",\n    \"lastName\": \"Alaekwe\",\n    \"username\": \"barth\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/auth/register","description":"<p>This endpoint allows users to register for an account. Upon a successful registration, the API will return a token for authentication.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><code>firstName</code> (string): The first name of the user.</li>\n<li><code>lastName</code> (string): The last name of the user.</li>\n<li><code>username</code> (string, required): The username for the account.</li>\n<li><code>password</code> (string, required): The password for the account.</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n\"firstName\": String,\n\"lastName\": String,\n\"username\": String,\n\"password\": String\n}\n\n</code></pre><h3 id=\"response\">Response</h3>\n<ul>\n<li><code>token</code> (string): A token for authentication.</li>\n</ul>\n","urlObject":{"port":"8080","path":["api","v1","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"44663496-c240-4c20-9ee4-5fbd3670d033","name":"Register Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"Barth\",\n    \"lastName\": \"Alaekwe\",\n    \"username\": \"barth\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/auth/register"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 17:25:07 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"token\": \"eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiJiYXJ0aCIsImlhdCI6MTcxNTQ0ODMwNywiZXhwIjoxNzE1NTM0NzA3fQ.xNEF9Q_oGktYSGd8Pgui3fOWCKSpipWg2QB3ZcoTpdSiUBlGyNV7wDS-iyWKOPvj\"\n}"},{"id":"1f17dba7-fa4a-4fad-a4ac-2600fb9225bc","name":"Register Existing User","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"Barth\",\n    \"lastName\": \"Alaekwe\",\n    \"username\": \"barth\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/auth/register"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 17:25:37 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User already exist. Please login\"\n}"},{"id":"a211d529-bc7b-4565-b999-cebc525c389d","name":"Register with Blank required field","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"firstName\": \"\",\n    \"lastName\": \"Alaekwe\",\n    \"username\": \"barth\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/auth/register"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 17:26:05 GMT"},{"key":"Connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"First name is required\"\n}"}],"_postman_id":"ab8d75cf-0de6-4973-945d-5900258c0157"},{"name":"Login","id":"1cbed657-92b1-40f1-ae65-b64f13edc215","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"barth\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/auth/login","description":"<p>This endpoint allows users to authenticate and obtain an access token by sending a POST request to /api/v1/auth/login.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li>username (string, required): The username of the user.</li>\n<li>password (string, required): The password of the user.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful authentication, the response will include:</p>\n<ul>\n<li>token (string): The access token for the authenticated user.</li>\n</ul>\n<p>Example:<br />Request Body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"username\": \"example_username\",\n  \"password\": \"example_password\"\n}\n\n</code></pre>\n<p>Response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"token\": \"example_token\"\n}\n\n</code></pre>\n","urlObject":{"port":"8080","path":["api","v1","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0e42d550-285d-408d-8a76-7ad05741d463","name":"Login Success","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"barth\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 17:30:43 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"token\": \"eyJhbGciOiJIUzM4NCJ9.eyJzdWIiOiJiYXJ0aCIsImlhdCI6MTcxNTQ0ODY0MywiZXhwIjoxNzE1NTM1MDQzfQ.Oqbpejf4kmwyZhK3njVAVg_DMz7v7VggFgwl2Kgc2a-bCvB1nkoR82jdtsCmrO-A\"\n}"},{"id":"337ec081-64ef-41a3-9bf7-d2d835fd94d8","name":"Login Failed","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"ghghh\",\n    \"password\": \"12345\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/auth/login"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"Vary","value":"Origin"},{"key":"Vary","value":"Access-Control-Request-Method"},{"key":"Vary","value":"Access-Control-Request-Headers"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"0"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Expires","value":"0"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Sat, 11 May 2024 17:31:21 GMT"},{"key":"Keep-Alive","value":"timeout=60"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Invalid credentials\"\n}"}],"_postman_id":"1cbed657-92b1-40f1-ae65-b64f13edc215"}],"id":"42b78701-fa1f-4013-bca1-10da35ddc656","_postman_id":"42b78701-fa1f-4013-bca1-10da35ddc656","description":""}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"id":"315bf25a-2778-43f1-a62d-4e62d71d92d4","key":"id","value":"1"},{"id":"ecfe1aee-5d14-444d-9176-182a19d022ee","key":"base_url","value":"https://postman-rest-api-learner.glitch.me/"}]}