base url: https://blogs-api-brainiac5l0th.vercel.app/api/v1/users
Here is the list of all endpoints and method for the users:
Method | endpoint | logInRequired | purpose |
---|---|---|---|
GET | / |
false | READ all users |
GET | /:id |
false | READ specific user by id |
POST | / |
false | CREATE a user |
PATCH | /:id |
true | UPDATE user information |
DELETE | /:id |
true | DELETE user from database |
base url: https://blogs-api-brainiac5l0th.vercel.app/api/v1/blogs
Here is the list of all endpoints and method for the blogs:
Method | endpoint | logInRequired | purpose |
---|---|---|---|
GET | / |
false | READ all blogs |
GET | /:id |
false | READ specific blog by id |
GET | /user/:userId |
false | READ blogs by specific user |
POST | / |
true | CREATE a blog |
PATCH | /:id |
true | UPDATE blog informations |
PATCH | /report/:id |
true (admin) | UPDATE blog status |
DELETE | /:id |
true | DELETE blog from database |
Note: patch method on '/report/:id' is for admin only. It will send a mail to the author of the blog and will change blog status to draft
automatically.
base url: https://blogs-api-brainiac5l0th.vercel.app/api/v1/tags
Here is the list of all endpoints and method for the tags:
Method | endpoint | logInRequired | purpose |
---|---|---|---|
GET | / |
false | READ all tags |
POST | / |
true (anyone) | CREATE a blog |
PATCH | /:tagTitle |
true (admin) | UPDATE tag title |
DELETE | /:tagTitle |
true (admin) | DELETE tag by it's title |
base url: https://blogs-api-brainiac5l0th.vercel.app/api/v1/likes
Here is the list of all endpoints and method for the likes:
Method | endpoint | logInRequired | purpose |
---|---|---|---|
GET | /:blogId |
true | READ all persons who liked blog |
POST | /:blogId/:status |
true | CREATE either like or remove like |
base url: https://blogs-api-brainiac5l0th.vercel.app/api/v1/comments
Here is the list of all endpoints and method for the comments:
Method | endpoint | logInRequired | purpose |
---|---|---|---|
GET | /:blogId |
false | READ all comments against blog id |
POST | /:blogId |
true | CREATE a comment |
PATCH | /:blogId/:commentId |
true | UPDATE comment |
DELETE | /:blogId/:commentId |
true | DELETE comment |