BootCamp API

Backend API for the Bootcamp application to manage bootcamps, courses, reviews, users and authentication

Authentication 8

Routes for user authentication including register, login, reset pass ect

Description

This route will generate password token and send an email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

JSON Type

Description

Log current user out and clear cookies

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "mary@gmail.com", "password": "123456" }
Description

Add user to DB with encrypted password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Petros Trak", "email": "pit.tra@gmail.com", "password": "123456", "role": "publisher" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "password": "123456789" }
Description

Update users password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Update logged in user email and name

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVjOGExZDViMDE5MGIyMTQzNjBkYzAzMSIsImlhdCI6MTYwMTgxMDQwOSwiZXhwIjoxNjAyNjc0NDA5fQ.AJt3jdQGYYMmPQwRsvKq0zWtcV1N-Ty4_i3P5Murgwg
Body
{ "email": "maria@gmail.com", "name": "maria" }

Bootcamps 7

Bootcamps CRUD functionality

Description

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

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

AuthorizationBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVmNzZkYzZmNzFmMTVlMjNkMmNjM2YxOCIsImlhdCI6MTYwMTYzNjIwOCwiZXhwIjoxNjAyNTAwMjA4fQ.cwFAWQN9e6jTWe7awfu5HCQbZS2_jZveqNhiHOl-0-o
Body
{ "user": "5c8a1d5b0190b214360dc032", "name": "Test 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", "careers": [ "Mobile Development", "Web Development", "Data Science", "Business" ], "housing": false, "jobAssistance": true, "jobGuarantee": true, "acceptGi": true }
Description

Delete bootcamp from database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Description

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

Description

Get bootcamps within radius of a specific zipcode

Description

Update single bootcamp in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "housing": false }
Description

Rout to upload a bootcamp photo

Body
KeyValueDescription
file

Courses 6

CRUD courses

Description

Create a course for a specific bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Back End Web Development", "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", "weeks": 8, "tuition": 8000, "minimumSkill": "beginner", "scholarhipsAvailable": true }
Description

Get all courses in DB

Query
KeyValueDescription
page2
limit2
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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 }

Reviews 6

Manage course reviews

Description

Add review for an individual bootcamp providing bootcampId

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Nice Bootcamp", "text": "I learned a lot", "rating": 8 }
Description

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

Description

Fetch the reviews for a specific bootcamp providing the bootcampId

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Had fun" }

Users 5

CRUD functionality for users only available to admins

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Petros Trakadas", "email": "pit.trak@gmail.com", "password": "123456", "role": "user" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Petros Trakadas", "email": "pit.trak@gmail.com", "password": "123456", "role": "user" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Pit Trak", "email": "pit.trak@gmail.com", "password": "123456", "role": "user" }