Skip to content

Backend Routes

Deborah Wei edited this page Aug 5, 2022 · 3 revisions

Backend Routes

HTML

  • GET / - StaticPagesController#root

API Endpoints

users

  • GET /api/users/:id - renders the show page (in json) with information about the user's profile (i.e. boards, following count, saved pins)
  • POST /api/users - create a new user
  • PATCH /api/users/:id - edit current user profile

session

  • POST /api/session - create a new session (log in)
  • DELETE /api/session - delete current session (log out)

pins

  • GET /api/pins/:id - render show information for a specific pin
  • POST /api/pins - create a new pin
  • PATCH /api/pins/:id - update a specific pin
  • DELETE /api/pins/:id - delete a specific pin

boards

  • GET /api/boards/:id - render show information for a specific board
  • POST /api/boards - create a new board
  • PATCH /api/boards/:id - update a specific board
  • DELETE /api/boards/:id - delete a specific board

comments

  • POST /api/comments - create a new comment
  • PATCH /api/comments/:id - update a specific comment
  • DELETE /api/comments/:id - delete a specific comment

Clone this wiki locally