Skip to content

backend routes

yangc95 edited this page Mar 17, 2021 · 5 revisions

Backend Routes

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • GET /api/users - returns user info of pins, boards, and follows for a User
  • POST /api/users - sign up

session

  • GET /api/session - log in
  • POST /api/session - log out

pins

  • GET /api/pins - returns relevant pins (filtered by data/params)
  • GET /api/pins/:id - returns a pin
  • POST /api/pins - creates a pin
  • PATCH /api/pins/:id - edit a pin
  • DELETE /api/pins/:id - remove a pin

boards

  • GET /api/boards - returns user boards
  • GET /api/boards/:id - returns a board with pins
  • POST /api/boards - creates a board
  • PATCH /api/boards/:id - edit a board
  • DELETE /api/boards/:id - remove a board

follows

  • POST /api/follows - creates a follow
  • DELETE /api/follows/:id - remove a follow
Clone this wiki locally