Skip to content

backend routes

Darian Chen edited this page Oct 5, 2022 · 1 revision

Backend Routes

HTML

  • GET / - StaticPagesController#root

API Endpoints

users

  • GET /api/users - returns the user information of displayed listing and for the User Search feature
  • POST /api/users - sign up session
  • POST /api/session - log in
  • DELETE /api/session - log out

questions

  • GET /api/questions - returns all questions
  • GET /api/questions/:id - return question
  • POST /api/questions - create question
  • PATCH /api/questions/:id - update question
  • DELETE /api/questions/:id - delete question

answers

  • POST /api/answers - create answer
  • PATCH /api/answers/:id - update answer
  • DELETE /api/answers/:id - delete answer

comments

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

votes

  • POST /api/votes - create vote
  • DELETE /api/votes/:id - delete vote

tags

  • POST /api/tags - create tag
  • DELETE /api/tags/:id - delete tag
Clone this wiki locally