POST Questions/{StudyKey}

Create a new Question in the specified Study
If the codebook key is not specified in the request a new empty codebook is created for the question and its key is returned in the response.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
StudyKey

The key of the Study, which must be an integer value.

integer

Required

Body Parameters

Information about the Question to create.

NewQuestionRequest
NameDescriptionTypeAdditional information
codebookKey

An optional key of an existing Codebook.
Use this to specify that the new Question should share the Codebook of an existing Question.
For example, to specify that this new Question should share the Codebook of another Question in this Study, query the Questions resource to find the desired existing Question. Assign the codebookKey property in this request the same value as the codebookKey of the existing Question.

integer

None.

id

The id of the new Question, which must be unique by case insensitive comparison among all Questions in the Study.
The value provided here will be trimmed of leading and trailing whitespace. The resulting id must contain at least one character and not more than 200 characters.

string

Required

String length: inclusive between 1 and 200

tasks

A string containing these characters, the presence of which specifies a task assigned to the Question:

  • c: Code this Question
  • x: Crosstab this Question
  • b: Transcribe this Question
  • t: Translate this Question

string

String length: inclusive between 0 and 4

type

A one-character string which specifies the type of Question:

  • c: Closed
  • d: Data
  • o: Open
  • s: Other/Specify
  • c: Value
If omitted the type defaults to o (Open).

string

String length: inclusive between 0 and 1

label

The label for the Question, which may be empty but must not exceed 25 characters.
The label is used as a short identifier for the Question in reports when the full id of the Question would be too long.

string

String length: inclusive between 0 and 25

text

The text of the Question posed to the respondent, which may be empty.

string

None.

help

The help information for the Question, which may be empty.

string

None.

sortOrder

Ordinal number of the Question.
When a list of Questions are displayed in Ascribe they are sorted first by this value, then by id.

integer

None.

codingSource

A one-character string which specifies the coding source of Question:

  • v: Verbatim
  • b: Transription
  • t: Translation

string

None.

alternativeCodingSource

A one-character string which specifies the alternative coding source of Question:

  • v: Verbatim
  • b: Transription
  • t: Translation

string

None.

assignedToUserKeys

An array of the keys of the Users assigned to work on this Question, which may be empty.

Collection of integer

Required

Response Information

Create a new Question in the specified Study
If the codebook key is not specified in the request a new empty codebook is created for the question and its key is returned in the response.

NewQuestionResponse
NameDescriptionTypeAdditional information
key

The key of the newly created Question.

integer

Required

codebookKey

The key of the Codebook for the Question. If you did not specify a codebook key in the request, this is the key of a newly created empty Codebook.

integer

Required

id

The ID of the new Question.

string

Required

tasks

A string containing these characters, the presence of which specifies a task assigned to the Question:

  • c: Code this Question
  • x: Crosstab this Question
  • b: Transcribe this Question
  • t: Translate this Question

string

Required

type

A one-character string which specifies the type of Question:

  • c: Closed
  • d: Data
  • o: Open
  • s: Other/Specify
  • c: Value

string

Required

label

The label of the new Question.

string

Required

text

The text of the new Question. This is the question posed to the respondent.

string

Required

help

The help information for the Question, which may be empty.

string

None.

sortOrder

Ordinal number of the Question. It uses for sorting questions in list, tables, so on.

integer

None.

codingSource

A one-character string which specifies the coding source of Question:

  • v: Verbatim
  • b: Transription
  • t: Translation

string

None.

alternativeCodingSource

A one-character string which specifies the alternative coding source of Question:

  • v: Verbatim
  • b: Transription
  • t: Translation

string

None.

assignedToUserKeys

An array of the keys of the Users assigned to work on this Question, which may be empty.

Collection of integer

Required

errors

If null the request was processed without error. If not null errors occurred while processing the request. The array contains the error messages.

Collection of string

None.