This a backend server of a Web application that allows CRUD operations on a database. The database used is MongoDB. Create and READ can be done through the browser, but delete and update should be done through POSTMAN. This is because the HTML code is not written to execute these commands in the browser.
GET '/All-Users'
Returns a List of all the Registered Users in the MongoDb table.
POST /sign-up
Parameter | Type | Description |
---|---|---|
email |
string |
Required.valid email |
firstName |
string |
Required. User name |
The API saves user in a local MongoDb table. Passwords are not saved. The user enters details through a form.
PATCH /update/<id>
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. A valid ID |
email |
string |
Required.valid email |
firstName |
string |
Required. User name |
Updates user info if ID is valid otherwise if not prints a response that "Nothing is updated".
DELETE /delete/<id>
Parameter | Type | Description |
---|---|---|
id |
integer |
Required. A valid ID |
email |
string |
Required.valid email |
firstName |
string |
Required. User name |
Deletes user info if ID is valid otherwise if not prints a response that "User not deleted".
Python , Flask , API design , HTML