Skip to content

backend routes

Dan edited this page Jan 6, 2020 · 2 revisions

Backend Routes

HTML

  • GET / StaticPagesController#root

API Endpoints

users

  • GET /api/users - returns the user information for the profile
  • POST /api/users - sign up

session

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

pictures

  • GET /api/pictures - returns relevant pictures (filtered by data/params)
  • GET /api/pictures/:id - returns category

boards

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

categories

  • GET /api/categories - returns relevant categories (filtered by data/params)
  • GET /api/categories/:id - returns category

favorites

  • POST /api/pictures/:picture_id/favorites - favorite a picture
  • DELETE /api/pictures/:picture_id/favorites - unfavorite a picture

follows

  • POST /api/categories/:category_id/follows- follow a category
  • DELETE /api/categories/:category_id/follows - unfollow a category

Clone this wiki locally