Udemy Clone API. Feel free to share your friends and developers who love to build tech with Node js.
http://localhost:5000/api/v1/review/updateRating/5efee96ec193a534f441fa97
To update a rating to a bootcamp.
Bearer {{TOKEN}}{
"editRating": 10
}curl "http://localhost:5000/api/v1/review/updateRating/5efee96ec193a534f441fa97" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X PUT \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"editRating":10
}' {
"status": "success",
"data": {
"_id": "5efee96ec193a534f441fa97",
"title": "This bootcamp is awesome",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
"rating": 10,
"bootcamp": "5efc735516104d0d48f23053",
"user": "5efd61c5ee410e17c00285b5",
"createdAt": "2020-07-03T08:16:46.518Z",
"__v": 0
}
} http://localhost:5000/api/v1/review/5efee4f33356381568d366be
To update a review. Only review belongs to user can update.
Bearer {{TOKEN}}{
"title": "This bootcamp is awesome"
}curl "http://localhost:5000/api/v1/review/5efee4f33356381568d366be" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X PUT \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"title":"This bootcamp is awesome"
}' {
"status": "success",
"data": {
"_id": "5efedaf0c5748b16acf57fee",
"title": "This bootcamp is awesome",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
"rating": 10,
"bootcamp": {
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"id": "5efc735516104d0d48f23053"
},
"user": "5efc726516104d0d48f23051",
"createdAt": "2020-07-03T07:14:56.228Z",
"__v": 0
}
} http://localhost:5000/api/v1/review/5efee4f33356381568d366be
To delete a review.
Bearer {{TOKEN}}curl "http://localhost:5000/api/v1/review/5efee4f33356381568d366be" \
-H 'Authorization: Bearer {{TOKEN}}' \
-X DELETE \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/reviews
To add a review to a bootcamp. Only one review can be added per bootcamp.
Bearer {{TOKEN}}{
"title": "This bootcamp is awesome",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
"rating": "8"
}curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/reviews" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X POST \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"title": "This bootcamp is awesome",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
"rating": "8"
}' {
"status": "success",
"data": {
"_id": "5efee96ec193a534f441fa97",
"title": "This bootcamp is awesome",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
"rating": 8,
"bootcamp": "5efc735516104d0d48f23053",
"user": "5efd61c5ee410e17c00285b5",
"createdAt": "2020-07-03T08:16:46.518Z",
"__v": 0
}
} http://localhost:5000/api/v1/review/5efedaf0c5748b16acf57fee
To get a specific review.
curl "http://localhost:5000/api/v1/review/5efedaf0c5748b16acf57fee" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"data": {
"_id": "5efedaf0c5748b16acf57fee",
"title": "Great bootcamp",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
"rating": 10,
"bootcamp": {
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"id": "5efc735516104d0d48f23053"
},
"user": "5efc726516104d0d48f23051",
"createdAt": "2020-07-03T07:14:56.228Z",
"__v": 0
}
} http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/reviews
TO get reviews of a bootcamps.
curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/reviews" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"count": 1,
"data": [
{
"_id": "5efee3a33bcedf32bccbcd33",
"title": "Great bootcamp",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
"rating": 10,
"bootcamp": {
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"id": "5efc735516104d0d48f23053"
},
"user": "5efc726516104d0d48f23051",
"createdAt": "2020-07-03T07:52:03.200Z",
"__v": 0
}
]
} http://localhost:5000/api/v1/review/
To get all reviews.
curl "http://localhost:5000/api/v1/review/" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"count": 2,
"pagination": {},
"data": [
{
"_id": "5efee96ec193a534f441fa97",
"title": "This bootcamp is awesome",
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra feugiat mauris id viverra. Duis luctus ex sed facilisis ultrices. Curabitur scelerisque bibendum ligula, quis condimentum libero fermentum in. Aenean erat erat, aliquam in purus a, rhoncus hendrerit tellus. Donec accumsan justo in felis consequat sollicitudin. Fusce luctus mattis nunc vitae maximus. Curabitur semper felis eu magna laoreet scelerisque",
"rating": 10,
"bootcamp": {
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"id": "5efc735516104d0d48f23053"
},
"user": "5efd61c5ee410e17c00285b5",
"createdAt": "2020-07-03T08:16:46.518Z",
"__v": 0
},
]
} http://localhost:5000/api/v1/user/5efc725516104d0d48f23050
To get a user.
Bearer {{TOKEN}}curl "http://localhost:5000/api/v1/user/5efc725516104d0d48f23050" \
-H 'Authorization: Bearer {{TOKEN}}' \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"data": {
"role": "publisher",
"_id": "5efc725516104d0d48f23050",
"name": "Rahul Sah",
"email": "rahul@gmail.com",
"createdAt": "2020-07-01T11:24:05.199Z",
"__v": 0
}
} http://localhost:5000/api/v1/user/5efc74d165a43f288054030e
To delete a user.
Bearer {{TOKEN}}curl "http://localhost:5000/api/v1/user/5efc74d165a43f288054030e" \
-H 'Authorization: Bearer {{TOKEN}}' \
-X DELETE \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' http://localhost:5000/api/v1/user/5efc726516104d0d48f230515555
To update a user
Bearer {{TOKEN}}{
"name": "sahil Ansari"
}curl "http://localhost:5000/api/v1/user/5efc726516104d0d48f230515555" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X PUT \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"name":"sahil Ansari"
}' {
"status": "success",
"data": {
"role": "publisher",
"_id": "5efc725516104d0d48f23050",
"name": "Sahil Ansari",
"email": "rahul@gmail.com",
"createdAt": "2020-07-01T11:24:05.199Z",
"__v": 0
}
} http://localhost:5000/api/v1/user/
To create a user.
Bearer {{TOKEN}}{
"name": "Kajal Sah",
"email": "kajal@gmail.com",
"password": "12345678"
}curl "http://localhost:5000/api/v1/user/" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X POST \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"name":"Kajal Sah",
"email":"kajal@gmail.com",
"password":"12345678"
}' {
"status": "success",
"data": {
"role": "publisher",
"_id": "5efc725516104d0d48f23050",
"name": "Rahul Sah",
"email": "rahul@gmail.com",
"createdAt": "2020-07-01T11:24:05.199Z",
"__v": 0
}
} http://localhost:5000/api/v1/user/
To see all users
Bearer {{TOKEN}}curl "http://localhost:5000/api/v1/user/" \
-H 'Authorization: Bearer {{TOKEN}}' \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"data": {
"status": "success",
"count": 5,
"pagination": {},
"data": [
{
"role": "user",
"_id": "5f00370aff3c97164ce8d7b0",
"name": "Aman sah",
"email": "aman@gmail.com",
"createdAt": "2020-07-04T08:00:10.177Z",
"__v": 0
},
{
"role": "user",
"_id": "5efd61c5ee410e17c00285b5",
"name": "Kajal Sah",
"email": "kajal@gmail.com",
"createdAt": "2020-07-02T04:25:41.365Z",
"__v": 0
},
]
}
} http://localhost:5000/api/v1/auth/logout/
Logout the user. After logout all cookies is set null
curl "http://localhost:5000/api/v1/auth/logout/" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"data": {}
} http://localhost:5000/api/v1/auth/resetPassword/765fea6bc1bad113b5682e519a03355fc3596ee8
A reset password token is sent to your email and by using it you ccan reset your password
{
"newPassword": "sajidansari@"
}curl " http://localhost:5000/api/v1/auth/resetPassword/765fea6bc1bad113b5682e519a03355fc3596ee8" \
-H 'Content-Type: application/json' \
-X POST \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"newPassword":"sajidansari@"
}' {
"status": "Error",
"data": "Your password has been changed"
} http://localhost:5000/api/v1/auth/forgotPassword
In case you forgot your password. You can reset it by giving your email. A reset password token is send to your email.
{
"email": "Sahil@gmail.com"
}curl "http://localhost:5000/api/v1/auth/forgotPassword" \
-H 'Content-Type: application/json' \
-X POST \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"email":"Sahil@gmail.com"
}' {
"status": "success",
"data": "ResetPassword Email sent"
} http://localhost:5000/api/v1/auth/update/password/
To update user password
Bearer {{TOKEN}}{
"currentPassword": "12345644",
"newPassword": "12345678"
}curl "http://localhost:5000/api/v1/auth/update/password/" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X PUT \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"currentPassword":"12345644",
"newPassword":"12345678"
}' {
"status": "success",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWY2Zjk3NmViMmU1YjM2NGNmYWU0NjgiLCJpYXQiOjE1OTM0NTA2MTUsImV4cCI6MTU5NjA0MjYxNX0.mWeTw7qy5JQ0lgtWY0zpEn_EGedHIZigRn8ao5fqHxI"
} http://localhost:5000/api/v1/auth/update/userDetails
To update a user details
Bearer {{TOKEN}}{
"name": "Rahul devgan",
"email": "rahul@gmail.com"
}curl "http://localhost:5000/api/v1/auth/update/userDetails" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X PUT \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"name":"Rahul devgan",
"email":"rahul@gmail.com"
}' {
"status": "success",
"data": {
"role": "publisher",
"_id": "5efc725516104d0d48f23050",
"name": "Rahul devgan",
"email": "rahul@gmail.com",
"createdAt": "2020-07-01T11:24:05.199Z",
"__v": 0
}
} http://localhost:5000/api/v1/auth/login
To login a user
{
"email": "rahul@gmail.com",
"password": "12345678"
}curl "http://localhost:5000/api/v1/auth/login" \
-H 'Content-Type: application/json' \
-X POST \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"email":"rahul@gmail.com",
"password":"12345678"
}' {
"status": "success",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NDc4MTYsImV4cCI6MTU5NjQzOTgxNn0.DPheu9UvutK7L7GV2eZ9xZSlK9_ievGc54DeDcOLQuQ"
} http://localhost:5000/api/v1/auth/register
To register a user
{
"name": "Aman sah",
"email": "aman@gmail.com",
"role": "user",
"password": "12345678"
}curl "http://localhost:5000/api/v1/auth/register" \
-H 'Content-Type: application/json' \
-X POST \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"name": "Aman sah",
"email": "aman@gmail.com",
"role":"user",
"password": "12345678"
}' {
"status": "success",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZjAwMzcwYWZmM2M5NzE2NGNlOGQ3YjAiLCJpYXQiOjE1OTM4NDk2MTAsImV4cCI6MTU5NjQ0MTYxMH0._tazE7WCxAmImfgrhd5cNAcTNUcysP-z_BlL_TQK-Uk"
} http://localhost:5000/api/v1/course/updateTutionCost/5efeec2ad574a704e098fa56
To update a tution cost to a course.
Bearer {{TOKEN}}{
"newTutionCost": 7000
}curl "http://localhost:5000/api/v1/course/updateTutionCost/5efeec2ad574a704e098fa56" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X PUT \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"newTutionCost":7000
}' {
"status": "success",
"data": {
"scholarhipsAvailable": true,
"_id": "5efeec2ad574a704e098fa56",
"title": "Node js",
"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": 7000,
"minimumSkill": "beginner",
"bootcamp": "5efc735516104d0d48f23053",
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-03T08:28:26.954Z",
"__v": 0
}
} http://localhost:5000/api/v1/course/5ef8d8ee204e3817803ad7f4
To delete a course.
Bearer {{TOKEN}}curl "http://localhost:5000/api/v1/course/5ef8d8ee204e3817803ad7f4" \
-H 'Authorization: Bearer {{TOKEN}}' \
-X DELETE \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' http://localhost:5000/api/v1/course/5efeec2ad574a704e098fa56
To update a course.
Bearer {{TOKEN}}{
"title": "Javascript"
}curl "http://localhost:5000/api/v1/course/5efeec2ad574a704e098fa56" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X PUT \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"title": "Javascript"
}' {
"status": "success",
"data": {
"scholarhipsAvailable": true,
"_id": "5efeec2ad574a704e098fa56",
"title": "Javascript",
"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": 7000,
"minimumSkill": "beginner",
"bootcamp": "5efc735516104d0d48f23053",
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-03T08:28:26.954Z",
"__v": 0
}
} http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/courses
To add a course to a bootcamp
Bearer {{TOKEN}}{
"title": "Node js",
"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": 1000,
"minimumSkill": "beginner",
"scholarhipsAvailable": true
}curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/courses" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X POST \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"title": "Node js",
"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": 1000,
"minimumSkill": "beginner",
"scholarhipsAvailable": true
}' {
"status": "success",
"data": {
"scholarhipsAvailable": true,
"_id": "5efeec2ad574a704e098fa56",
"title": "Node js",
"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": 1000,
"minimumSkill": "beginner",
"bootcamp": "5efc735516104d0d48f23053",
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-03T08:28:26.954Z",
"__v": 0
}
} http://localhost:5000/api/v1/course/5efc738c16104d0d48f23054
To get a single course
curl "http://localhost:5000/api/v1/course/5efc738c16104d0d48f23054" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"data": {
"scholarhipsAvailable": true,
"_id": "5efc738c16104d0d48f23054",
"title": "Devworks Bootcamp",
"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": 13000,
"minimumSkill": "beginner",
"bootcamp": {
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"id": "5efc735516104d0d48f23053"
},
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-01T11:29:16.109Z",
"__v": 0
}
} http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/courses
curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053/courses" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"count": 2,
"data": [
{
"scholarhipsAvailable": true,
"_id": "5efeec2ad574a704e098fa56",
"title": "Node js<script>alert(1)</script>",
"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": 7000,
"minimumSkill": "beginner",
"bootcamp": {
"_id": "5efc735516104d0d48f23053",
"name": "Devworks 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",
"id": "5efc735516104d0d48f23053"
},
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-03T08:28:26.954Z",
"__v": 0
}
]
} http://localhost:5000/api/v1/course/
To get all courses
curl "http://localhost:5000/api/v1/course/" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"count": 2,
"pagination": {},
"data": [
{
"scholarhipsAvailable": true,
"_id": "5efeec2ad574a704e098fa56",
"title": "Node js",
"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": 7000,
"minimumSkill": "beginner",
"bootcamp": {
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"id": "5efc735516104d0d48f23053"
},
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-03T08:28:26.954Z",
"__v": 0
},
{
"scholarhipsAvailable": true,
"_id": "5efc738c16104d0d48f23054",
"title": "Devworks Bootcamp",
"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": 13000,
"minimumSkill": "beginner",
"bootcamp": {
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"id": "5efc735516104d0d48f23053"
},
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-01T11:29:16.109Z",
"__v": 0
}
]
} http://localhost:5000/api/v1/bootcamp/radius/01854/50
To get a bootcamps around your area by using zipcode and radius.
curl "http://localhost:5000/api/v1/bootcamp/radius/01854/50" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' http://localhost:5000/api/v1/bootcamp/5ef8d3f28903270ad480d90b
To delete a bootcamp
Bearer {{TOKEN}}curl "http://localhost:5000/api/v1/bootcamp/5ef8d3f28903270ad480d90b" \
-H 'Authorization: Bearer {{TOKEN}}' \
-X DELETE \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053
To update bootcamp
Bearer {{TOKEN}}{
"name": "Devworks Bootcamp"
}curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X PUT \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"name": "Devworks Bootcamp"
}' {
"status": "success",
"data": {
"name": "Devworks Bootcamp"
}
} http://localhost:5000/api/v1/bootcamp/
To create a bootcamp
Bearer {{TOKEN}}{
"name": "ModrenTech 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
}curl "http://localhost:5000/api/v1/bootcamp/" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X POST \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-d '{
"name": "ModrenTech 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
}' {
"status": "success",
"count": 1,
"pagination": {},
"data": [
{
"location": {
"type": "Point",
"coordinates": [
-71.3235419,
42.6497006
],
"formattedAddress": "UMass Lowell University Police, 220, Pawtucket Street, The Acre, Lowell, Middlesex County, Massachusetts, 01854-5141, United States of America",
"street": "Pawtucket Street",
"city": "Lowell",
"zipcode": "01854-5141",
"country": "US"
},
"careers": [
"Web Development",
"UI/UX",
"Mobile Development"
],
"photo": "no-photo.jpeg",
"housing": false,
"jobAssistance": true,
"jobGaurantee": false,
"acceptGi": true,
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-01T11:28:21.576Z",
"slug": "modrentech-bootcamp",
"__v": 0,
"averageCost": 10000,
"averageRating": 10,
"Courses": [
{
"_id": "5efc738c16104d0d48f23054",
"title": "Devworks Bootcamp",
"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",
"bootcamp": "5efc735516104d0d48f23053"
}
],
"id": "5efc735516104d0d48f23053"
}
]
} http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053
To get a single bootcamp
curl "http://localhost:5000/api/v1/bootcamp/5efc735516104d0d48f23053" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"count": 1,
"pagination": {},
"data": [
{
"location": {
"type": "Point",
"coordinates": [
-71.3235419,
42.6497006
],
"formattedAddress": "UMass Lowell University Police, 220, Pawtucket Street, The Acre, Lowell, Middlesex County, Massachusetts, 01854-5141, United States of America",
"street": "Pawtucket Street",
"city": "Lowell",
"zipcode": "01854-5141",
"country": "US"
},
"careers": [
"Web Development",
"UI/UX",
"Mobile Development"
],
"photo": "no-photo.jpeg",
"housing": false,
"jobAssistance": true,
"jobGaurantee": false,
"acceptGi": true,
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-01T11:28:21.576Z",
"slug": "modrentech-bootcamp",
"__v": 0,
"averageCost": 10000,
"averageRating": 10,
"Courses": [
{
"_id": "5efc738c16104d0d48f23054",
"title": "Devworks Bootcamp",
"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",
"bootcamp": "5efc735516104d0d48f23053"
}
],
"id": "5efc735516104d0d48f23053"
}
]
} http://localhost:5000/api/v1/bootcamp/5d725a1b7b292f5f8ceff788/photo
To add a photo to a bootcamp
Bearer {{TOKEN}}curl "http://localhost:5000/api/v1/bootcamp/5d725a1b7b292f5f8ceff788/photo" \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer {{TOKEN}}' \
-X PUT \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' \
-F 'file=null' {
"status": "success",
"photo": "photo5d725a1b7b292f5f8ceff788.jpg"
} http://localhost:5000/api/v1/bootcamp/
To get all bootcamps
curl "http://localhost:5000/api/v1/bootcamp/" \
-X GET \
-b 'token'='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZWZjNzI1NTE2MTA0ZDBkNDhmMjMwNTAiLCJpYXQiOjE1OTM4NTEyMzUsImV4cCI6MTU5NjQ0MzIzNX0.0P4gTUL7K701Fgmcjmc25wSKzv8DHwsp85vEFllZw7E' {
"status": "success",
"count": 1,
"pagination": {},
"data": [
{
"location": {
"type": "Point",
"coordinates": [
-71.3235419,
42.6497006
],
"formattedAddress": "UMass Lowell University Police, 220, Pawtucket Street, The Acre, Lowell, Middlesex County, Massachusetts, 01854-5141, United States of America",
"street": "Pawtucket Street",
"city": "Lowell",
"zipcode": "01854-5141",
"country": "US"
},
"careers": [
"Web Development",
"UI/UX",
"Mobile Development"
],
"photo": "no-photo.jpeg",
"housing": false,
"jobAssistance": true,
"jobGaurantee": false,
"acceptGi": true,
"_id": "5efc735516104d0d48f23053",
"name": "ModrenTech 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",
"user": "5efc725516104d0d48f23050",
"createdAt": "2020-07-01T11:28:21.576Z",
"slug": "modrentech-bootcamp",
"__v": 0,
"averageCost": 10000,
"averageRating": 10,
"Courses": [
{
"_id": "5efc738c16104d0d48f23054",
"title": "Devworks Bootcamp",
"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",
"bootcamp": "5efc735516104d0d48f23053"
},
],
"id": "5efc735516104d0d48f23053"
}
]
}