DevCampers API

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

Authentication 8

Routes for 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" }
Description

Get current user via token

Description

Login user using email and password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Add user to db with encrypted password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Publisher Account", "email": "pub@gmail.com", "password": "123456", "role": "publisher" }
Description

Reset Password via generated token

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "password": "1234567890" }
Description

Update logged in user password, send in the body currentpassword and password

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "currentpassword": "1234567890", "password": "123456" }
Description

Update user name and email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "John Doe", "email": "john@gmail.com" }

Bootcamps 6

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": "Devcentral Bootcamp NEW", "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

Fetch all bootcamps from database. Includes pagination, filtering etc

Query
KeyValueDescription
limit2
page2
Description

Update single bootcamp and database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "housing": false }
Description

Route to upload a bootcamp photo

Body
KeyValueDescription
file

Courses 6

Create, read, update and delete courses

Description

Create course with bootcampId

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "Kevin Course", "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 the database

Description

Update course with course id

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title": "HAHA Update Development" }

Users 1

Description

Get all users with Admin acess