POST api/AdminSurveyQuestion/Post
Creates a new SurveyQuestion question AND creates the associated SurveyQuestionChoices.
Request Information
URI Parameters
None.
Body Parameters
PostSurveyQuestionDto| Name | Description | Type | Additional information |
|---|---|---|---|
| SurveyId | integer |
Required |
|
| Name | string |
Required |
|
| PostSurveyQuestionChoicesDto | Collection of PostSurveyQuestionChoiceDto |
Required |
Request Formats
application/json, text/json
Sample:
{
"SurveyId": 1,
"Name": "sample string 2",
"PostSurveyQuestionChoicesDto": [
{
"Name": "sample string 1",
"DisplayName": "sample string 2",
"Value": 3
},
{
"Name": "sample string 1",
"DisplayName": "sample string 2",
"Value": 3
}
]
}
application/xml, text/xml
Sample:
<PostSurveyQuestionDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/StudyTree.Common.Dtos.SurveyNs">
<Name>sample string 2</Name>
<PostSurveyQuestionChoicesDto>
<PostSurveyQuestionChoiceDto>
<DisplayName>sample string 2</DisplayName>
<Name>sample string 1</Name>
<Value>3</Value>
</PostSurveyQuestionChoiceDto>
<PostSurveyQuestionChoiceDto>
<DisplayName>sample string 2</DisplayName>
<Name>sample string 1</Name>
<Value>3</Value>
</PostSurveyQuestionChoiceDto>
</PostSurveyQuestionChoicesDto>
<SurveyId>1</SurveyId>
</PostSurveyQuestionDto>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
HttpResponseMessage| Name | Description | Type | Additional information |
|---|---|---|---|
| Version | Version |
None. |
|
| Content | HttpContent |
None. |
|
| StatusCode | HttpStatusCode |
None. |
|
| ReasonPhrase | string |
None. |
|
| Headers | Collection of Object |
None. |
|
| RequestMessage | HttpRequestMessage |
None. |
|
| IsSuccessStatusCode | boolean |
None. |