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 RoutesIn Notes App
, the authentication is done with email
and password
credential fields.
You can refer documentation related to Authentication here
#
Profile RoutesThe following Route is related to profile user . This are Privately accessible route.
/api/user
#
1. GET Request URL:
/api/user
HTTP Method: GET
Request Headers:
authorization: encodedToken
Response Body:
{ data: { user: Object; }}
Functionality: This API call gets all user's data from the db.
#
Notes RoutesThe following Routes are relating to Notes. These are Privately accessible routes.
/api/notes
#
1. GET Request URL:
/api/notes
HTTP Method: GET
Request Headers:
authorization: encodedToken
Response Body:
{ data: { notes: Array; }}
Functionality: This API call gets all notes of the user from the db.
/api/notes
#
2. POST Request URL:
/api/notes
HTTP Method: POST
Request Headers:
authorization: encodedToken
Request Body:
{ note;}
Response Body:
{ data: { notes: Array; }}
Functionality: This API call creates a new note for the user in the db.
/api/notes/:notesId
#
3. POST Request URL:
/api/notes/:notesId
HTTP Method: POST
Request Headers:
authorization: encodedToken
Request Body:
{ note;}
Response Body:
{ data: { notes: Array; }}
Functionality: This API call updates a note for the user in the db.
/api/notes/:notesId
#
4. DELETE Request URL:
/api/notes/:notesId
HTTP Method: DELETE
Request Headers:
authorization: encodedToken
Response Body:
{ data: { notes: Array; }}
Functionality: This API deletes a note for the user in the db.
#
Archive Routes/api/archives
#
1. GET Request URL:
/api/archives
HTTP Method: GET
Request Headers:
authorization: encodedToken
Response Body:
{ data: { archives: Array; }}
Functionality: This API call gets all archived notes of the user from the db.
/api/notes/archives/:noteId
#
2. POST Request URL:
/api/notes/archives/:noteId
HTTP Method: POST
Request Headers:
authorization: encodedToken
Request Body:
{ note;}
Response Body:
{ data: { notes: Array, archives: Array }}
Functionality: This API call adds a note for the user's archives in the db.
/api/archives/restore/:noteId
#
3. POST Request URL:
/api/archives/restore/:noteId
HTTP Method: POST
Request Headers:
authorization: encodedToken
Request Body: {}
Response Body:
{ data: { notes: Array, archives: Array }}
Functionality: This API call restores a note for the user's archives in the db.
/api/archives/delete/:noteId
#
3. DELETE Request URL:
/api/archives/delete/:noteId
HTTP Method: DELETE
Request Headers:
authorization: encodedToken
Response Body:
{ data: { archives: Array; }}
Functionality: This API call restores a note for the user's archives in the db.
#
Trash Routes/api/trash
#
1. GET Request URL:
/api/trash
HTTP Method: GET
Request Headers:
authorization: encodedToken
Response Body:
{ data: { trash: Array; }}
Functionality: This API call gets all trashed notes of the user from the db.
/notes/trash/:noteId
#
2. POST Request URL:
/api/trash/:noteId
HTTP Method: POST
Request Headers:
authorization: encodedToken
Request Body: {}
Response Body:
{ data: { notes: Array, trash: Array }}
Functionality: This API call adds a note for the user's trashed in the db.
/api/trash/restore/:noteId
#
3. POST Request URL:
/api/trash/restore/:noteId
HTTP Method: POST
Request Headers:
authorization: encodedToken
Request Body: {}
Response Body:
{ data: { notes: Array, trash: Array }}
Functionality: This API call restores a note for the user's trashed in the db.
/api/trash/delete/:noteId
#
3. DELETE Request URL:
/api/trash/delete/:noteId
HTTP Method: DELETE
Request Headers:
authorization: encodedToken
Response Body:
{ data: { trash: Array; }}
Functionality: This API call restores a note for the user's trashed in the db.