DevCamper API

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

Authentication 8

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

Description

Generate password token and send email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

JSON Type

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

JSON Type

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

JSON Type

Body
{ "email": "john@gmail.com", "password": "123456" }
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" }
Description

Reset user password using token

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "password": "123123" }
Description

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

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Update logged in user name and email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "4441", "email": "john1@gmail.com" }

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

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

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

Description

Get bootcamps within a radius of a specific zipcode

Description

Update single bootcamp in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Solaris" }

Courses 6

Description

Create a course for a specific bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Solar", "description": "Dan the Man", "minimumSkill": "beginner", "tuition": "5443", "weeks": "14" }
Description

Get all courses in database

Description

Update course in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Lunar" }

Reviews 6

Manage course reviews

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Teamwork Sucks", "text": "Nym the best team", "rating": "7" }
Description

Delete review from database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Description

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

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Fetch the reviews for a specific bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

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

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Description

Update review in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Teamwork Sucks", "text": "Nym the best team" }

Users 5

CRUD functionality for users only available to admin

Description

Add a user to database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "NyMSolareXe", "email": "NyMSolar@gmail.com", "password": "solar1234" }
Description

Delete user from database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Lunar" }
Description

Get all users admin

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Get single user by id (you must be a admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Update user in the database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Lunar" }