{"info":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","description":"<html><head></head><body><p>StartFragment</p>\n<p><strong>REST API</strong><br>This is a course assignment, where i have created the REST API endpoints for TheGarden Application.</p>\n<p><em>The application allows users to:</em></p>\n<ul>\n<li>signup, login, delete users.</li>\n<li>flower items: view, create, change, delete.</li>\n<li>colour: view, create, change, delete.</li>\n</ul>\n<p><em>All the endpoints is tested in postman and all have each an example of one positive and one negative test:</em></p>\n<ul>\n<li>positive i tested if the application works with the token.</li>\n<li>negative i tested that it doesent work without the token. (signup and login is no need for token so here i have tested if the credentials are verified)</li>\n</ul>\n<p>EndFragment</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"26263171","collectionId":"0363374a-c115-4e1e-b955-f8646b5e2f87","publishedId":"2s93XyTiH3","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2023-04-16T12:24:04.000Z"},"item":[{"name":"Auth","item":[{"name":"Sign up","id":"97460c8b-a108-4bfc-a26d-6d3762a1a2e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Test\",\r\n    \"email\": \"TestUser@yahoo.com\",\r\n    \"password\": \"1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000//signup","description":"<p>StartFragment</p>\n<p>The user is signed up with:</p>\n<ul>\n<li>name</li>\n<li>email</li>\n<li>password</li>\n</ul>\n<p>All the fields must be provided or else the user is not created. Which is what i tested for in this case one with all the needed credentials was positive. and one without one neccesary credential that was negative.</p>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"path":["signup"],"host":["http://localhost:3000/"],"query":[],"variable":[]}},"response":[{"id":"ee308bd7-c151-4d3c-b7ff-edf4751bbc13","name":"Sign up - positive","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Test\",\r\n    \"email\": \"TestUser@yahoo.com\",\r\n    \"password\": \"1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/signup"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"64"},{"key":"ETag","value":"W/\"40-KQu+yleEFfLiSrqtmnTove03jkU\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:30:25 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"result\": \"You created an account.\"\n    }\n}"},{"id":"a9a97bca-5291-43de-9147-1f199261de15","name":"Sign up - negative","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Test\",\r\n    \"email\": \"TestUser@yahoo.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/signup"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"61"},{"key":"ETag","value":"W/\"3d-vjGFU3VVE1DjNWAU3VFdbQyMw9U\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:31:07 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"fail\",\n    \"data\": {\n        \"password\": \"Password is required.\"\n    }\n}"}],"_postman_id":"97460c8b-a108-4bfc-a26d-6d3762a1a2e6"},{"name":"Log in","id":"aa50c3e9-3949-47e9-b5e2-cff9f0cc9c4d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Test\",\r\n    \"email\": \"TestUser@yahoo.com\",\r\n    \"password\": \"1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/login","description":"<p>StartFragment</p>\n<p>The user is loged in with:</p>\n<ul>\n<li>email</li>\n<li>password</li>\n</ul>\n<p>All the fields must be provided and validated or else the user is not loged in. Which is what i tested for in this case one with all the needed credentials was positive. and one without one neccesary credential that was negative.</p>\n<p>Here when the user is loged in they will also recieve a token.</p>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/login"],"query":[],"variable":[]}},"response":[{"id":"feed9b13-204b-49c8-b306-8d0eb62a6734","name":"Log in - positive","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Test\",\r\n    \"email\": \"TestUser@yahoo.com\",\r\n    \"password\": \"1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"281"},{"key":"ETag","value":"W/\"119-1GNpXe7u6mAvnA7u2DvyKnEeyC4\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:32:22 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"result\": \"You are logged in\",\n        \"id\": 1,\n        \"email\": \"TestUser@yahoo.com\",\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZW1haWwiOiJUZXN0VXNlckB5YWhvby5jb20iLCJpYXQiOjE2ODE0NzE5NDIsImV4cCI6MTY4MTQ3NTU0Mn0.UrHZyEbLvSQbq-ps0Gabi0wsmF9yoa3C7VfoDcf2L8w\"\n    }\n}"},{"id":"b778174f-8f49-43cb-bc99-58c309bd1668","name":"Log in - negative","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Test\",\r\n    \"email\": \"TestUser@yahoo.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"66"},{"key":"ETag","value":"W/\"42-rBNCXC6aOJEJPFoCY1TGodAOQuc\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:33:31 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"fail\",\n    \"data\": {\n        \"result\": \"need both email and password\"\n    }\n}"}],"_postman_id":"aa50c3e9-3949-47e9-b5e2-cff9f0cc9c4d"},{"name":"Delete User","id":"044afd0e-06ca-43fd-9fd4-3ad2ab145c67","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"TestUser@yahoo.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/","description":"<p>StartFragment</p>\n<p>The user is deleted with:</p>\n<ul>\n<li>email</li>\n</ul>\n<p>The email must be provided, and verifyed or else the user is not deleted. The token must also be there for authentication. I tested for one with a validated email was positive. And one without the token that was negative.</p>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/"],"query":[],"variable":[]}},"response":[{"id":"b9229f84-28ee-4fee-9849-ab2dec34a4b6","name":"Delete User - positive","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"TestUser@yahoo.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"64"},{"key":"ETag","value":"W/\"40-gtOzC38+a7s5x4Ru5DeUP5YpMzc\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:35:38 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"result\": \"You deleted an account.\"\n    }\n}"},{"id":"bd68f854-cdaf-4323-99c5-66c16792fdfe","name":"Delete User - negative","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"TestUser@yahoo.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-CofivaJqGIGz05R35dFIOwNriHo\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:34:26 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Error! Token was not provided.\"\n}"}],"_postman_id":"044afd0e-06ca-43fd-9fd4-3ad2ab145c67"}],"id":"3da16666-8e4f-4526-8378-b1477c78da38","description":"<p>StartFragment</p>\n<p>Auth folder is the user folder, where i tested the user login, logout and delete user.</p>\n<ul>\n<li>Signup - the user is created</li>\n<li>Login - the user logs in and is given a token</li>\n<li>Delete - the user is deleted</li>\n</ul>\n<p>EndFragment</p>\n","_postman_id":"3da16666-8e4f-4526-8378-b1477c78da38","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}}},{"name":"Flower","item":[{"name":"Get FlowerList","id":"15a7a056-750a-40d1-b7f9-1a2738f2a3ac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/flower","description":"<p>StartFragment</p>\n<p><strong>Gets a list of the users flower items</strong></p>\n<p>The body is blank and only the token is provided to get the information from the database.</p>\n<ul>\n<li>positive - the token was provided and the test was positive giving a list of the user flower items</li>\n<li>negativ - the token was not provided and the test was negativ giving a error message.</li>\n</ul>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/flower"],"query":[],"variable":[]}},"response":[{"id":"597ca348-4724-46bd-819a-60c2954a93c4","name":"Get FlowerList - neagtive","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/flower"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-CofivaJqGIGz05R35dFIOwNriHo\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:44:05 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Error! Token was not provided.\"\n}"},{"id":"eb1dd20e-a768-4d72-84ad-b086ab287c92","name":"Get FlowerList - positive","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/flower"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"225"},{"key":"ETag","value":"W/\"e1-Tqcs+uaqEM08jBpB0Zu4FgIlVFs\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:08:20 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"result\": \"FlowerList:\",\n        \"UserId\": 2,\n        \"data\": {\n            \"Flower\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Rose\",\n                    \"ColourId\": 1,\n                    \"UserId\": 2\n                },\n                {\n                    \"id\": 2,\n                    \"name\": \"Tulip\",\n                    \"ColourId\": 2,\n                    \"UserId\": 2\n                },\n                {\n                    \"id\": 3,\n                    \"name\": \"Lily\",\n                    \"ColourId\": 1,\n                    \"UserId\": 2\n                }\n            ]\n        }\n    }\n}"}],"_postman_id":"15a7a056-750a-40d1-b7f9-1a2738f2a3ac"},{"name":"Post New Flower","id":"f8dc95ff-2cb7-49d3-afb0-6d07f6b9307b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:3000/flower","description":"<p>StartFragment</p>\n<p>Posts a new flower item for the user who provided the token.</p>\n<p><strong>Needed:</strong></p>\n<ul>\n<li>Name - name of the flower.</li>\n<li>ColourId - colour id that the flower is placed within(it needs to exist)</li>\n<li>token - the token is provided to get the information from the database about this specific user.</li>\n</ul>\n<p><strong>Test:</strong></p>\n<ul>\n<li>positive - the token was provided and the test was positive creating a new flower item for this user</li>\n<li>negativ - the token was not provided and the test was negativ giving a error message.</li>\n</ul>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/flower"],"query":[],"variable":[]}},"response":[{"id":"0ec9d617-47d8-45fc-9dc2-e43400a09218","name":"Post New Flower - positive","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"Name\": \"Rose\",\r\n    \"ColourId\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/flower"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"121"},{"key":"ETag","value":"W/\"79-cL1QYrDMZtOWg4bIUoZEKxn8GIc\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:05:13 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"result\": \"New Flower documented in database\",\n        \"data\": {\n            \"Name\": \"Rose\",\n            \"ColourId\": 1,\n            \"UserId\": 2\n        }\n    }\n}"},{"id":"60421085-56c4-46a7-a189-c95d10e9a752","name":"Post New Flower - negative","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"Name\": \"Rose\",\r\n    \"ColourId\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/flower"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-CofivaJqGIGz05R35dFIOwNriHo\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:26:28 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Error! Token was not provided.\"\n}"}],"_postman_id":"f8dc95ff-2cb7-49d3-afb0-6d07f6b9307b"},{"name":"Update Flower","id":"7da7c305-2974-4074-82fe-970480e98321","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"http://localhost:3000/","description":"<p>StartFragment</p>\n<p>Change a flower item.</p>\n<p><strong>Needed:</strong></p>\n<ul>\n<li>Path Variable - need an id number on the flower that you want to change.</li>\n<li>Name - a name you want to change the flower item to</li>\n<li>ColourId - colour id that the flower is placed within(it needs to exist)</li>\n<li>token - the token needs to be authenticated(only authenticated users are able to change a flower item).</li>\n</ul>\n<p><strong>Test:</strong></p>\n<ul>\n<li>positive - the token was provided and the test was positive changing the flower items name and colour-id</li>\n<li>negativ - the token was not provided and the test was negativ giving a error message.</li>\n</ul>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/"],"query":[],"variable":[]}},"response":[{"id":"79d553b6-4118-4771-8292-d6a7b7f83fa5","name":"Update Flower - positive","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Tulip\",\r\n    \"ColourId\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/flower/:id","host":["http://localhost:3000/flower"],"path":[":id"],"variable":[{"key":"id","value":"1","description":"flower id"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"57"},{"key":"ETag","value":"W/\"39-fFD8Nz/AuHng+qvnr0HMJ60Nvz0\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:23:40 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Flower updated successfully.\"\n}"},{"id":"17a54fad-96f9-49f9-a6fa-b6c02657d0aa","name":"Update Flower - negative","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Rose\",\r\n    \"ColourId\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/flower/:id","host":["http://localhost:3000/flower"],"path":[":id"],"variable":[{"key":"id","value":"2","description":"flower id"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-CofivaJqGIGz05R35dFIOwNriHo\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:27:03 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Error! Token was not provided.\"\n}"}],"_postman_id":"7da7c305-2974-4074-82fe-970480e98321"},{"name":"Delete Flower","id":"8aae76ba-28c0-4342-a41f-c14d6c8b336b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:3000/","description":"<p>StartFragment</p>\n<p>Delete a flower item.</p>\n<p><strong>Needed:</strong></p>\n<ul>\n<li>id - a id of the flower you want to delete</li>\n<li>token - the token needs to be authenticated(only authenticated users are able to delete a flower item).</li>\n</ul>\n<p><strong>Test:</strong></p>\n<ul>\n<li>positive - the token was provided and the test was positive deleting the flower item</li>\n<li>negativ - the token was not provided and the test was negativ giving a error message.</li>\n</ul>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/"],"query":[],"variable":[]}},"response":[{"id":"7c1080f4-60f8-4252-80b9-e7b7fcb1f8cb","name":"Delete Flower - positive","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Tulip\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/flower"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"61"},{"key":"ETag","value":"W/\"3d-RdBy1CHGQqo5xrB7l19JXSd71CM\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:24:35 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"result\": \"You deleted a flower\"\n    }\n}"},{"id":"868629a4-1fdb-48ca-85af-197e419d203d","name":"Delete Flower - negative","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Tulip\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/flower"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-CofivaJqGIGz05R35dFIOwNriHo\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:27:18 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Error! Token was not provided.\"\n}"}],"_postman_id":"8aae76ba-28c0-4342-a41f-c14d6c8b336b"}],"id":"5a3fce8c-e4da-43f1-807b-3c901abf4f84","description":"<p>StartFragment</p>\n<p>This is the Flower folder where all the flower endpoints where tested:</p>\n<ul>\n<li>GET - view all the flower items for that specific user with the token.</li>\n<li>POST - create a new flower item.</li>\n<li>PUT - change a flower item.</li>\n<li>DELETE - delete a flower item.</li>\n</ul>\n<p>EndFragment</p>\n","_postman_id":"5a3fce8c-e4da-43f1-807b-3c901abf4f84","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}}},{"name":"Colour","item":[{"name":"Get ColourList","id":"523db2f1-6fd2-407c-8b0a-4925ad089d74","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/colour","description":"<p>StartFragment</p>\n<p><strong>Gets a list of the colour items</strong></p>\n<p>The body is blank and only the token is provided to get the information from the database.</p>\n<ul>\n<li>positive - the token was provided and the test was positive giving a list of all the colour items.</li>\n<li>negativ - the token was not provided and the test was negativ giving a error message.</li>\n</ul>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/colour"],"query":[],"variable":[]}},"response":[{"id":"a33a8fe0-60a0-42f6-8550-a36938312d9f","name":"Get ColourList - positive","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/colour"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"143"},{"key":"ETag","value":"W/\"8f-iBh6xcWTtjD87qMAs62hGh4zy2I\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:00:24 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"result\": \"ColourList:\",\n        \"data\": {\n            \"Colour\": [\n                {\n                    \"id\": 1,\n                    \"name\": \"Blue\"\n                },\n                {\n                    \"id\": 2,\n                    \"name\": \"Pink\"\n                },\n                {\n                    \"id\": 3,\n                    \"name\": \"Purple\"\n                }\n            ]\n        }\n    }\n}"},{"id":"72e4c886-d848-49e7-a703-f7970b0c9d41","name":"Get ColourList - negative","originalRequest":{"method":"GET","header":[],"url":"http://localhost:3000/colour"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-CofivaJqGIGz05R35dFIOwNriHo\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:51:31 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Error! Token was not provided.\"\n}"}],"_postman_id":"523db2f1-6fd2-407c-8b0a-4925ad089d74"},{"name":"Post New Colour","id":"9baaa83a-1fad-42c9-a84d-a8549a08b724","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:3000/colour","description":"<p>StartFragment</p>\n<p>Posts a new colour with a provided token.</p>\n<p><strong>Needed:</strong></p>\n<ul>\n<li>name - name of the colour</li>\n<li>token - the token needs to be provided</li>\n</ul>\n<p><strong>Test:</strong></p>\n<ul>\n<li>positive - the token was provided and the test was positive creating a new colour</li>\n<li>negativ - the token was not provided and the test was negativ giving a error message.</li>\n</ul>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/colour"],"query":[],"variable":[]}},"response":[{"id":"82fb5c64-4647-4854-b7f2-2ce0d0d673f1","name":"Post New Colour - positive","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Pink\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/colour"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"94"},{"key":"ETag","value":"W/\"5e-I64emyg5uUyZEI0JbbdCdr5g2pg\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:53:36 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"result\": \"You made a new Colour\",\n        \"User\": 1,\n        \"data\": {\n            \"Name\": \"Pink\"\n        }\n    }\n}"},{"id":"7e06507d-d499-4fbf-bd94-1bcb5508efa1","name":"Post New Colour - negative","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Pink\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/colour"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-CofivaJqGIGz05R35dFIOwNriHo\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:53:01 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Error! Token was not provided.\"\n}"}],"_postman_id":"9baaa83a-1fad-42c9-a84d-a8549a08b724"},{"name":"Update Colour","id":"ca11b9fa-34ec-4125-9c46-7926820af2dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"http://localhost:3000/","description":"<p>StartFragment</p>\n<p>Change a colour.</p>\n<p><strong>Needed:</strong></p>\n<ul>\n<li>Path Variable - need an id number on the colour that you want to change.</li>\n<li>name - a name you whant to change the colour item to.</li>\n<li>token - the token needs to be authenticated(only authenticated users are able to change a colour).</li>\n</ul>\n<p><strong>Test:</strong></p>\n<ul>\n<li>positive - the token was provided and the test was positive changing the colour items name.</li>\n<li>negativ - the token was not provided and the test was negativ giving a error message.</li>\n</ul>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/"],"query":[],"variable":[]}},"response":[{"id":"c9959d1b-ba80-419c-8ec5-bc9be9050c01","name":"Update Colour - positive","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Blue\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/colour/:id","host":["http://localhost:3000/colour"],"path":[":id"],"variable":[{"key":"id","value":"1","description":"colour id number"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"57"},{"key":"ETag","value":"W/\"39-Tfm2T+xWLKK8k64chc5PomU/6u8\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:55:24 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Colour updated successfully.\"\n}"},{"id":"221af487-efda-4b89-a507-2731d8ef8597","name":"Update Colour - negative","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Pink\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/colour/:id","host":["http://localhost:3000/colour"],"path":[":id"],"variable":[{"key":"id","value":"1","description":"colour id number"}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-CofivaJqGIGz05R35dFIOwNriHo\""},{"key":"Date","value":"Fri, 14 Apr 2023 11:56:13 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Error! Token was not provided.\"\n}"}],"_postman_id":"ca11b9fa-34ec-4125-9c46-7926820af2dd"},{"name":"Delete Colour","id":"7443bcc3-8f1f-4674-ac5a-3e1635183d5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:3000/colour","description":"<p>StartFragment</p>\n<p>Delete a colour.</p>\n<p><strong>Needed:</strong></p>\n<ul>\n<li>id - a id of the colour you want to delete (cant be attached to a flower item!)</li>\n<li>token - the token needs to be authenticated(only authenticated users are able to delete a flower item).</li>\n</ul>\n<p><strong>Test:</strong></p>\n<ul>\n<li>positive - the token was provided and the test was positive deleting the colour</li>\n<li>negativ - the token was not provided and the test was negativ giving a error message.</li>\n</ul>\n<p>EndFragment</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}},"urlObject":{"host":["http://localhost:3000/colour"],"query":[],"variable":[]}},"response":[{"id":"215be39d-5b8c-4d66-9f6a-14cadb28f684","name":"Delete Colour - positive","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Purple\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/colour"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"62"},{"key":"ETag","value":"W/\"3e-bpSJkhE2fqT03fqOgMLQ8Ooziyo\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:38:18 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"data\": {\n        \"result\": \"You deleted a colour.\"\n    }\n}"},{"id":"b3898961-c72d-45fb-b101-fa8eb7e804a5","name":"Delete Colour - negative","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Purple\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/colour"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"60"},{"key":"ETag","value":"W/\"3c-CofivaJqGIGz05R35dFIOwNriHo\""},{"key":"Date","value":"Fri, 14 Apr 2023 12:27:38 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": false,\n    \"message\": \"Error! Token was not provided.\"\n}"}],"_postman_id":"7443bcc3-8f1f-4674-ac5a-3e1635183d5e"}],"id":"66268232-eb5c-4934-9778-4b0eb4b24ded","description":"<p>StartFragment</p>\n<p>This is the Colour folder where all the colour endpoints were tested:</p>\n<ul>\n<li>GET - view all the colour items.</li>\n<li>POST - create a new colour item.</li>\n<li>PUT - change a colour item.</li>\n<li>DELETE - delete a colour item.</li>\n</ul>\n<p>EndFragment</p>\n","_postman_id":"66268232-eb5c-4934-9778-4b0eb4b24ded","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"0363374a-c115-4e1e-b955-f8646b5e2f87","id":"0363374a-c115-4e1e-b955-f8646b5e2f87","name":"The Garden Application","type":"collection"}}}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]}},"event":[{"listen":"prerequest","script":{"id":"cb0fa9f4-4023-4b9a-b4fb-285f5d8a5d36","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"13c256ef-d5a9-4d56-84ee-5c5c432dc248","type":"text/javascript","exec":[""]}}],"variable":[{"key":"base_path","value":"http://localhost:3000/","type":"string"}]}