Skip to content

Retrieving survey questions

Jonas Enlund edited this page Aug 22, 2014 · 12 revisions
Endpoint Description
/questions/<id> Retrieve a question by id
/questions?surveyId=<id> Retrieve a list of questions for a survey

A question contains the following data:

Field Description Type
question.type Type of the question. Can be NUMBER, OPTION, FREE_TEXT, GEO, VIDEO, PHOTO, BARCODE, DATE String
question.displayName Text of the question String
question.questionTypeString Type of the question. Can be NUMBER, OPTION, FREE_TEXT, GEO, VIDEO, PHOTO, BARCODE, DATE String
question.questionGroupId ID of the question group this question belongs to Integer
question.maxVal if question type is number, this is the maximum number allowed Number
question.dependentQuestionAnswer if this is a dependent question, the option on which the display of this question depends
question.dependentQuestionId the question which this question is dependent on Integer
question.dependentFlag determines if this question is dependent on another question Boolean
question.allowMultipleFlag determines if it is allowed to select multiple options Boolean
question.allowOtherFlag if 'true', displays an 'Other' option Boolean
question.mandatoryFlag determines if this question is mandatory Boolean
question.tip the tooltip displayed with the question, when the 'i' icon is clicked String
question.geoLocked if this is a geo question, determines if the user can edit the geolocation manually Boolean
question.localeNameFlag determines if the answer to this question will be used to name data points
question.requireDoubleEntry determines if this question needs to be entered twice by the enumerator, for validation
question.localeLocationFlag if this is a GEO question, determines if this location is to be used as the main location of the data point Boolean
question.allowDecimal If this is a number question, determines if the number can contain a decimal point Boolean
question.allowSign If this is a number question, determines if this number can contain a minus sign Boolean
question.minVal if question type is number, this is the minimum number allowed Number
question.questionOptions A list of questionOptionIds, which are the keyIds of the question options used by this question List of Integers
question.surveyId The keyId of the survey this question belongs to Integer
question.order the numerical order of the question in the question group, starting with 1 Integer
Clone this wiki locally