Bootcamp API

Backend API documentation on how to manage bootcamps, courses, reviews, users and authentication.

For more in depth docs with sample requests, visit the Postman Doc

Authentication 8

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

Description

Add user to database with encrypted password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "John Doe", "email": "john@gmail.com", "password": "123456", "role": "publisher" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "john@gmail.com", "password": "123456" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Description

Generate password token and send email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "john@gmail.com" }
Description

Reset user password using token

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "password": "1234567" }
Description

Update logged in user name and email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Body
{ "email": "john@gmail.com", "name": "John Doe" }
Description

Update logged in user password, send in the body currentPassword and newPassword

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Body
{ "currentPassword": "1234567", "newPassword": "123456" }
Description

Clear token cookie

Headers
KeyValueDescription
AuthorizationBearer your.jwt.token

Bootcamps 7

Bootcamps CRUD functionality

Description

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

Description

Add new bootcamp to database. Must be authenticated and must be publisher or admin. Only 1 bootcamp allowed per publisher

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Body
{ "name": "ModernTech Bootcamp", "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", "website": "https://moderntech.com", "phone": "(222) 222-2222", "email": "enroll@moderntech.com", "address": "220 Pawtucket St, Lowell, MA 01854", "careers": ["Web Development", "UI/UX", "Mobile Development"], "housing": false, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Description

Update single bootcamp in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Body
{ "careers": ["Web Development", "UI/UX"] }
Description

Delete bootcamp from database

Headers
KeyValueDescription
AuthorizationBearer your.jwt.token
Description

Get bootcamps within a radius of a specific zipcode

Description

Route to upload a bootcamp photo

Headers
KeyValueDescription
AuthorizationBearer your.jwt.token
Body
KeyValueDescription
file
Autho

Courses 6

Create, read, update and delete courses

Description

Get all courses in database

Description

Create a course for a specific bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Body
{ "title": "Full Stack Web Development", "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": 10000, "minimumSkill": "intermediate", "scholarhipsAvailable": true }
Description

Update course in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Body
{ "tuition": 13000, "minimumSkill": "advanced" }
Description

Remove course from database

Headers
KeyValueDescription
AuthorizationBearer your.jwt.token

Reviews 6

Manage course reviews

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

Insert review for a specific bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Body
{ "title": "Nice Bootcamp", "text": "I learned a lot", "rating": 8 }
Description

Update review in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Body
{ "title": "Had Fun" }
Description

Remove review from database

Headers
KeyValueDescription
AuthorizationBearer your.jwt.token
Query
KeyValueDescription
Autho

Users 5

CRUD functionality for users only available to admin users

Description

Get all users (admin)

Headers
KeyValueDescription
AuthorizationBearer your.jwt.token
Description

get single user by id (admin)

Headers
KeyValueDescription
AuthorizationBearer your.jwt.token
Description

Add user to database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Update user in database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer your.jwt.token
Body
{ "name": "Nate Johnson" }
Description

Delete user from database (admin)

Headers
KeyValueDescription
AuthorizationBearer your.jwt.token
Query
KeyValueDescription
Author