-
Notifications
You must be signed in to change notification settings - Fork 31
Retrieving survey questions
pelleaardema edited this page May 15, 2014
·
12 revisions
Retrieves a list of questions from a selected survey
Requires a survey Id
http://<>.appspot.com/rest/questions?surveyId=XYZ
parameter | description |
---|---|
surveyId |
The Id of the survey of which you want to retrieve the questions |
field | description | type |
---|---|---|
questions.type |
The type of the question, choices are FREE_TEXT, OPTION, NUMBER, GEO, PHOTO, VIDEO, DATE, SCAN | String |
questions.path |
Logical path to the question | String |
questions.displayName |
The name of the question as shown on screen | String |
questions.order |
position (order) of the question in this question group | |
questions.text |
name of the question (REDUNDANT?) | String |
questions.questionTypeString |
The type of the question (REDUNDANT?) | String |
questions.tip |
A question hint that can be shown to the user | String |
identifiers | ||
questions.keyId |
The Id of the question | Integer |
questions.surveyId |
The Id of the survey the question belongs to | Integer |
questions.questionGroupId |
The Id of the question group the question belongs to | Integer |
questions.metricId |
?? | Integer |
dependency | ||
questions.dependentFlag |
Indicates whether this question is dependent on the answer of a previous question | Boolean |
questions.questionDependency |
?? QuestionId of the question this question is dependent on, null otherwise | Integer |
questions.dependentQuestionAnswer |
Answer of the dependent question | |
questions.dependentQuestionId |
QuestionId of the question this question is dependent on, null otherwise | Integer |
options | ||
questions.questionOptions |
Contains an array of question options if the question type = OPTIONS | Array |
questions.questionHelpList |
?? | |
questions.optionList |
IDENTICAL TO questionOptions?? | |
questions.mandatoryFlag |
Whether this question is mandatory | Boolean |
questions.allowDecimal |
Allow decimal values: true/false | Boolean |
questions.allowSign |
Allow... | Boolean |
questions.allowMultipleFlag |
Allow multiple answers: true/false | Boolean |
questions.allowOtherFlag |
Allow other answer: true/false | Boolean |
questions.collapseable |
Whether this question is collapsible | Boolean |
questions.immutable |
?? | Boolean |
questions.geoLocked |
geolocked 'true' for GEO type questions | Boolean |
questions.requireDoubleEntry |
?? | Boolean |
questions.optionContainerDto |
?? | |
questions.minVal |
minimum accepted value (for numeric questions) | Integer |
questions.maxVal |
maximum accepted value (for numeric questions) | Integer |
questions.isName |
?? | Boolean |
questions.sourceId |
?? | |
questions.translationMap |
?? |
http://akvoflowsandbox.appspot.com/rest/questions?surveyId=4913002
{"questionOptions":
[{"code":null,"translationMap":null,"questionId":4943002,"order":1,"text":"1","keyId":4963002},
{"code":null,"translationMap":null,"questionId":4943002,"order":2,"text":"2","keyId":4893004},
{"code":null,"translationMap":null,"questionId":4943002,"order":3,"text":"3","keyId":4913003},
{"code":null,"translationMap":null,"questionId":4943002,"order":4,"text":"4","keyId":4973002},
{"code":null,"translationMap":null,"questionId":4943002,"order":5,"text":"5","keyId":4983002}
],
"questions":
[{
"type":"FREE_TEXT",
"path":"1.6.8 Ruarcc Test Group/1.6.8 All Questions/Group 1",
"displayName":"free text question",
"order":1,
"text":"free text question",
"questionTypeString":"FREE_TEXT",
"keyId":4893003
"surveyId":4913002,
"questionGroupId":4923002,
"metricId":1537010,
"questionOptions":null,
"questionHelpList":null,
"questionDependency":null,
"optionList":null,
"translationMap":null,
"dependentFlag":false,
"dependentQuestionAnswer":null,
"dependentQuestionId":null,
"mandatoryFlag":false,
"allowDecimal":false,
"allowSign":false,
"allowMultipleFlag":false,
"allowOtherFlag":false,
"collapseable":false,
"immutable":false,
"geoLocked":false,
"requireDoubleEntry":false,
"optionContainerDto":null,
"minVal":null,
"maxVal":null,
"isName":false,
"sourceId":null,
},
About Akvo Flow
Akvo Flow API
Developer Guides
- Deployments
- Development tools
- Android emulator setup
- Creating New Dashboard Instances
- Disabling Dashboard Instances
- Adding Translations to Dashboards
- Setup your development environment with IntelliJ IDEA
- Setup your development environment on Windows OS
Technical Specification
Regression Tests