Skip to content

CRUD REST APIs for Blogging website using Spring Boot, MongoDB, JWT Tokens

License

Notifications You must be signed in to change notification settings

hv-ojha/Blogs-CRUD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cubereum Assignment

Create RESTful API for Basic CRUD operation on Users and Blogs of user.

Technologies used

  • Maven
  • MongoDB
  • Spring Boot
  • Lombok
  • JWT

APIs created

User

URL Method Output Remarks Fields
http://localhost:8080/user/register POST User Object Registered User name , email , password
http://localhost:8080/user/login POST User Object with API Token LogIn user and Send authentication token to request APIs email , password
http://localhost:8080/user/{email} GET Requested User Object of given Email Sends details of requested user of given Email email
http://localhost:8080/user/update PUT Updated User Object Update the loggedin user and check whether the details updated are of same user or not (Requires Authentication with Bearer Token) name, email , password
http://localhost:8080/user/ GET List of all registered User Returns all the registered user

Blogs

URL Method Output Remarks Fields
http://localhost:8080/blog/add POST Blog Object Adds Blog (Requires Authentication with Bearer Token) title , blogDetails
http://localhost:8080/blog/delete/{id} DELETE Returns Boolean if blog is deleted or not Delete the blog and check whether it is from same user or not (Requires Authentication with Bearer Token) id
http://localhost:8080/blog/{id} GET Requested Blog Object of given ID Sends details of requested blog of given Id id
http://localhost:8080/blog/update PUT Updated Blog Object Update the blog and check whether the details updated are of same user or not (Requires Authentication with Bearer Token) title , blogDetails
http://localhost:8080/blog/ GET List of all Blogs Returns all the blogs with particular user

About

CRUD REST APIs for Blogging website using Spring Boot, MongoDB, JWT Tokens

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages