{"info":{"_postman_id":"bc136e30-325b-46c1-9d41-2c7d1869a094","name":"devCamp API","description":"<html><head></head><body><p>Backend API (RESTful) for devCamp application to manage bootcamps, courses &amp; users.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"16018602","collectionId":"bc136e30-325b-46c1-9d41-2c7d1869a094","publishedId":"VVBQYV4E","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-09-07T07:47:14.000Z"},"item":[{"name":"Bootcamps","item":[{"name":"Get all bootcamps","id":"69f811af-a8f7-4dce-9ac9-24a3165e967d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/bootcamps","description":"<p>Fetch all the bootcamps (includes advanced querying such as pagination, filtering, etc). @access: public.</p>\n","urlObject":{"path":["api","v1","bootcamps"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"69f811af-a8f7-4dce-9ac9-24a3165e967d"},{"name":"Create a bootcamp","id":"930f64fc-cc2b-4c3d-b583-43ce07c7da41","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzMTgyNzM1YWYyMDY4OWUyMjNhMWQ5YSIsImlhdCI6MTY2MjUyNzMzMywiZXhwIjoxNjY1MTE5MzMzfQ.h_XXSZxRcKLgq4nLUQFz79aR4KZjzgAvPxJ_tz-ANHM","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Test Technical bootcamp\",\r\n    \"description\": \"ModernTech has one goal, and that is to make you a rockstar developer and/or designer with a six figure salary. We teach both development and UI/UX\",\r\n    \"website\": \"https://moderntech.com\",\r\n    \"phone\": \"(222) 222-2222\",\r\n    \"email\": \"enroll@moderntech.com\",\r\n    \"address\": \"220 Pawtucket St, Lowell, MA 01854\",\r\n    \"careers\": [\"Web Development\", \"UI/UX\", \"Mobile Development\"],\r\n    \"housing\": false,\r\n    \"jobAssistance\": true,\r\n    \"jobGuarantee\": false,\r\n    \"acceptGi\": true\r\n}"},"url":"{{URL}}/api/v1/bootcamps","description":"<p>Create a bootcamp and add it to the database. @access: authenticated users(publisher/admin).</p>\n","urlObject":{"path":["api","v1","bootcamps"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"930f64fc-cc2b-4c3d-b583-43ce07c7da41"},{"name":"Update a bootcamp by its id","id":"660e0b12-0407-4b63-9b27-2e1173492205","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"housing\": true\r\n}"},"url":"{{URL}}/api/v1/bootcamps/63184824c977d0a662aaa433","description":"<p>Update single bootcamp in database. @access: owner of bootcamp/admin</p>\n","urlObject":{"path":["api","v1","bootcamps","63184824c977d0a662aaa433"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"660e0b12-0407-4b63-9b27-2e1173492205"},{"name":"Get single bootcamp by id","id":"0bc2504f-b5d4-46e6-96af-30ac48988c08","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/bootcamps/5d725a1b7b292f5f8ceff788","description":"<p>Get the details of a bootcamp by its ID. @access: public</p>\n","urlObject":{"path":["api","v1","bootcamps","5d725a1b7b292f5f8ceff788"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"0bc2504f-b5d4-46e6-96af-30ac48988c08"},{"name":"Delete a bootcamp by id","id":"77ea0668-3333-4527-9535-c5ee737dbe49","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"{{URL}}/api/v1/bootcamps/63184824c977d0a662aaa433","description":"<p>Delete bootcamp from database. @access: owner of bootcamp/admin.</p>\n","urlObject":{"path":["api","v1","bootcamps","63184824c977d0a662aaa433"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"77ea0668-3333-4527-9535-c5ee737dbe49"},{"name":"Get bootcamps in a certain radius ","id":"cc3c74ea-6e23-44a9-bb92-ee5e31965298","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/bootcamps/radius/02118/30","description":"<p>Get bootcamps within a radius of a specific zipcode. @access: public.</p>\n","urlObject":{"path":["api","v1","bootcamps","radius","02118","30"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cc3c74ea-6e23-44a9-bb92-ee5e31965298"},{"name":"upload photo of a bootcamp","id":"9f5469ca-892e-4c1c-90ac-560c932117aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"formdata","formdata":[{"key":"file","type":"file","src":"/C:/Users/shinj/Downloads/bootcamp.jpg"}]},"url":"{{URL}}/api/v1/bootcamps/5d725a1b7b292f5f8ceff788/photo","description":"<p>Upload a bootcamp photo. @access: owner of bootcamp/admin.</p>\n","urlObject":{"path":["api","v1","bootcamps","5d725a1b7b292f5f8ceff788","photo"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9f5469ca-892e-4c1c-90ac-560c932117aa"}],"id":"4d6041b0-e376-484f-9713-37d1e7cd1244","description":"<p>bootcamps <strong>CRUD functionality</strong> for devCamp application</p>\n","_postman_id":"4d6041b0-e376-484f-9713-37d1e7cd1244"},{"name":"Courses","item":[{"name":"Get all courses","id":"91c191db-d1c7-4c29-a74d-cfc922a780b1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/courses/","description":"<p>Get all the courses in the db. @access: public.</p>\n","urlObject":{"path":["api","v1","courses",""],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"91c191db-d1c7-4c29-a74d-cfc922a780b1"},{"name":"Get all courses from a specific bootcamp","id":"214968b1-10c4-4b54-923b-7b8a0b0f7ea9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/bootcamps/5d725a037b292f5f8ceff787/courses","description":"<p>Get all the courses that belong to a particular bootcamp @access: public.</p>\n","urlObject":{"path":["api","v1","bootcamps","5d725a037b292f5f8ceff787","courses"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"214968b1-10c4-4b54-923b-7b8a0b0f7ea9"},{"name":"Get single course","id":"f41cc9a8-2478-49d3-9eb4-29ef7a12b063","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/courses/5d725c84c4ded7bcb480eaa0","description":"<p>Get a single course by its ID. @access: public.</p>\n","urlObject":{"path":["api","v1","courses","5d725c84c4ded7bcb480eaa0"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f41cc9a8-2478-49d3-9eb4-29ef7a12b063"},{"name":"create new course for a specific bootcamp","id":"63dd4be2-9504-47bc-89f7-c8df2e3eaf25","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n      \"title\": \"Front End Web Development\",\r\n    \"description\": \"This course will provide you with all of the essentials to become a successful frontend web developer. You will learn to master HTML, CSS and front end JavaScript, along with tools like Git, VSCode and front end frameworks like Vue\",\r\n    \"weeks\": 8,\r\n    \"tuition\": 10000,\r\n    \"minimumSkill\": \"beginner\",\r\n    \"scholarshipsAvailable\": true\r\n    \r\n}"},"url":"{{URL}}/api/v1/bootcamps/5d725a1b7b292f5f8ceff788/courses","description":"<p>Create a course for a bootcamp. @access: owner of bootcamp (can add only 1 course)/admin.</p>\n","urlObject":{"path":["api","v1","bootcamps","5d725a1b7b292f5f8ceff788","courses"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"63dd4be2-9504-47bc-89f7-c8df2e3eaf25"},{"name":"Update a course","id":"400a3428-851e-462e-8c74-eb589f67c616","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"tuition\": 12000\r\n    \r\n}"},"url":"{{URL}}/api/v1/courses/5d725c84c4ded7bcb480eaa0","description":"<p>Update a course for a bootcamp. @access: owner of bootcamp/admin.</p>\n","urlObject":{"path":["api","v1","courses","5d725c84c4ded7bcb480eaa0"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"400a3428-851e-462e-8c74-eb589f67c616"},{"name":"Delete a course","id":"928a782a-92a6-4bd9-97f6-1c84d4bbbeaf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"tuition\": 12000\r\n    \r\n}"},"url":"{{URL}}/api/v1/courses/5d725a4a7b292f5f8ceff789","description":"<p>Delete a course from a bootcamp. @access: owner of bootcamp/admin.</p>\n","urlObject":{"path":["api","v1","courses","5d725a4a7b292f5f8ceff789"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"928a782a-92a6-4bd9-97f6-1c84d4bbbeaf"}],"id":"cbe06811-0529-42f5-a048-ac489789c4ad","description":"<p>Create, read, update and delete courses</p>\n","_postman_id":"cbe06811-0529-42f5-a048-ac489789c4ad"},{"name":"Authentication","item":[{"name":"Register User","event":[{"listen":"test","script":{"id":"23381a69-7089-43bd-8437-8e926ec89697","exec":["pm.environment.set(\"TOKEN\", pm.response.json().token)"],"type":"text/javascript"}}],"id":"557ca85f-c8cd-40df-bb32-721fdbe158c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"John Doe\",\r\n    \"email\": \"john@gmail.com\",\r\n    \"password\": \"123456\",\r\n    \"role\": \"publisher\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/auth/register","description":"<p>Add user to database with encrypted password. @access: public.</p>\n","urlObject":{"path":["api","v1","auth","register"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"557ca85f-c8cd-40df-bb32-721fdbe158c7"},{"name":"Login user","event":[{"listen":"test","script":{"id":"c4f5bf6f-d08f-4d0f-a3a2-d2f20b3a5495","exec":["pm.environment.set(\"TOKEN\", pm.response.json().token)"],"type":"text/javascript"}}],"id":"72628071-cb61-4d38-83b3-fd070f29dea2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"admin@gmail.com\",\r\n    \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/auth/login","description":"<p>Login user with email and password. @access: public.</p>\n","urlObject":{"path":["api","v1","auth","login"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"72628071-cb61-4d38-83b3-fd070f29dea2"},{"name":"get logged in user's details","id":"aeda8436-7e24-4ef8-ae60-84bb4d89a0c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYzMTgyNzM1YWYyMDY4OWUyMjNhMWQ5YSIsImlhdCI6MTY2MjUyNzYxMSwiZXhwIjoxNjY1MTE5NjExfQ.XjFOF8JOWNKxdK3r37BTalht_10KL120wL4zd4n5Uyg","type":"text"}],"url":"{{URL}}/api/v1/auth/me","description":"<p>get logged in user's details (my details). @access: authorized user only.</p>\n","urlObject":{"path":["api","v1","auth","me"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"aeda8436-7e24-4ef8-ae60-84bb4d89a0c6"},{"name":"Update user details","event":[{"listen":"test","script":{"id":"c4f5bf6f-d08f-4d0f-a3a2-d2f20b3a5495","exec":["pm.environment.set(\"TOKEN\", pm.response.json().token)"],"type":"text/javascript"}}],"id":"a507a034-e6d9-4620-983f-561ca6023c5b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"john1@gmail.com\",\r\n    \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/auth/updatedetails","description":"<p>update logged in user's details. @access: authorized user only.</p>\n","urlObject":{"path":["api","v1","auth","updatedetails"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a507a034-e6d9-4620-983f-561ca6023c5b"},{"name":"Update user password","event":[{"listen":"test","script":{"id":"c4f5bf6f-d08f-4d0f-a3a2-d2f20b3a5495","exec":["pm.environment.set(\"TOKEN\", pm.response.json().token)"],"type":"text/javascript"}}],"id":"b59e56bb-5bef-4f9e-806d-88afa7bbcae6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{  \"currentPassword\": \"123456\",\r\n\"newPassword\": \"12345ab\"\r\n}  ","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/auth/updatepassword","description":"<p>get logged in user's password. @access: authorized user only.</p>\n","urlObject":{"path":["api","v1","auth","updatepassword"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b59e56bb-5bef-4f9e-806d-88afa7bbcae6"}],"id":"3b0f717b-d260-40fb-b616-7e52c03519b3","description":"<p>Routes for user authentication including register, login, update user details &amp; password, etc.</p>\n","_postman_id":"3b0f717b-d260-40fb-b616-7e52c03519b3"},{"name":"Users","item":[{"name":"Get single user","id":"4c362742-8388-469d-8c43-47a231900614","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/users/5c8a1d5b0190b214360dc039","description":"<p>Get single user's details (admin privilege)</p>\n","urlObject":{"path":["api","v1","users","5c8a1d5b0190b214360dc039"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c362742-8388-469d-8c43-47a231900614"},{"name":"Get all users ","id":"3d920873-dfac-49d5-b8ff-88679f51a58d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"{{URL}}/api/v1/users","description":"<p>Get all the users (admin privilege)</p>\n","urlObject":{"path":["api","v1","users"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"3d920873-dfac-49d5-b8ff-88679f51a58d"},{"name":"Create a user","id":"aa2dd6be-4bb7-4ef7-8c33-e470c8c90091","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Jake P\",\r\n    \"email\": \"jake1@gmail.com\",\r\n    \"password\": \"123456\"\r\n}"},"url":"{{URL}}/api/v1/users","description":"<p>Create a user (admin privilege)</p>\n","urlObject":{"path":["api","v1","users"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"aa2dd6be-4bb7-4ef7-8c33-e470c8c90091"},{"name":"Update a user","id":"5c4686cb-370b-4ca3-abf8-cdcbc48aec8e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Jake Peralta\",\r\n    \"email\": \"jake1@gmail.com\",\r\n    \"password\": \"123456\"\r\n}"},"url":"{{URL}}/api/v1/users/63184381c977d0a662aaa426","description":"<p>Update a single user's details (admin privilege)</p>\n","urlObject":{"path":["api","v1","users","63184381c977d0a662aaa426"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5c4686cb-370b-4ca3-abf8-cdcbc48aec8e"},{"name":"Delete a user","id":"1b2742a8-fb13-4536-9d22-5c03246efe21","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"{{URL}}/api/v1/users/63184381c977d0a662aaa426","description":"<p>Delete a single user's details (admin privilege)</p>\n","urlObject":{"path":["api","v1","users","63184381c977d0a662aaa426"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1b2742a8-fb13-4536-9d22-5c03246efe21"}],"id":"53b20442-fd26-48ce-ae34-fba5e00c3a26","description":"<p>CRUD functionality for users only available to admin users</p>\n","_postman_id":"53b20442-fd26-48ce-ae34-fba5e00c3a26"}]}