POST api/surveys/{survey}/questions
Creates a new empty survey question in a given survey with the given information
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| survey |
Survey ID |
integer |
Required |
Body Parameters
Question data of new question
SurveyQuestionNewDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| Question |
Question title/text |
string |
Required String length: inclusive between 0 and 250 |
| HelpText |
Question help text |
string |
String length: inclusive between 0 and 500 |
| Type |
Question type |
QuestionType |
Required Range: inclusive between 0 and 6 |
| Required |
Whether the question is mandatory |
boolean |
Required |
| Commentable |
Whether a comment can be left along with the answer |
boolean |
Required |
| Order |
Question order index in survey |
integer |
None. |
Request Formats
application/json, text/json
{
"Question": "sample string 1",
"HelpText": "sample string 2",
"Type": 0,
"Required": true,
"Commentable": true,
"Order": 1
}
Response Information
Resource Description
Summary of created question
SurveyQuestionDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| Survey |
ID of parent Survey |
integer |
None. |
| ID |
Question ID |
integer |
Required |
| Question |
Question title/text |
string |
Required String length: inclusive between 0 and 250 |
| HelpText |
Question help text |
string |
String length: inclusive between 0 and 500 |
| Type |
Question type |
QuestionType |
Required Range: inclusive between 0 and 6 |
| Required |
Whether the question is mandatory |
boolean |
Required |
| Commentable |
Whether a comment can be left along with the answer |
boolean |
Required |
| Order |
Question order index in survey |
integer |
None. |
Response Formats
application/json, text/json
{
"Survey": 1,
"ID": 2,
"Question": "sample string 3",
"HelpText": "sample string 4",
"Type": 0,
"Required": true,
"Commentable": true,
"Order": 1
}