DevCamper Api

Backend Api for creating the devCamper application to manage bootcamps, courses, reviews and authentication

Bootcamps 7

Bootcamps CRUD functionalities

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": "Devcentral Bootcamp test", "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
{"housing":true}
Description

Route to upload bootcamp photo

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Courses 6

Create, read, update and delete courses

Description

Create a new Course for a 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": 10000, "minimumSkill": "beginner", "scholarshipAvailable": false }
Description

Update Course in database

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

Authentication 7

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

Description

register a user

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "hamza idrissi ", "email": "hamza@gmail.com", "password": "123456", "role": "publisher" }
Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

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

JSON Type

Description

Generate password token and send email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "hamza@gmail.com" }
Description

reset user password using token

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "password": "12345a" }
Description

Update logged in user name and email

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "email": "hamza@gmail.com", "name": "hamza smith" }
Description

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

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "newPassword": "123456", "currentPassword": "12345a" }

Users 5

CRUD functionality for users only available to admins

Description

Add user to database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "name": "Sara ozil", "email": "ozil@gmail.com", "password": "123456" }
Description

Update user in database (admin)

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "role": "user" }

Reviews 6

manage courses reviews

Description

Get all reviews from data nd populate with bootcamp name and description

Description

Fetch a review from data base by id and populate bootcamp name and description

Description

Add review for a specific bootcamp

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "title":"nice bootcamap", "text":"I learned a lot", "rating":7 }
Description

update review details by the review owner or admin

Headers
KeyValueDescription
Content-Typeapplication/json

JSON Type

Body
{ "rating": 1 }