DevCamper API

Authentication 8

Routes for user authentication including register, login, reset password, etc

Description

Generate password token and send email

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "email": "mary@gmail.com" }
Headers
Key Value Description
Content-Type application/json
Description

Login User

Headers
Key Value Description
Content-Type application/json
Body
{ "email": "john@gmail.com", "password": "123456" }
Description

Add user to database with encrypted password

Headers
Key Value Description
Content-Type application/json
Body
{ "name": "Milo Doe", "email": "milo@gmail.com", "password": "123456", "role": "publisher" }
Description

Reset user password using token

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "password": "1234567" }
Description

Update logged in user password, send in the body current password and new password

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "currentPassword": "123456", "newPassword": "1234567" }
Description

Update logged in user name and email

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "currentPassword": "123456", "newPassword": "1234567" }

Bootcamps 7

Bootcamps CRUD functionality

Description

Add new bootcamp to database. Must be authenticated and must be publisher or admin.

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "success": true, "data": { "careers": [ "Mobile Development", "Web Development", "Data Science", "Business" ], "photo": "no-photo.jpg", "housing": false, "jobAssistance": true, "jobGuarantee": true, "acceptGi": true, "_id": "5f35508569b19e2c8ce790bc", "name": "Devcentral Bootcamp", "description": "Is coding your passion? Codemasters will give you the skills and the tools to become the best developer possible. We specialize in front end and full stack web development", "website": "https://devcentral.com", "phone": "(444) 444-4444", "email": "enroll@devcentral.com", "address": "45 Upper College Rd Kingston RI 02881", "createdAt": "2020-08-13T14:39:01.305Z", "__v": 0 } }
Description

Fetch all bootcamps from database. Includes pagination, filtering, etc.

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Query
Key Value Description
select name
Body
{ "_id": "5d713995b721c3bb38c1f5d0", "user": "5d7a514b5d2c12c7449be045", "name": "Devworks Bootcamp", "description": "Devworks is a full stack JavaScript Bootcamp located in the heart of Boston that focuses on the technologies you need to get a high paying job as a web developer", "website": "https://devworks.com", "phone": "(111) 111-1111", "email": "enroll@devworks.com", "address": "233 Bay State Rd Boston MA 02215", "careers": ["Web Development", "UI/UX", "Business"], "housing": true, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Description

Get bootcamps within a radius of a specific zip code

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "_id": "5d713995b721c3bb38c1f5d0", "user": "5d7a514b5d2c12c7449be045", "name": "Devworks Bootcamp", "description": "Devworks is a full stack JavaScript Bootcamp located in the heart of Boston that focuses on the technologies you need to get a high paying job as a web developer", "website": "https://devworks.com", "phone": "(111) 111-1111", "email": "enroll@devworks.com", "address": "233 Bay State Rd Boston MA 02215", "careers": ["Web Development", "UI/UX", "Business"], "housing": true, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Description

Update single bootcamp in database.

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "careers": ["Web Development", "UI/UX"] }
Description

Route to upload a bootcamp photo

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
Key Value Description
file

Courses 6

Create, read, update, and delte courses

Description

Create a course for a specific bootcamp

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "title": "Full Stack Web Development 2", "description": "In this course you will learn full stack web development, first learning all about the frontend with HTML/CSS/JS/Vue and then the backend with Node.js/Express/MongoDB", "weeks": 12, "tuition": 15000, "minimumSkill": "intermediate", "scholarhipsAvailable": true }
Description

Remove course from database

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Description

Get all courses in database

Body
{ "_id": "5d713995b721c3bb38c1f5d0", "user": "5d7a514b5d2c12c7449be045", "name": "Devworks Bootcamp", "description": "Devworks is a full stack JavaScript Bootcamp located in the heart of Boston that focuses on the technologies you need to get a high paying job as a web developer", "website": "https://devworks.com", "phone": "(111) 111-1111", "email": "enroll@devworks.com", "address": "233 Bay State Rd Boston MA 02215", "careers": ["Web Development", "UI/UX", "Business"], "housing": true, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Description

Get the specific courses for a bootcamp

Body
{ "_id": "5d713995b721c3bb38c1f5d0", "user": "5d7a514b5d2c12c7449be045", "name": "Devworks Bootcamp", "description": "Devworks is a full stack JavaScript Bootcamp located in the heart of Boston that focuses on the technologies you need to get a high paying job as a web developer", "website": "https://devworks.com", "phone": "(111) 111-1111", "email": "enroll@devworks.com", "address": "233 Bay State Rd Boston MA 02215", "careers": ["Web Development", "UI/UX", "Business"], "housing": true, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Description

Get single course by it’s id

Body
{ "_id": "5d713995b721c3bb38c1f5d0", "user": "5d7a514b5d2c12c7449be045", "name": "Devworks Bootcamp", "description": "Devworks is a full stack JavaScript Bootcamp located in the heart of Boston that focuses on the technologies you need to get a high paying job as a web developer", "website": "https://devworks.com", "phone": "(111) 111-1111", "email": "enroll@devworks.com", "address": "233 Bay State Rd Boston MA 02215", "careers": ["Web Development", "UI/UX", "Business"], "housing": true, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Description

Update Course in database

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "tuition": 13000, "minimumSkill": "advanced" }

Reviews 6

Manage course reviews

Description

Insert review for a specific bootcamp

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "title": "Nice bootcamsp", "text": "I learned a lost", "rating": 8 }
Description

Get all reviews from database and populate with bootcamp name and description

Description

Fetch a review from database by id and populate Bootcamp name and description

Description

Update Review in database

Headers
Key Value Description
Content-Type application/json

JSON Content Type

Body
{ "title": "hadfun" }

Users 4

CRUD functionality for users only available to admins

Description

Add user to database (admin)

Body
{ "name": "Nate Smith", "email": "nate@gmail.com", "password": "123456" }
Description

Delete user from database (admin)

Description

Get all users (admin)

Description

Update user in database (admin)

Body
{ "name": "Dawn Smith" }