POST api/StudentTest/SaveTest

Request Information

URI Parameters

None.

Body Parameters

StudentQuizAnswer
NameDescriptionTypeAdditional information
QuizId

integer

None.

StudentId

string

None.

Score

integer

None.

Answers

Collection of StudentQuizAnswerDetails

None.

Request Formats

application/json, text/json

Sample:
{
  "QuizId": 1,
  "StudentId": "sample string 2",
  "Score": 3,
  "Answers": [
    {
      "QuestionId": 1,
      "OptionIndex": 2,
      "IsCorrect": true
    },
    {
      "QuestionId": 1,
      "OptionIndex": 2,
      "IsCorrect": true
    }
  ]
}

text/html

Sample:
{"QuizId":1,"StudentId":"sample string 2","Score":3,"Answers":[{"QuestionId":1,"OptionIndex":2,"IsCorrect":true},{"QuestionId":1,"OptionIndex":2,"IsCorrect":true}]}

application/xml, text/xml

Sample:
<StudentTestModel.StudentQuizAnswer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SmartInstituteSoftware.Models">
  <Answers>
    <StudentTestModel.StudentQuizAnswerDetails>
      <IsCorrect>true</IsCorrect>
      <OptionIndex>2</OptionIndex>
      <QuestionId>1</QuestionId>
    </StudentTestModel.StudentQuizAnswerDetails>
    <StudentTestModel.StudentQuizAnswerDetails>
      <IsCorrect>true</IsCorrect>
      <OptionIndex>2</OptionIndex>
      <QuestionId>1</QuestionId>
    </StudentTestModel.StudentQuizAnswerDetails>
  </Answers>
  <QuizId>1</QuizId>
  <Score>3</Score>
  <StudentId>sample string 2</StudentId>
</StudentTestModel.StudentQuizAnswer>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'StudentQuizAnswer'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, text/html, application/xml, text/xml

Sample:

Sample not available.