Backend Routes - saipat/Eton GitHub Wiki

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • POST /api/users - Sign up new users

session

  • POST /api/session - Log in
  • DLETE /api/session - Log out

notes

  • GET /api/notes - Returns a list of all notes created by the user
  • GET /api/notes/:id - Will return the specific note by id
  • GET /api/tags/:tag_id/notes - Will return notes for the specific tag_id
  • GET /api/notebooks/:notebook_id/notes - Will return notes for the specific notebook_id
  • POST /api/notes/new - Creates a new note
  • PATCH /api/notes/:id - Edits the specified note
  • DELETE /api/notes/:id - Deletes the specified note

notebooks

  • GET /api/notebooks - Returns a list of all notebooks created by the user and the count of notes
  • POST /api/notebooks - Creates a new notebook
  • PATCH /api/notebooks/:id - Edits the specified notebook(Rename the notebook)
  • DELETE /api/notebooks/:id - Deletes the specified notebook and its associated notes

tags

  • GET /api/tags - Return all tags created by the user in the alphabetical order and its count
  • DELETE /api/tags/:id - Deletes a tag

(As users cannot edit a tag in Evernote, I am not adding the edit(PATCH) route for tags.)