POST api/cases/{caseId}/questions/{questionId}/answers

Add an answer to this Question. Method will fail if an answer already exists when multiple answers are not allowed

Request Information

URI Parameters

NameDescriptionTypeAdditional information
caseId

globally unique identifier

Required

questionId

globally unique identifier

Required

Body Parameters

AnswerDetail
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

QuestionId

globally unique identifier

None.

ChoiceId

globally unique identifier

None.

Text

string

None.

ContextualText

string

None.

OrderIndex

integer

None.

SubQuestions

Collection of QuestionDetail

None.

Request Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: Self referencing loop detected with type 'XCapture.DTO.AnswerDetail'. Path 'SubQuestions[0].Answers'.

text/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: Self referencing loop detected with type 'XCapture.DTO.AnswerDetail'. Path 'SubQuestions[0].Answers'.

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[XCapture.DTO.AnswerDetail, XCapture.DTO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[XCapture.DTO.AnswerDetail, XCapture.DTO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.

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 'AnswerDetail'.

Response Information

Resource Description

AnswerWithEffects
NameDescriptionTypeAdditional information
Answer

AnswerDetail

None.

AddedSections

Collection of SectionSimple

None.

RemovedSections

Collection of SectionSimple

None.

AddedQuestions

Collection of QuestionSimple

None.

RemovedQuestions

Collection of QuestionSimple

None.

Response Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: Self referencing loop detected with type 'XCapture.DTO.AnswerDetail'. Path 'Answer.SubQuestions[0].Answers'.

text/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: Self referencing loop detected with type 'XCapture.DTO.AnswerDetail'. Path 'Answer.SubQuestions[0].Answers'.

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'XCapture.DTO.QuestionDetail' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'XCapture.DTO.QuestionDetail' contains cycles and cannot be serialized if reference tracking is disabled.