DevCamper API

Backend API for the DevCamper application to manage bootcamps, courses, revies, 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": "TEST Bootcamp<script>alert(1)</script>", "description": "Devworks is a full stack JavaScript Bootcamp located in the heart of Boston that focuses on the technologies you need to get a high paying job as a web developer", "website": "https://devworks.com", "phone": "(111) 111-1111", "email": "enroll@devworks.com", "address": "233 Bay State Rd Boston MA 02215", "careers": ["Web Development", "UI/UX", "Business"], "housing": true, "jobAssistance": true, "jobGuarantee": false, "acceptGi": true }
Description

Update single bootcamp in database.

Headers
KeyValueDescription
Content-Typeapplication/json

jSON Type

Body
{ "name": "TEST BOOTCAMP" }
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
KeyValueDescription
file

Courses 6

CRUD courses

Description

Create a course for a specific bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

jSON Type

Body
{ "title": "Front 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 }
Headers
KeyValueDescription
Content-Typeapplication/json

jSON Type

Body
{ "tuition": 13000 }
Description

Delete Course from Database.

Headers
KeyValueDescription
Content-Typeapplication/json

jSON Type

Body
{ "tuition": 13000 }

Authentication 8

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

Headers
KeyValueDescription
Content-Typeapplication/json

jSON Type

Body
{ "name": "Chaitanya Verma", "email": "cv@gmail.com", "role": "user", "password": "cv123456" }
Description

Login the user

Headers
KeyValueDescription
Content-Typeapplication/json

jSON Type

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

Get data of logged in user

Headers
KeyValueDescription
Content-Typeapplication/json

jSON Type

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
{ "password": "123456789" }
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": "cv123456", "newPassword": "123456" }

Users 5

CRUD functionality for users only available to admins.

Description

Get All Users (admin)

Description

Create New User (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

jSON Type

Body
{ "name": "Atul Choudhary", "email": "jatatul7@gmail.com", "password": "atul1022", "role": "user" }
Description

Update a User (Admin)

Headers
KeyValueDescription
Content-Typeapplication/json

jSON Type

Body
{ "name": "Atul Jat" }