-
Method:
POST
-
URL:
http://localhost:5000/register
-
Request:
- JSON Body:
{ "name": "Name", "email": "[email protected]", "password": "password" }
- JSON Body:
-
Response: A new user account will be created.
-
Method:
POST
-
URL:
http://localhost:5000/login
-
Request:
- JSON Body:
{ "email": "[email protected]", "password": "password" }
- JSON Body:
-
Response: A
JWT
authentication token will be returned.
-
Method:
GET
-
URL:
http://localhost:5000/notes/
-
Authorization:
- Bearer Token:
<TOKEN>
- Use the token granted after logging in.
- Bearer Token:
-
Response: A list of all the notes for the authenticated user.
-
Method:
POST
-
URL:
http://localhost:5000/notes/
-
Authorization:
- Bearer Token:
<TOKEN>
- JSON Body:
{ "content": "this note for test" }
- Bearer Token:
-
Response: The new note will be added to the system.
-
Method:
PUT
-
URL:
http://localhost:5000/notes/{id}
-
Authorization:
- Bearer Token:
<TOKEN>
- JSON Body:
{ "content": "this note is update" }
- Bearer Token:
-
Response: The note will be updated based on the provided
noteId
.
-
Method:
DELETE
-
URL:
http://localhost:5000/notes/{id}
-
Authorization:
- Bearer Token:
<TOKEN>
- Bearer Token:
-
Response: The note with the specified
noteId
will be deleted.
- Authorization: All requests require sending the authentication token in the
Authorization
header asBearer <TOKEN>
.