Skip to content

API Documentation

Kglines edited this page Nov 4, 2022 · 4 revisions

/user/login

  • POST credentials for authentication

/user/signup

  • POST create new user

/user/logout

  • DELETE user session

/user/questions

  • GET my questions

Response Code: 200

{"Questions": 
> > [{
id: 1,
userId: 1,
title: "Sample Title",
body: "Sample Body",
created_on:  2022-12-12, 
last_update_on: 2022-12-12
},
{
id: 2,
userId: 1,
title: "Sample Title",
body: "Sample Body",
created_on:  2022-12-12, 
last_update_on: 2022-12-12
}
]
}

/user/answers

  • GET my answers

/questions

  • GET all questions
  • POST a new question

/questions/questionId

  • GET a specific question and it's associated answers, cumulative votes, and comments
  • PUT to update a specific question
  • DELETE a specific question

/answers

  • POST a new answer

/answers/answerId

  • PUT to update a specific answer
  • DELETE a specific answer

/comments

  • POST a new comment

/comments/commentId

  • PUT to update a specific comment
  • DELETE a specific comment

/answers/answerId/votes

  • POST a vote direction for a specific user on a specific answer

Clone this wiki locally