/Flask-Rest-Api

Simple Flask Rest API with MongoDB Database to Add, Update, Delete Users

Primary LanguagePython

Flask-Rest-Api (Flask and MongoDB)

Routes

  • GET /users - Returns a list of all users.
  • GET /users/ - Returns the user with the specified ID.
  • POST /users - Creates a new user with the specified data. (Query Parameters: username, email, password)
  • PUT /users/ - Updates the user with the specified ID with the new data. (Query Parameters: username, email, password)
  • DELETE /users/ - Deletes the user with the specified ID.

The User resource have the following fields:

  • id (a unique identifier for the user)
  • name
  • email
  • password

Run the Below Command to Start the Application

docker-compose up

Testing

POST /users - Adding User image image

GET /users - Returns All Users image

GET /users/ - Returns the user with the specified ID. image

PUT /users/ - Updates the user image image

DELETE /users/ - Deletes the user image image