backend API for DevCampers application to manage bootcamps,courses,reviews,users and authentication
implement authorization and authentication for routes
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"email": "kevin@gmail.com"
}get current logged in user via it’s generated token
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"email": "jon@gmail.com",
"password": "john@000"
}| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"email": "ahmed@gmail.com",
"password": "123456"
}Add user to database with encrypted password
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"name": "ahmed mike",
"email": "ahmed@gmail.com",
"password": "123456",
"role": "publisher"
}reset user password via token
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"password": "kevin@1123"
}update logged in user details
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"name": "kevinup",
"email": "kevinup@gmail.com"
}update user password via token
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"currentPassword": "kevin@1123",
"newPassword": "kevin@1234"
}logout the current user & clear cookie token
bootcamps CRUD functionality
add new bootcamp to database, you must be authenticated and need to be a publisher or admin
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"name": "TESTING <script> alert('hello')</script> ",
"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
}Delete a single bootcamp from database by ID
fetch all bootcamps from database,includes pagination,filtering and much more
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
Get Single Bootcamp by ID
Update a single Bootcamp to database by ID
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"housing": true
}route to upload bootcamp photo
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
| Key | Value | Description |
|---|---|---|
| file |
Create, Read, Update and delete courses
Create a course for specific Bootcamp
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"title": "Front End Web Development THIRD VERSION",
"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,
"bootcamp": "5d713995b721c3bb38c1f5d0",
"user": "5d7a514b5d2c12c7449be045"
}Remove course from database
get all the courses from the database
get a single course by id
Update course to database
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"title": "Front End Web Development Third Version",
"weeks": "12"
}Get all courses for a specific bootcamp
manage course reviews
insert a reviews for a specific bootcamp
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"title": "amazing Bootcamp!",
"text": "thank you for this amazing experience,great stuff",
"rating": 10
}delete review from database
retrieve all reviews from datbase
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
get all the reviews for a specefic bootcamp
get single review by id
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
update review to databae
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"title": "outstanding Bootcamp!",
"rating": 9
}CRUD functionality for users only availabe to admins
Create a new user (admin only)
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"name": "mike smith",
"email": "mike@gmail.com",
"password": "123456"
}delete user from database (admin only)
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"name": "mike brown"
}Get all users (admin)
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
Get a single user by id (admin)
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
Update user to database (admin only)
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | jSON Type |
{
"name": "mike brown"
}