PUT example/api/Survey/{id}

https://app.bwz.se/bedrock/example/api/Survey/{id}

Updates a SurveyModel.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The id of the SurveyModel to update.

integer

Required

Body Parameters

PublicationId of the Survey

UpdateSurveyArgs
NameDescriptionTypeAdditional information
Name

Sets the name.

string

Valid name with max 256 characters

Description

Sets the description.

string

None.

GoalAnswered

The amount of expected answers

integer

None.

RegistrationIsOpen

If the Registration for the Survey is currently open.

boolean

None.

PublicationId

PublicationId of the Survey

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "Description": "sample string 2",
  "GoalAnswered": 1,
  "RegistrationIsOpen": true,
  "PublicationId": 1
}

application/xml, text/xml

Sample:
<UpdateSurveyArgs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.Survey">
  <Description>sample string 2</Description>
  <GoalAnswered>1</GoalAnswered>
  <Name>sample string 1</Name>
  <PublicationId>1</PublicationId>
  <RegistrationIsOpen>true</RegistrationIsOpen>
</UpdateSurveyArgs>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

SurveyModel
NameDescriptionTypeAdditional information
Id

Id of the Survey.

integer

None.

Name

Name of the Survey

string

None.

Description

Description of the Survey

string

None.

PublicationId

PublicationId of the Survey

integer

None.

GoalAnswered

The amount of expected answers

integer

None.

RegistrationIsOpen

If the Registration for the Survey is currently open.

boolean

None.

CreatedByUserId

Id of the User who created the Survey.

integer

None.

CreationDate

CreationDate of the Survey.

date

None.

ModifiedDate

ModifiedDate of the Survey.

date

None.

FormFieldProperties

An array of the FormFieldProperties of the Survey.

Collection of FormFieldModel

None.

RegistrationLink

The registration link for the Survey.

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "Description": "sample string 3",
  "PublicationId": 4,
  "GoalAnswered": 5,
  "RegistrationIsOpen": true,
  "CreatedByUserId": 7,
  "CreationDate": "2024-12-23T06:48:27.900178+01:00",
  "ModifiedDate": "2024-12-23T06:48:27.900178+01:00",
  "FormFieldProperties": [
    {
      "FormFieldId": 1,
      "Name": "sample string 2",
      "FieldType": 1,
      "IsRequired": true,
      "FieldDataType": 1,
      "FieldLabel": "sample string 4",
      "Options": [
        {
          "Value": "sample string 1",
          "Label": "sample string 2"
        },
        {
          "Value": "sample string 1",
          "Label": "sample string 2"
        }
      ]
    },
    {
      "FormFieldId": 1,
      "Name": "sample string 2",
      "FieldType": 1,
      "IsRequired": true,
      "FieldDataType": 1,
      "FieldLabel": "sample string 4",
      "Options": [
        {
          "Value": "sample string 1",
          "Label": "sample string 2"
        },
        {
          "Value": "sample string 1",
          "Label": "sample string 2"
        }
      ]
    }
  ],
  "RegistrationLink": "sample string 10"
}

application/xml, text/xml

Sample:
<SurveyModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.Survey">
  <CreatedByUserId>7</CreatedByUserId>
  <CreationDate>2024-12-23T06:48:27.900178+01:00</CreationDate>
  <Description>sample string 3</Description>
  <FormFieldProperties xmlns:d2p1="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.Form">
    <d2p1:FormFieldModel>
      <d2p1:FieldDataType>Text</d2p1:FieldDataType>
      <d2p1:FieldLabel>sample string 4</d2p1:FieldLabel>
      <d2p1:FieldType>TEXT</d2p1:FieldType>
      <d2p1:FormFieldId>1</d2p1:FormFieldId>
      <d2p1:IsRequired>true</d2p1:IsRequired>
      <d2p1:Name>sample string 2</d2p1:Name>
      <d2p1:Options>
        <d2p1:FormFieldPossibilityModel>
          <d2p1:Label>sample string 2</d2p1:Label>
          <d2p1:Value>sample string 1</d2p1:Value>
        </d2p1:FormFieldPossibilityModel>
        <d2p1:FormFieldPossibilityModel>
          <d2p1:Label>sample string 2</d2p1:Label>
          <d2p1:Value>sample string 1</d2p1:Value>
        </d2p1:FormFieldPossibilityModel>
      </d2p1:Options>
    </d2p1:FormFieldModel>
    <d2p1:FormFieldModel>
      <d2p1:FieldDataType>Text</d2p1:FieldDataType>
      <d2p1:FieldLabel>sample string 4</d2p1:FieldLabel>
      <d2p1:FieldType>TEXT</d2p1:FieldType>
      <d2p1:FormFieldId>1</d2p1:FormFieldId>
      <d2p1:IsRequired>true</d2p1:IsRequired>
      <d2p1:Name>sample string 2</d2p1:Name>
      <d2p1:Options>
        <d2p1:FormFieldPossibilityModel>
          <d2p1:Label>sample string 2</d2p1:Label>
          <d2p1:Value>sample string 1</d2p1:Value>
        </d2p1:FormFieldPossibilityModel>
        <d2p1:FormFieldPossibilityModel>
          <d2p1:Label>sample string 2</d2p1:Label>
          <d2p1:Value>sample string 1</d2p1:Value>
        </d2p1:FormFieldPossibilityModel>
      </d2p1:Options>
    </d2p1:FormFieldModel>
  </FormFieldProperties>
  <GoalAnswered>5</GoalAnswered>
  <Id>1</Id>
  <ModifiedDate>2024-12-23T06:48:27.900178+01:00</ModifiedDate>
  <Name>sample string 2</Name>
  <PublicationId>4</PublicationId>
  <RegistrationIsOpen>true</RegistrationIsOpen>
  <RegistrationLink>sample string 10</RegistrationLink>
</SurveyModel>