Notes App
Notes App is a note-taking application to create notes similar to Google Keep. You can add your tags, edit, archive and delete your notes!
Auth Routes#
In Notes App, the authentication is done with email and password credential fields.
You can refer documentation related to Authentication here
Profile Routes#
The following Route is related to profile user . This are Privately accessible route.
1. GET /api/user#
Request URL:
/api/userHTTP Method: GET
Request Headers:
authorization: encodedTokenResponse Body:
{ data: { user: Object; }}Functionality: This API call gets all user's data from the db.
Notes Routes#
The following Routes are relating to Notes. These are Privately accessible routes.
1. GET /api/notes#
Request URL:
/api/notesHTTP Method: GET
Request Headers:
authorization: encodedTokenResponse Body:
{ data: { notes: Array; }}Functionality: This API call gets all notes of the user from the db.
2. POST /api/notes#
Request URL:
/api/notesHTTP Method: POST
Request Headers:
authorization: encodedTokenRequest Body:
{ note;}Response Body:
{ data: { notes: Array; }}Functionality: This API call creates a new note for the user in the db.
3. POST /api/notes/:notesId#
Request URL:
/api/notes/:notesIdHTTP Method: POST
Request Headers:
authorization: encodedTokenRequest Body:
{ note;}Response Body:
{ data: { notes: Array; }}Functionality: This API call updates a note for the user in the db.
4. DELETE /api/notes/:notesId#
Request URL:
/api/notes/:notesIdHTTP Method: DELETE
Request Headers:
authorization: encodedTokenResponse Body:
{ data: { notes: Array; }}Functionality: This API deletes a note for the user in the db.
Archive Routes#
1. GET /api/archives#
Request URL:
/api/archivesHTTP Method: GET
Request Headers:
authorization: encodedTokenResponse Body:
{ data: { archives: Array; }}Functionality: This API call gets all archived notes of the user from the db.
2. POST /api/notes/archives/:noteId#
Request URL:
/api/notes/archives/:noteIdHTTP Method: POST
Request Headers:
authorization: encodedTokenRequest Body:
{ note;}Response Body:
{ data: { notes: Array, archives: Array }}Functionality: This API call adds a note for the user's archives in the db.
3. POST /api/archives/restore/:noteId#
Request URL:
/api/archives/restore/:noteIdHTTP Method: POST
Request Headers:
authorization: encodedTokenRequest Body: {}
Response Body:
{ data: { notes: Array, archives: Array }}Functionality: This API call restores a note for the user's archives in the db.
3. DELETE /api/archives/delete/:noteId#
Request URL:
/api/archives/delete/:noteIdHTTP Method: DELETE
Request Headers:
authorization: encodedTokenResponse Body:
{ data: { archives: Array; }}Functionality: This API call restores a note for the user's archives in the db.
Trash Routes#
1. GET /api/trash#
Request URL:
/api/trashHTTP Method: GET
Request Headers:
authorization: encodedTokenResponse Body:
{ data: { trash: Array; }}Functionality: This API call gets all trashed notes of the user from the db.
2. POST /notes/trash/:noteId#
Request URL:
/api/trash/:noteIdHTTP Method: POST
Request Headers:
authorization: encodedTokenRequest Body: {}
Response Body:
{ data: { notes: Array, trash: Array }}Functionality: This API call adds a note for the user's trashed in the db.
3. POST /api/trash/restore/:noteId#
Request URL:
/api/trash/restore/:noteIdHTTP Method: POST
Request Headers:
authorization: encodedTokenRequest Body: {}
Response Body:
{ data: { notes: Array, trash: Array }}Functionality: This API call restores a note for the user's trashed in the db.
3. DELETE /api/trash/delete/:noteId#
Request URL:
/api/trash/delete/:noteIdHTTP Method: DELETE
Request Headers:
authorization: encodedTokenResponse Body:
{ data: { trash: Array; }}Functionality: This API call restores a note for the user's trashed in the db.