Backend API for dev_api application to manage bootcamps, courses, reviews, users and authentication
Routes for User Authentication including register, login, reset password, etc.
Route to generate reset password token and mail it.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Get current logged in user via token
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Route to login a user
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Clear token cookie and logout.
Add user to database with encrypted password
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Route to reset the password using the password reset token mailed to user’s email.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Update logged in user name and email
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
update the password of logged in user. Send in the body currentPassword and newPassword.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Bootcamps CRUD funtionality
Add new bootcamp to database. Must be authenticated and must be publisher or admin
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
delete bootcamp from database. Select by id
Fetch all bootcamps from database. Includes pagination filtering, etc
Get bootcamps within a radius of a specific zipcode.
Get single bootcamp by id
Update a bootcamp in database. Select by id
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
To upload/update a photo for the bootcamp using the id
Create, read, update and delete courses
Add new course to database. Must be authenticated and must be publisher or admin
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
delete course from database. Select by id
Get all courses in database
Get specific courses for a bootcamp
Get a single course by id
Update a course in database. Select by id
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Manage course reviews.
Insert review for a specific bootcamp. Only one review per user is allowed.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Delete a review by id. Only the owner of the review and admin can delete.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Get all reviews from Database and populate with bootcamp name and description.
Get reviews for a specific bootcamp
Fetch a single review from bootcamp by id and populate it with bootcamp name and description.
update a review by id. Only the owner of the review and admin can update.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
CRUD funtionality for users only available to admin.
Add a new user to database. You must be an admin.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |
Delete a user by id. You must be an admin.
Fetch all bootcamps from database. You must be an admin.
Get single user by id. You must be an admin.
Update a user by id. You must be an admin.
Key | Value | Description |
---|---|---|
Content-Type | application/json | JSON Type |