Skip to content

Question Rest Service

Karthik Sankar Ram edited this page Mar 9, 2017 · 8 revisions

#Question Rest Service

##Add new question to database

endpoint: "question"
Takes a question object as input and persists it to the database. Returns the saved object if successful. Fields are:
questionId: Should be set as null, will be filled when added to database.
format: The format ID for the question which is a number from 1 to 4 as follows:

  • 1 = Multiple Choice
  • 2 = Multiple Select
  • 3 = Drag and Drop
  • 4 = Code Snippet

questionCategory: It is a set of one or more category objects to which the question belongs eg: a question could be both Java and Data Structures.
###Category JSON categoryId: The unique identifier of the category in the database
categoryName: The name of the category

questionText: It is a string that is only the question, not the options.
questionTags: Not used currently, meant for future functionality. Set to null always.
option: A set of Option objects, each of them meant for one of the options of the question. ###Option JSON ****:

Clone this wiki locally