POST api/questionnaire/savesubject

保存问卷题目

Request Information

URI Parameters

None.

Body Parameters

主题

QstSubjectDto
NameDescriptionTypeAdditional information
Id

主题编号(当传入此参数则表示修改此主题)

integer

None.

QstId

所属问卷编号

integer

None.

Content

主题内容

string

None.

QstTypeId

主题类型

integer

None.

Necessary

必答题

boolean

None.

CanSelectedNum

当为多选题时,可选选项的数量

integer

None.

QstOption

选项

Collection of QstOptionDto

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "QstId": 2,
  "Content": "sample string 3",
  "QstTypeId": 4,
  "Necessary": true,
  "CanSelectedNum": 1,
  "QstOption": [
    {
      "Id": 1,
      "QstId": 2,
      "QstTypeId": 3,
      "QstSubjectId": 4,
      "Content": "sample string 5",
      "Index": 6
    },
    {
      "Id": 1,
      "QstId": 2,
      "QstTypeId": 3,
      "QstSubjectId": 4,
      "Content": "sample string 5",
      "Index": 6
    }
  ]
}

text/html

Sample:
{"Id":1,"QstId":2,"Content":"sample string 3","QstTypeId":4,"Necessary":true,"CanSelectedNum":1,"QstOption":[{"Id":1,"QstId":2,"QstTypeId":3,"QstSubjectId":4,"Content":"sample string 5","Index":6},{"Id":1,"QstId":2,"QstTypeId":3,"QstSubjectId":4,"Content":"sample string 5","Index":6}]}

application/xml, text/xml

Sample:
<QstSubjectDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BJ.Services">
  <CanSelectedNum>1</CanSelectedNum>
  <Content>sample string 3</Content>
  <Id>1</Id>
  <Necessary>true</Necessary>
  <QstId>2</QstId>
  <QstOption>
    <QstOptionDto>
      <Content>sample string 5</Content>
      <Id>1</Id>
      <Index>6</Index>
      <QstId>2</QstId>
      <QstSubjectId>4</QstSubjectId>
      <QstTypeId>3</QstTypeId>
    </QstOptionDto>
    <QstOptionDto>
      <Content>sample string 5</Content>
      <Id>1</Id>
      <Index>6</Index>
      <QstId>2</QstId>
      <QstSubjectId>4</QstSubjectId>
      <QstTypeId>3</QstTypeId>
    </QstOptionDto>
  </QstOption>
  <QstTypeId>4</QstTypeId>
</QstSubjectDto>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

保存问卷题目

JsonRtnDtoOfQstSubject
NameDescriptionTypeAdditional information
Msg

string

None.

State

RtnState

None.

Data

QstSubject

None.

Response Formats

application/json, text/json

Sample:
{
  "Msg": "sample string 1",
  "State": 100,
  "Data": {
    "Id": 1,
    "QstId": 2,
    "Content": "sample string 3",
    "QstTypeId": 4,
    "Necessary": true,
    "CanSelectedNum": 1,
    "CreatedTime": "2024-09-25T00:05:06.1851034+08:00",
    "QstOptions": [
      {
        "Id": 1,
        "QstId": 2,
        "QstTypeId": 3,
        "QstSubjectId": 4,
        "Content": "sample string 5",
        "Index": 6,
        "CreatedTime": "2024-09-25T00:05:06.1851034+08:00"
      },
      {
        "Id": 1,
        "QstId": 2,
        "QstTypeId": 3,
        "QstSubjectId": 4,
        "Content": "sample string 5",
        "Index": 6,
        "CreatedTime": "2024-09-25T00:05:06.1851034+08:00"
      }
    ]
  }
}

text/html

Sample:
{"Msg":"sample string 1","State":100,"Data":{"Id":1,"QstId":2,"Content":"sample string 3","QstTypeId":4,"Necessary":true,"CanSelectedNum":1,"CreatedTime":"2024-09-25T00:05:06.1851034+08:00","QstOptions":[{"Id":1,"QstId":2,"QstTypeId":3,"QstSubjectId":4,"Content":"sample string 5","Index":6,"CreatedTime":"2024-09-25T00:05:06.1851034+08:00"},{"Id":1,"QstId":2,"QstTypeId":3,"QstSubjectId":4,"Content":"sample string 5","Index":6,"CreatedTime":"2024-09-25T00:05:06.1851034+08:00"}]}}

application/xml

Sample:

Sample not available.

text/xml

Sample:

Sample not available.

text/javascript, application/javascript, application/json-p

Sample:
/**/ typeof  === 'function' && ({"Msg":"sample string 1","State":100,"Data":{"Id":1,"QstId":2,"Content":"sample string 3","QstTypeId":4,"Necessary":true,"CanSelectedNum":1,"CreatedTime":"2024-09-25T00:05:06.1851034+08:00","QstOptions":[{"Id":1,"QstId":2,"QstTypeId":3,"QstSubjectId":4,"Content":"sample string 5","Index":6,"CreatedTime":"2024-09-25T00:05:06.1851034+08:00"},{"Id":1,"QstId":2,"QstTypeId":3,"QstSubjectId":4,"Content":"sample string 5","Index":6,"CreatedTime":"2024-09-25T00:05:06.1851034+08:00"}]}});