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
Name | Description | Type | Additional information |
---|---|---|---|
StudyKey |
The key of the Study, which must be an integer value. |
integer |
Required |
Body Parameters
Information about the Question to create.
NewQuestionRequestName | Description | Type | Additional information |
---|---|---|---|
codebookKey |
An optional key of an existing Codebook. |
integer |
None. |
id |
The id of the new Question, which must be unique by case insensitive comparison among all Questions in the Study. |
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:
|
string |
String length: inclusive between 0 and 4 |
type |
A one-character string which specifies the type of Question:
|
string |
String length: inclusive between 0 and 1 |
label |
The label for the Question, which may be empty but must not exceed 25 characters. |
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. |
integer |
None. |
codingSource |
A one-character string which specifies the coding source of Question:
|
string |
None. |
alternativeCodingSource |
A one-character string which specifies the alternative coding source of Question:
|
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.
Name | Description | Type | Additional 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:
|
string |
Required |
type |
A one-character string which specifies the type of Question:
|
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:
|
string |
None. |
alternativeCodingSource |
A one-character string which specifies the alternative coding source of Question:
|
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. |