Update question library item
Description
Update name, item, companyId and questionPackage field for the question.
Params
questionId: Question library id of the item to update
Payload
{
"item": {
"type": "string",
"subtype": "string",
"frontendId": "number",
"position": "number",
"title": "string",
"config": "object"
},
"name": "string",
"questionPackage": "string",
"locale": "string",
"companyId": "string",
}
where:
-
name: Item name that appears in the library. Required. -
item: See below for more information. Required -
questionPackage: Question package. Optional. -
locale: If present, the question will only be available to add if the project uses the same locale. Optional. Sendnullif you want to remove the current locale value. -
companyId: Company the item is gonna belong to. If not present it will be created as a default item (usable by every user). Optional.
Item
The item is the question to be added:
{
"type": "string",
"subtype": "string",
"config": {
"isRequired": "boolean",
"allowNA": "boolean",
"minValue": "number",
"maxValue": "number",
"allowMultipleSelection": "boolean",
"minResponses": "number",
"maxResponses": "number"
},
"position": "number",
"title": "string",
"options": "array",
"netquestId": "string",
"netquestName": "string"
}
-
type: The type of the item. Required. Possible values are:-
multiple:Multiple choice question. -
input:Numeric question.
-
-
subtype: The subtype of the item. Required:-
text:Only valid when type is multiple. -
number:Only valid when type is input.
-
-
config:Object containing item configurations.-
isRequired: Whether the item is required or not. Required. -
allowNA: Whether the item accepts N/A as an answer or not. Required. -
minValue: Minimum value allowed for the answer of the question. Required for type: input, subtype: number. -
maxValue: Maximum value allowed for the answer of the question. Required for type: input, subtype: number. -
allowMultipleSelection: Whether or not the question allows to select multiple options. Required for type: multiple, subtype: text. -
minResponses: Minimum amount of options that can be selected. IfallowMultipleSelectionis false this value should always be 1. Required for type: multiple, subtype: text. -
maxResponses: Maximum amount of options that can be selected. IfallowMultipleSelectionis false this value should always be 1. Required for type: multiple, subtype: text.
-
-
position: The position of the item. Not in use. Required -
title: The title of the question. -
netquestId: Netquest identifier. Optional. -
netquestName:Netquest url variable name. Optional.
For each type of item, there can be more specific properties.
Options
Options is an array of objects containing the options for the multiple choice question. It has the following structure:
[
{
"label": "string",
"position": "number",
"netquestOptionValue": "string"
}
]
-
label: The label of the option. Required. -
position: The position of the option relative to the item. Required. -
netquestOptionValue: The value used to map to the question option when the answer for the question is passed as an url variable. Required when netquestId and netquestName are present in the item.
Response
200 OK
Returns the updated object.
{
"item": {
"type": "string",
"subtype": "string",
"frontendId": "number",
"position": "number",
"title": "string",
"config": "object"
},
"name": "string",
"questionPackage": "string",
"locale": "string",
"companyId": "string",
"isDefaultItem": "boolean",
"isShared": "boolean"
}
where:
-
name: Item name that appears in the library. -
item: See below for more information. -
questionPackage: Question package. -
locale: If present, the question will only be available to add if the project uses the same locale. -
companyId: Company the item is gonna belong to. If not present it will be created as a default item (usable by every user). -
isDefaultItem: Item is a default one or not. -
isShared: Item is shared for that company.
Item
The item is the question that would be added to the project:
{
"type": "string",
"subtype": "string",
"config": {
"isRequired": "boolean",
"allowNA": "boolean",
"minValue": "number",
"maxValue": "number",
"allowMultipleSelection": "boolean",
"minResponses": "number",
"maxResponses": "number"
},
"position": "number",
"title": "string",
"options": "array",
"netquestId": "string",
"netquestName": "string"
}
-
type: The type of the item. Required. Possible values are:-
multiple:Multiple choice question. -
input:Numeric question.
-
-
subtype: The subtype of the item. Required:-
text:Only valid when type is multiple. -
number:Only valid when type is input.
-
-
config:Object containing item configurations.-
isRequired: Whether the item is required or not. -
allowNA: Whether the item accepts N/A as an answer or not. -
minValue: Minimum value allowed for the answer of the question. -
maxValue: Maximum value allowed for the answer of the question. -
allowMultipleSelection: Whether or not the question allows to select multiple options. -
minResponses: Minimum amount of options that can be selected. IfallowMultipleSelectionis false this value should always be 1. -
maxResponses: Maximum amount of options that can be selected. IfallowMultipleSelectionis false this value should always be 1.
-
-
position: The position of the item. Not in use. -
title: The title of the question. -
netquestId: Netquest identifier. -
netquestName:Netquest url variable name.
Options
Options is an array of objects containing the options for the multiple choice question.
[
{
"label": "string",
"position": "number",
"netquestOptionValue": "string"
}
]
-
label: The label of the option. -
position: The position of the option relative to the item. -
netquestOptionValue: The value used to map to the question option when the answer for the question is passed as an url variable.
401 Unauthorized
The user is not authorized
403 Forbidden
The user doesn’t have enough privileges to use this endpoint
The company is not enabled to perform this action
500 Internal Server Error
Error occurred while processing the request.
Description
Update name, item, companyId and questionPackage field for the question.Params
questionId: Question library id of the item to update
Payload
-
name: Item name that appears in the library. Required. -
item: See below for more information. Required -
questionPackage: Question package. Optional. -
locale: If present, the question will only be available to add if the project uses the same locale. Optional. Sendnullif you want to remove the current locale value. -
companyId: Company the item is gonna belong to. If not present it will be created as a default item (usable by every user). Optional.
Item
The item is the question to be added:-
type: The type of the item. Required. Possible values are:-
multiple:Multiple choice question. -
input:Numeric question.
-
-
subtype: The subtype of the item. Required:-
text:Only valid when type is multiple. -
number:Only valid when type is input.
-
-
config:Object containing item configurations.-
isRequired: Whether the item is required or not. Required. -
allowNA: Whether the item accepts N/A as an answer or not. Required. -
minValue: Minimum value allowed for the answer of the question. Required for type: input, subtype: number. -
maxValue: Maximum value allowed for the answer of the question. Required for type: input, subtype: number. -
allowMultipleSelection: Whether or not the question allows to select multiple options. Required for type: multiple, subtype: text. -
minResponses: Minimum amount of options that can be selected. IfallowMultipleSelectionis false this value should always be 1. Required for type: multiple, subtype: text. -
maxResponses: Maximum amount of options that can be selected. IfallowMultipleSelectionis false this value should always be 1. Required for type: multiple, subtype: text.
-
-
position: The position of the item. Not in use. Required -
title: The title of the question. -
netquestId: Netquest identifier. Optional. -
netquestName:Netquest url variable name. Optional.
Options
Options is an array of objects containing the options for the multiple choice question. It has the following structure:-
label: The label of the option. Required. -
position: The position of the option relative to the item. Required. -
netquestOptionValue: The value used to map to the question option when the answer for the question is passed as an url variable. Required when netquestId and netquestName are present in the item.
Response
200 OK
Returns the updated object.
-
name: Item name that appears in the library. -
item: See below for more information. -
questionPackage: Question package. -
locale: If present, the question will only be available to add if the project uses the same locale. -
companyId: Company the item is gonna belong to. If not present it will be created as a default item (usable by every user). -
isDefaultItem: Item is a default one or not. -
isShared: Item is shared for that company.
Item
The item is the question that would be added to the project:-
type: The type of the item. Required. Possible values are:-
multiple:Multiple choice question. -
input:Numeric question.
-
-
subtype: The subtype of the item. Required:-
text:Only valid when type is multiple. -
number:Only valid when type is input.
-
-
config:Object containing item configurations.-
isRequired: Whether the item is required or not. -
allowNA: Whether the item accepts N/A as an answer or not. -
minValue: Minimum value allowed for the answer of the question. -
maxValue: Maximum value allowed for the answer of the question. -
allowMultipleSelection: Whether or not the question allows to select multiple options. -
minResponses: Minimum amount of options that can be selected. IfallowMultipleSelectionis false this value should always be 1. -
maxResponses: Maximum amount of options that can be selected. IfallowMultipleSelectionis false this value should always be 1.
-
-
position: The position of the item. Not in use. -
title: The title of the question. -
netquestId: Netquest identifier. -
netquestName:Netquest url variable name.
Options
Options is an array of objects containing the options for the multiple choice question.-
label: The label of the option. -
position: The position of the option relative to the item. -
netquestOptionValue: The value used to map to the question option when the answer for the question is passed as an url variable.
401 Unauthorized
The user is not authorized
403 Forbidden
The user doesn’t have enough privileges to use this endpoint
The company is not enabled to perform this action
500 Internal Server Error
Error occurred while processing the request.