POST SurveyData/SurveyInfo
Create a Survey with combined metadata
Request Information
URI Parameters
None.
Body Parameters
The Survey Info object, containing the Survey Definition and related Questions to be added.
Smg.RestApi.Model.SurveyData.SurveyInfoEncapsulates the definition of a survey, including the Survey Definition and it's related questions.
Request Formats
application/json, text/json
Sample:
{ "SurveyDefinition": { "Id": "1", "Name": "Satisfaction", "Description": "Basic satisfaction survey.", "Created": null, "QuestionIds": [ "5", "3", "7" ], "GeneratedId": null }, "Questions": [ { "Id": "5", "Name": "OverallSatisfaction", "Category": null, "Created": null, "IsNumericResponse": false, "IsTextResponse": false, "IsDateResponse": false, "IsChoiceResponse": true, "Choices": [ { "Id": "1", "Name": "Dissatisfied", "Value": 1, "IsTopValue": false, "IsBottomValue": true }, { "Id": "2", "Name": "SomewhatDissatisfied", "Value": 2, "IsTopValue": false, "IsBottomValue": false }, { "Id": "3", "Name": "Neutral", "Value": 3, "IsTopValue": false, "IsBottomValue": false }, { "Id": "4", "Name": "SomewhatSatisfied", "Value": 4, "IsTopValue": false, "IsBottomValue": false }, { "Id": "5", "Name": "Satisfied", "Value": 5, "IsTopValue": true, "IsBottomValue": false } ], "GeneratedId": null }, { "Id": "3", "Name": "Comments", "Category": null, "Created": null, "IsNumericResponse": false, "IsTextResponse": true, "IsDateResponse": false, "IsChoiceResponse": false, "Choices": [], "GeneratedId": null }, { "Id": "7", "Name": "AmountSpent", "Category": null, "Created": null, "IsNumericResponse": true, "IsTextResponse": false, "IsDateResponse": false, "IsChoiceResponse": false, "Choices": [], "GeneratedId": null } ] }
application/xml, text/xml
Sample:
<SurveyInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Smg.RestApi.Model.SurveyData"> <Questions> <Question> <Category i:nil="true" /> <Choices> <QuestionChoice> <Id>1</Id> <IsBottomValue>true</IsBottomValue> <IsTopValue>false</IsTopValue> <Name>Dissatisfied</Name> <Value>1</Value> </QuestionChoice> <QuestionChoice> <Id>2</Id> <IsBottomValue>false</IsBottomValue> <IsTopValue>false</IsTopValue> <Name>SomewhatDissatisfied</Name> <Value>2</Value> </QuestionChoice> <QuestionChoice> <Id>3</Id> <IsBottomValue>false</IsBottomValue> <IsTopValue>false</IsTopValue> <Name>Neutral</Name> <Value>3</Value> </QuestionChoice> <QuestionChoice> <Id>4</Id> <IsBottomValue>false</IsBottomValue> <IsTopValue>false</IsTopValue> <Name>SomewhatSatisfied</Name> <Value>4</Value> </QuestionChoice> <QuestionChoice> <Id>5</Id> <IsBottomValue>false</IsBottomValue> <IsTopValue>true</IsTopValue> <Name>Satisfied</Name> <Value>5</Value> </QuestionChoice> </Choices> <Created xmlns:d4p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" /> <GeneratedId i:nil="true" /> <Id>5</Id> <IsChoiceResponse>true</IsChoiceResponse> <IsDateResponse>false</IsDateResponse> <IsNumericResponse>false</IsNumericResponse> <IsTextResponse>false</IsTextResponse> <Name>OverallSatisfaction</Name> </Question> <Question> <Category i:nil="true" /> <Choices /> <Created xmlns:d4p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" /> <GeneratedId i:nil="true" /> <Id>3</Id> <IsChoiceResponse>false</IsChoiceResponse> <IsDateResponse>false</IsDateResponse> <IsNumericResponse>false</IsNumericResponse> <IsTextResponse>true</IsTextResponse> <Name>Comments</Name> </Question> <Question> <Category i:nil="true" /> <Choices /> <Created xmlns:d4p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" /> <GeneratedId i:nil="true" /> <Id>7</Id> <IsChoiceResponse>false</IsChoiceResponse> <IsDateResponse>false</IsDateResponse> <IsNumericResponse>true</IsNumericResponse> <IsTextResponse>false</IsTextResponse> <Name>AmountSpent</Name> </Question> </Questions> <SurveyDefinition> <Created xmlns:d3p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" /> <Description>Basic satisfaction survey.</Description> <GeneratedId i:nil="true" /> <Id>1</Id> <Name>Satisfaction</Name> <QuestionIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>5</d3p1:string> <d3p1:string>3</d3p1:string> <d3p1:string>7</d3p1:string> </QuestionIds> </SurveyDefinition> </SurveyInfo>
Response Information
Resource Description
Smg.RestApi.Model.SurveyData.SurveyInfoEncapsulates the definition of a survey, including the Survey Definition and it's related questions.
Response Formats
application/json, text/json
Sample:
{ "SurveyDefinition": { "Id": "1", "Name": "Satisfaction", "Description": "Basic satisfaction survey.", "Created": null, "QuestionIds": [ "5", "3", "7" ], "GeneratedId": null }, "Questions": [ { "Id": "5", "Name": "OverallSatisfaction", "Category": null, "Created": null, "IsNumericResponse": false, "IsTextResponse": false, "IsDateResponse": false, "IsChoiceResponse": true, "Choices": [ { "Id": "1", "Name": "Dissatisfied", "Value": 1, "IsTopValue": false, "IsBottomValue": true }, { "Id": "2", "Name": "SomewhatDissatisfied", "Value": 2, "IsTopValue": false, "IsBottomValue": false }, { "Id": "3", "Name": "Neutral", "Value": 3, "IsTopValue": false, "IsBottomValue": false }, { "Id": "4", "Name": "SomewhatSatisfied", "Value": 4, "IsTopValue": false, "IsBottomValue": false }, { "Id": "5", "Name": "Satisfied", "Value": 5, "IsTopValue": true, "IsBottomValue": false } ], "GeneratedId": null }, { "Id": "3", "Name": "Comments", "Category": null, "Created": null, "IsNumericResponse": false, "IsTextResponse": true, "IsDateResponse": false, "IsChoiceResponse": false, "Choices": [], "GeneratedId": null }, { "Id": "7", "Name": "AmountSpent", "Category": null, "Created": null, "IsNumericResponse": true, "IsTextResponse": false, "IsDateResponse": false, "IsChoiceResponse": false, "Choices": [], "GeneratedId": null } ] }
application/xml, text/xml
Sample:
<SurveyInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Smg.RestApi.Model.SurveyData"> <Questions> <Question> <Category i:nil="true" /> <Choices> <QuestionChoice> <Id>1</Id> <IsBottomValue>true</IsBottomValue> <IsTopValue>false</IsTopValue> <Name>Dissatisfied</Name> <Value>1</Value> </QuestionChoice> <QuestionChoice> <Id>2</Id> <IsBottomValue>false</IsBottomValue> <IsTopValue>false</IsTopValue> <Name>SomewhatDissatisfied</Name> <Value>2</Value> </QuestionChoice> <QuestionChoice> <Id>3</Id> <IsBottomValue>false</IsBottomValue> <IsTopValue>false</IsTopValue> <Name>Neutral</Name> <Value>3</Value> </QuestionChoice> <QuestionChoice> <Id>4</Id> <IsBottomValue>false</IsBottomValue> <IsTopValue>false</IsTopValue> <Name>SomewhatSatisfied</Name> <Value>4</Value> </QuestionChoice> <QuestionChoice> <Id>5</Id> <IsBottomValue>false</IsBottomValue> <IsTopValue>true</IsTopValue> <Name>Satisfied</Name> <Value>5</Value> </QuestionChoice> </Choices> <Created xmlns:d4p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" /> <GeneratedId i:nil="true" /> <Id>5</Id> <IsChoiceResponse>true</IsChoiceResponse> <IsDateResponse>false</IsDateResponse> <IsNumericResponse>false</IsNumericResponse> <IsTextResponse>false</IsTextResponse> <Name>OverallSatisfaction</Name> </Question> <Question> <Category i:nil="true" /> <Choices /> <Created xmlns:d4p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" /> <GeneratedId i:nil="true" /> <Id>3</Id> <IsChoiceResponse>false</IsChoiceResponse> <IsDateResponse>false</IsDateResponse> <IsNumericResponse>false</IsNumericResponse> <IsTextResponse>true</IsTextResponse> <Name>Comments</Name> </Question> <Question> <Category i:nil="true" /> <Choices /> <Created xmlns:d4p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" /> <GeneratedId i:nil="true" /> <Id>7</Id> <IsChoiceResponse>false</IsChoiceResponse> <IsDateResponse>false</IsDateResponse> <IsNumericResponse>true</IsNumericResponse> <IsTextResponse>false</IsTextResponse> <Name>AmountSpent</Name> </Question> </Questions> <SurveyDefinition> <Created xmlns:d3p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" /> <Description>Basic satisfaction survey.</Description> <GeneratedId i:nil="true" /> <Id>1</Id> <Name>Satisfaction</Name> <QuestionIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>5</d3p1:string> <d3p1:string>3</d3p1:string> <d3p1:string>7</d3p1:string> </QuestionIds> </SurveyDefinition> </SurveyInfo>