POST example/api/Survey

https://app.bwz.se/bedrock/example/api/Survey

Creates a SurveyModel.

Request Information

URI Parameters

None.

Body Parameters

If the Registration for the Survey is currently open.

CreateSurveyArgs
NameDescriptionTypeAdditional information
Name

Sets the name.

string

Required

Valid name with max 256 characters

Description

Sets the description.

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.

Request Formats

application/json, text/json

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

application/xml, text/xml

Sample:
<CreateSurveyArgs 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>4</GoalAnswered>
  <Name>sample string 1</Name>
  <PublicationId>3</PublicationId>
  <RegistrationIsOpen>true</RegistrationIsOpen>
</CreateSurveyArgs>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The SurveyModel that has been created.

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-11-21T17:55:28.2162438+01:00",
  "ModifiedDate": "2024-11-21T17:55:28.2162438+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-11-21T17:55:28.2162438+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-11-21T17:55:28.2162438+01:00</ModifiedDate>
  <Name>sample string 2</Name>
  <PublicationId>4</PublicationId>
  <RegistrationIsOpen>true</RegistrationIsOpen>
  <RegistrationLink>sample string 10</RegistrationLink>
</SurveyModel>