DevCamperAPI

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

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

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "ModernTech 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

Update single bootcamp in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Get bootcamps within a radius of a specific zipcode

Description

Route to upload a bootcamp photo

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

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

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", "scholarshipsAvailable": true }
Description

Update course in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Authentication 8

Routes for user authentication including register, 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 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3NjdiNjU5Y2Q0Mzc4MjgxZTg4Nzc1MSIsImlhdCI6MTczNDg1Mzg0NSwiZXhwIjoxNzM3NDQ1ODQ1fQ.VUyo3Wd3avg6yU3MCjelpBFB6OjQ_DiteKjj6ZJEwRc
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

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

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

Users 5

CRUD functionality fot users only available for admins

Description

Get all users (admin)

Description

Add user to database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Update user in database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Nate Johnson" }

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

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

Update review in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Had Fun" }
Description

Remove review from database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type