Skip to content

API Documentation

Kristy Zhang edited this page Sep 17, 2021 · 8 revisions

API routes for dynamic features:

Questions

  • add questions: POST /questions
  • update a question: PUT /questions/:id
  • delete a question: DELETE /questions/:id
  • search question: POST /questions/search (return json data)

Answers

  • answer a question: POST /questions/:questionId/answers
  • update an answer: PUT /answers/:id"
  • delete an answer: DELETE /answers/:id

Comments

  • comments on an answer: POST /answers/:answerId/comments
  • update comments on an answer: PUT /comments/:id
  • delete comments on an answer: DELETE /comments/:id

Upvote

  • upvote on a question: POST /question/:questionId/votes

  • delete upvote on a question: DELETE /question/:questionId/votes

  • upvote on a comment: POST /comment/:commentId/votes

  • delete upvote on a comment: DELETE /comment/:commentId/votes

Clone this wiki locally