POST v1/Surveys/{surveyId}/Sample/Create

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

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

Has survey type usage restrictions online cati

Creates a sample record for the specified survey. Body parameters: If one of the ColumnNames is "RespondentInterviewLink" and the corresponding Value is "true", the Response will include the full respondent interview link. NOTE: "RespondentInterviewLink" is a system reserved name, this column is not stored.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
surveyId

The survey's ID

string

Required

Body Parameters

[MANDATORY] Sample columns to be created

Collection of SampleColumnCreate
NameDescriptionTypeAdditional information
ColumnName

The name of the column

string

None.

Value

Object

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "ColumnName": "sample string 1",
    "Value": {}
  },
  {
    "ColumnName": "sample string 1",
    "Value": {}
  }
]

application/xml, text/xml

Sample:
<ArrayOfSampleColumnCreate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NipoSoftware.Nfield.Manager.Api.Models">
  <SampleColumnCreate>
    <ColumnName>sample string 1</ColumnName>
    <Value />
  </SampleColumnCreate>
  <SampleColumnCreate>
    <ColumnName>sample string 1</ColumnName>
    <Value />
  </SampleColumnCreate>
</ArrayOfSampleColumnCreate>

application/x-www-form-urlencoded

Sample:
Length=1&LongLength=Int64&Rank=1&SyncRoot=Object&IsReadOnly=true&IsFixedSize=true&IsSynchronized=true

multipart/form-data

Sample:

Sample not available.

Response Information

Resource Description

The id of the background activity you can use to get the results.

Response Message

Collection of SampleColumnCreate
NameDescriptionTypeAdditional information
ColumnName

The name of the column

string

None.

Value

Object

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "ColumnName": "sample string 1",
    "Value": {}
  },
  {
    "ColumnName": "sample string 1",
    "Value": {}
  }
]

application/xml, text/xml

Sample:
<ArrayOfSampleColumnCreate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NipoSoftware.Nfield.Manager.Api.Models">
  <SampleColumnCreate>
    <ColumnName>sample string 1</ColumnName>
    <Value />
  </SampleColumnCreate>
  <SampleColumnCreate>
    <ColumnName>sample string 1</ColumnName>
    <Value />
  </SampleColumnCreate>
</ArrayOfSampleColumnCreate>