POST v1/Surveys

User roles allowed to make this request: DomainAdministrator PowerUser RegularUser LimitedUser OperationsUser

Permissions required to make this request: Survey.Write Survey.Read

Supports blueprint surveys

This method creates a new survey.

Request Information

URI Parameters

None.

Body Parameters

An object describing the details for the new survey

SurveyModel
NameDescriptionTypeAdditional information
ClientName

Gets or sets the name of the client, e.g. Coca Cola.

string

Max length: 50

SurveyType

Gets or sets the type of the survey.

string

Required

Description

The description of the survey

string

Max length: 4096

QuestionnaireMD5

The Md5 hash of the current (compiled) questionnaire

string

Max length: 128

InterviewerInstruction

The default interviewer instruction of a survey

string

Max length: 2147483647

SurveyState

The current state of a survey

SurveyState

None.

SurveyGroupId

The survey group this survey belongs to

integer

None.

IsBlueprint

True if this survey is a blueprint, otherwise false.

boolean

None.

SurveyId

The unique id of the survey

string

Max length: 36

SurveyName

The name of the survey

string

Required

Max length: 50

Request Formats

application/json, text/json

Sample:
{
  "ClientName": "sample string 1",
  "SurveyType": "sample string 2",
  "Description": "sample string 3",
  "QuestionnaireMD5": "sample string 4",
  "InterviewerInstruction": "sample string 5",
  "SurveyState": 0,
  "SurveyGroupId": 6,
  "IsBlueprint": true,
  "SurveyId": "sample string 8",
  "SurveyName": "sample string 9"
}

application/xml, text/xml

Sample:
<SurveyModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NipoSoftware.Nfield.Manager.Api.Models">
  <SurveyId>sample string 8</SurveyId>
  <SurveyName>sample string 9</SurveyName>
  <ClientName>sample string 1</ClientName>
  <Description>sample string 3</Description>
  <InterviewerInstruction>sample string 5</InterviewerInstruction>
  <IsBlueprint>true</IsBlueprint>
  <QuestionnaireMD5>sample string 4</QuestionnaireMD5>
  <SurveyGroupId>6</SurveyGroupId>
  <SurveyState>UnderConstruction</SurveyState>
  <SurveyType>sample string 2</SurveyType>
</SurveyModel>

application/x-www-form-urlencoded

Sample:
ClientName=sample&SurveyType=sample&Description=sample&QuestionnaireMD5=sample&InterviewerInstruction=sample&SurveyState=UnderConstruction&SurveyGroupId=1&IsBlueprint=true&SurveyId=sample&SurveyName=sample

multipart/form-data

Sample:

Sample not available.

Response Information

Resource Description

If successful, this method returns the newly created survey

Response Message

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.