PUT api/cases/{caseId}/questions/{questionId}/answers/replace

Replace any answers to this question with the answers provided Will update matching answers (by Id) Will add new answers Will delete answers currently saved for question but not in the provided answers list

Request Information

URI Parameters

NameDescriptionTypeAdditional information
caseId

The case to modify

globally unique identifier

Required

questionId

The question to modify

globally unique identifier

Required

Body Parameters

QuestionDetail
NameDescriptionTypeAdditional information
HelpText

string

None.

Type

string

None.

Choices

Collection of ChoiceSimple

None.

ParentQuestionId

globally unique identifier

None.

ParentChoiceId

globally unique identifier

None.

ParentAnswerId

globally unique identifier

None.

Answers

Collection of AnswerDetail

None.

SubQuestions

Collection of QuestionDetail

None.

Template

string

None.

UseUpdateTemplate

boolean

None.

Validation

string

None.

Formatting

string

None.

Required

boolean

None.

Id

globally unique identifier

None.

CaseSectionId

globally unique identifier

None.

Text

string

None.

OrderIndex

integer

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.QuestionDetail'. Path 'Answers[0].SubQuestions'.

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.QuestionDetail'. Path 'Answers[0].SubQuestions'.

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.QuestionDetail, 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.QuestionDetail, 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 'QuestionDetail'.

Response Information

Resource Description

Collection of 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 '[0].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 '[0].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 'System.Collections.Generic.List`1[[XCapture.DTO.QuestionDetail, 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.QuestionDetail, XCapture.DTO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.