POST v1/Surveys/{surveyId}/Script

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

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

Supports blueprint surveys

This method updates the ODIN script of a specific survey.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
surveyId

The id of the survey

string

Required

Body Parameters

The (odin) script for the survey

SurveySetScriptModel
NameDescriptionTypeAdditional information
Script

Sets the odin script.

string

Required

FileName

The file name for script file

string

Max length: 260

UnfixedIsOk

Indication the script can contain unfixed positions.

boolean

None.

UseLegacyParser

Indication to use the old 'V1' parser instead of the new 'V2' parser as the main parser

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Script": "sample string 1",
  "FileName": "sample string 2",
  "UnfixedIsOk": true,
  "UseLegacyParser": true
}

application/xml, text/xml

Sample:
<SurveySetScriptModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NipoSoftware.Nfield.Manager.Api.Models">
  <FileName>sample string 2</FileName>
  <Script>sample string 1</Script>
  <UnfixedIsOk>true</UnfixedIsOk>
  <UseLegacyParser>true</UseLegacyParser>
</SurveySetScriptModel>

application/x-www-form-urlencoded

Sample:
Script=sample&FileName=sample&UnfixedIsOk=true&UseLegacyParser=true

multipart/form-data

Sample:

Sample not available.

Response Information

Resource Description

If successful, this method returns the script for the 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.