POST Api/QuestionApi/Create

Request Information

URI Parameters

None.

Body Parameters

QuestionDTO
NameDescriptionTypeAdditional information
Id

integer

None.

Question

string

Required

Matching regular expression pattern: ^[a-zA-Z ,-_']*$

String length: inclusive between 0 and 250

SectionId

integer

Required

Matching regular expression pattern: ^[0-9]*$

QOrder

integer

Required

Matching regular expression pattern: ^[0-9]*$

Weight

integer

Required

Matching regular expression pattern: ^[0-9]*$

Hint

string

Matching regular expression pattern: ^[a-zA-Z ,-_']*$

AllowOther

boolean

None.

RequiredAnswer

boolean

Required

RequiredImage

boolean

Required

RequiredAction

boolean

None.

ShowToDepartment

boolean

None.

RequiredComent

boolean

Required

ShowComment

boolean

None.

ShowImage

boolean

None.

QuestionTypeId

globally unique identifier

None.

QuestionTagId

globally unique identifier

None.

QuestionValidationId

globally unique identifier

None.

EnValidation

string

None.

ArValidation

string

None.

CreatedBy

integer

None.

CreatedOn

date

None.

UpdatedBy

integer

None.

UpdatedOn

date

None.

IsActive

boolean

None.

IsDeleted

boolean

None.

SectionName

string

None.

EnQuestionType

string

None.

ArQuestionType

string

None.

EnTag

string

None.

ArTag

string

None.

PriorityId

globally unique identifier

None.

TargetDate

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Question": "sample string 2",
  "SectionId": 3,
  "QOrder": 4,
  "Weight": 5,
  "Hint": "sample string 6",
  "AllowOther": true,
  "RequiredAnswer": true,
  "RequiredImage": true,
  "RequiredAction": true,
  "ShowToDepartment": true,
  "RequiredComent": true,
  "ShowComment": true,
  "ShowImage": true,
  "QuestionTypeId": "879e0a73-23fb-4766-b75d-f40734095a36",
  "QuestionTagId": "1ddb605d-115a-479d-acbd-4c9c6c21b786",
  "QuestionValidationId": "225b20a4-94be-44be-97db-d4739e8ab284",
  "EnValidation": "sample string 11",
  "ArValidation": "sample string 12",
  "CreatedBy": 13,
  "CreatedOn": "2025-05-25T18:45:26.0637862+04:00",
  "UpdatedBy": 1,
  "UpdatedOn": "2025-05-25T18:45:26.0637862+04:00",
  "IsActive": true,
  "IsDeleted": true,
  "SectionName": "sample string 17",
  "EnQuestionType": "sample string 18",
  "ArQuestionType": "sample string 19",
  "EnTag": "sample string 20",
  "ArTag": "sample string 21",
  "PriorityId": "af3f02d3-41ff-4275-8c27-bbf594c899ed",
  "TargetDate": "sample string 22"
}

text/html, multipart/form-data

Sample:
{"Id":1,"Question":"sample string 2","SectionId":3,"QOrder":4,"Weight":5,"Hint":"sample string 6","AllowOther":true,"RequiredAnswer":true,"RequiredImage":true,"RequiredAction":true,"ShowToDepartment":true,"RequiredComent":true,"ShowComment":true,"ShowImage":true,"QuestionTypeId":"879e0a73-23fb-4766-b75d-f40734095a36","QuestionTagId":"1ddb605d-115a-479d-acbd-4c9c6c21b786","QuestionValidationId":"225b20a4-94be-44be-97db-d4739e8ab284","EnValidation":"sample string 11","ArValidation":"sample string 12","CreatedBy":13,"CreatedOn":"2025-05-25T18:45:26.0637862+04:00","UpdatedBy":1,"UpdatedOn":"2025-05-25T18:45:26.0637862+04:00","IsActive":true,"IsDeleted":true,"SectionName":"sample string 17","EnQuestionType":"sample string 18","ArQuestionType":"sample string 19","EnTag":"sample string 20","ArTag":"sample string 21","PriorityId":"af3f02d3-41ff-4275-8c27-bbf594c899ed","TargetDate":"sample string 22"}

application/xml, text/xml

Sample:
<QuestionDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/MSMChecklistFlow.DTO">
  <AllowOther>true</AllowOther>
  <ArQuestionType>sample string 19</ArQuestionType>
  <ArTag>sample string 21</ArTag>
  <ArValidation>sample string 12</ArValidation>
  <CreatedBy>13</CreatedBy>
  <CreatedOn>2025-05-25T18:45:26.0637862+04:00</CreatedOn>
  <EnQuestionType>sample string 18</EnQuestionType>
  <EnTag>sample string 20</EnTag>
  <EnValidation>sample string 11</EnValidation>
  <Hint>sample string 6</Hint>
  <Id>1</Id>
  <IsActive>true</IsActive>
  <IsDeleted>true</IsDeleted>
  <PriorityId>af3f02d3-41ff-4275-8c27-bbf594c899ed</PriorityId>
  <QOrder>4</QOrder>
  <Question>sample string 2</Question>
  <QuestionTagId>1ddb605d-115a-479d-acbd-4c9c6c21b786</QuestionTagId>
  <QuestionTypeId>879e0a73-23fb-4766-b75d-f40734095a36</QuestionTypeId>
  <QuestionValidationId>225b20a4-94be-44be-97db-d4739e8ab284</QuestionValidationId>
  <RequiredAction>true</RequiredAction>
  <RequiredAnswer>true</RequiredAnswer>
  <RequiredComent>true</RequiredComent>
  <RequiredImage>true</RequiredImage>
  <SectionId>3</SectionId>
  <SectionName>sample string 17</SectionName>
  <ShowComment>true</ShowComment>
  <ShowImage>true</ShowImage>
  <ShowToDepartment>true</ShowToDepartment>
  <TargetDate>sample string 22</TargetDate>
  <UpdatedBy>1</UpdatedBy>
  <UpdatedOn>2025-05-25T18:45:26.0637862+04:00</UpdatedOn>
  <Weight>5</Weight>
</QuestionDTO>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'QuestionDTO'.

Response Information

Resource Description

integer

Response Formats

application/json, text/json, text/html, multipart/form-data

Sample:
1

application/xml, text/xml

Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>