PUT v1/Surveys/{surveyId}/Sample/Clear

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

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

Clears the specified columns in sample data for a survey based on the survey id and a filter.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
surveyId

The survey's ID

string

Required

Body Parameters

[MANDATORY] Filters and columns for the clear operation

ClearSurveySampleModel
NameDescriptionTypeAdditional information
Filters

[MANDATORY] Filters to be applied for the clear operation

Collection of SampleFilterModel

None.

Columns

[MANDATORY] The name of the columns to be cleared

Collection of string

None.

Request Formats

application/json, text/json

Sample:
{
  "Filters": [
    {
      "Name": "sample string 1",
      "Op": "sample string 2",
      "Value": "sample string 3"
    },
    {
      "Name": "sample string 1",
      "Op": "sample string 2",
      "Value": "sample string 3"
    }
  ],
  "Columns": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<ClearSurveySampleModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NipoSoftware.Nfield.Manager.Api.Models">
  <Columns xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Columns>
  <Filters>
    <SampleFilterModel>
      <Name>sample string 1</Name>
      <Op>sample string 2</Op>
      <Value>sample string 3</Value>
    </SampleFilterModel>
    <SampleFilterModel>
      <Name>sample string 1</Name>
      <Op>sample string 2</Op>
      <Value>sample string 3</Value>
    </SampleFilterModel>
  </Filters>
</ClearSurveySampleModel>

application/x-www-form-urlencoded

Sample:
[Filters=IEnumerable`1&Columns=IEnumerable`1]

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

BackgroundActivityStatus
NameDescriptionTypeAdditional information
ActivityId

The id of the started activity

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ActivityId": "sample string 1"
}

application/xml, text/xml

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