/question
getAllQuestion [GET]
/allquestions/{id}
public ResponseEntity<List<Question>> getAllQuestion()getQuestionById [GET]
/{id}
public ResponseEntity<Optional<Question>> getQuestionById(@PathVariable Integer id)getQuestionsByCategory [GET]
/category/{categoryName}
public ResponseEntity<List<Question>> getQuestionsByCategory(@PathVariable String categoryName)addQuestion [POST]
/add
public ResponseEntity<String> addQuestion(@RequestBody Question question)updateQuestion [PUT]
/update/{id}
public ResponseEntity<Question> updateQuestion(@RequestBody Question question, @PathVariable Integer id)deleteQuestion [DELETE]
/delete/{id}
public ResponseEntity<String> deleteQuestion(@PathVariable Integer id)getQuestionsForQuiz [GET]
/generate?category=<String>&noOfQuestions=<Integer>
public ResponseEntity<List<Integer>> getQuestionsForQuiz(@RequestParam String category,
@RequestParam Integer noOfQuestions)getQuestionsWithoutAnswers [POST]
/getQuestions
public ResponseEntity<List<QuestionWrapper>> getQuestionsWithoutAnswers(@RequestBody List<Integer> questionsIds)getScore [POST]
/getScore
public ResponseEntity<Integer> getScore(@RequestBody List<Response> responses)/quiz
createQuiz [POST]
/create
public ResponseEntity<String> createQuiz(@RequestBody QuizDto quizDto)getAllQuiz [GET]
/all
public ResponseEntity<List<Quiz>> getAllQuiz()getQuizQuestionsById [GET]
/{id}
public ResponseEntity<List<QuestionWrapper>> getQuizQuestionsById(@PathVariable Integer id)submitQuiz [POST]
/submit/{id}
public ResponseEntity<Integer> submitQuiz(@PathVariable Integer id,@RequestBody List<Response> responses)