-
Notifications
You must be signed in to change notification settings - Fork 3
Questionnaire API
Richard Thombs edited this page May 20, 2016
·
15 revisions
GET /api/projects/:pid/questionnaires/:id
Retrieves the design of a specific Questionnaire.
{
'QuestionnaireID': 1,
'ProjectID': 1,
'Caption': {
'CaptionID': 1,
'DefaultCaption': 'My questionnaire'
},
'Forms': [ // An array containing all the Forms in the Questionnaire
{
'FormID': 1,
'Caption': {
'CaptionID': 2,
'DefaultCaption': 'Survey form'
},
'Questions': [ // An array containing all the Questions in the Form
{
'QuestionID': 1,
'Caption': {
'CaptionID': 3,
'DefaultCaption': 'ID'
},
'Type': 7, // See below for a list of the Question types
'Required': false,
'ReadOnly': false,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 2,
'Caption': {
'CaptionID': 4,
'DefaultCaption': 'Numeric'
},
'Type': 2,
'Required': false,
'ReadOnly': false,
'DecimalPlaces': 0,
'Prefix': '',
'Suffix': '',
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 3,
'Caption': {
'CaptionID': 5,
'DefaultCaption': 'Small text'
},
'Type': 1,
'Required': false,
'ReadOnly': false,
'RegExp': '',
'Rows': 1,
'Columns': 30,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 4,
'Caption': {
'CaptionID': 6,
'DefaultCaption': 'Big text'
},
'Type': 1,
'Required': false,
'ReadOnly': false,
'RegExp': '',
'Rows': 1,
'Columns': 30,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 5,
'Caption': {
'CaptionID': 7,
'DefaultCaption': 'Single choice'
},
'Type': 3,
'Required': false,
'ReadOnly': false,
'Choices': [
{
'ChoiceID': 1,
'Caption': {
'CaptionID': 8,
'DefaultCaption': 'Option 1'
}
},
{
'ChoiceID': 2,
'Caption': {
'CaptionID': 9,
'DefaultCaption': 'Option 2'
}
},
{
'ChoiceID': 3,
'Caption': {
'CaptionID': 10,
'DefaultCaption': 'Option 3'
}
}
],
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 6,
'Caption': {
'CaptionID': 11,
'DefaultCaption': 'Multiple choice'
},
'Type': 4,
'Required': false,
'ReadOnly': false,
'Choices': [
{
'ChoiceID': 4,
'Caption': {
'CaptionID': 12,
'DefaultCaption': 'Option A'
}
},
{
'ChoiceID': 5,
'Caption': {
'CaptionID': 13,
'DefaultCaption': 'Option B'
}
},
{
'ChoiceID': 6,
'Caption': {
'CaptionID': 14,
'DefaultCaption': 'Option C'
}
}
],
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 7,
'Caption': {
'CaptionID': 15,
'DefaultCaption': 'Yes\/No'
},
'Type': 6,
'Required': false,
'ReadOnly': false,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 8,
'Caption': {
'CaptionID': 16,
'DefaultCaption': 'Picture'
},
'Type': 10,
'Required': false,
'ReadOnly': false,
'Rows': 480,
'Columns': 640,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4,
'Resolution': '640x480'
},
{
'QuestionID': 9,
'Caption': {
'CaptionID': 17,
'DefaultCaption': 'Signature'
},
'Type': 11,
'Required': false,
'ReadOnly': false,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 10,
'Caption': {
'CaptionID': 18,
'DefaultCaption': 'Time'
},
'Type': 9,
'Required': false,
'ReadOnly': false,
'EarliestTime': '00:00:00',
'LatestTime': '23:59:59',
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
}
],
'Type': 1,
'Items': [
],
'Layout': 1,
'ModifyRole': 3,
'DeleteRole': 3
},
{
'FormID': 2,
'Caption': {
'CaptionID': 19,
'DefaultCaption': 'Grid form'
},
'Questions': [
{
'QuestionID': 11,
'Caption': {
'CaptionID': 20,
'DefaultCaption': 'Grid numeric'
},
'Type': 2,
'Required': false,
'ReadOnly': false,
'DecimalPlaces': 0,
'Prefix': '',
'Suffix': '',
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 12,
'Caption': {
'CaptionID': 21,
'DefaultCaption': 'Small text'
},
'Type': 1,
'Required': false,
'ReadOnly': false,
'RegExp': '',
'Rows': 1,
'Columns': 30,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 13,
'Caption': {
'CaptionID': 22,
'DefaultCaption': 'Big text'
},
'Type': 1,
'Required': false,
'ReadOnly': false,
'RegExp': '',
'Rows': 5,
'Columns': 40,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 14,
'Caption': {
'CaptionID': 23,
'DefaultCaption': 'Grid single choice'
},
'Type': 3,
'Required': false,
'ReadOnly': false,
'Choices': [
{
'ChoiceID': 7,
'Caption': {
'CaptionID': 24,
'DefaultCaption': 'Option 1'
}
},
{
'ChoiceID': 8,
'Caption': {
'CaptionID': 25,
'DefaultCaption': 'Option 2'
}
},
{
'ChoiceID': 9,
'Caption': {
'CaptionID': 26,
'DefaultCaption': 'Option 3'
}
}
],
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 15,
'Caption': {
'CaptionID': 27,
'DefaultCaption': 'Grid multiple choice'
},
'Type': 4,
'Required': false,
'ReadOnly': false,
'Choices': [
{
'ChoiceID': 10,
'Caption': {
'CaptionID': 28,
'DefaultCaption': 'Option A'
}
},
{
'ChoiceID': 11,
'Caption': {
'CaptionID': 29,
'DefaultCaption': 'Option B'
}
},
{
'ChoiceID': 12,
'Caption': {
'CaptionID': 30,
'DefaultCaption': 'Option C'
}
}
],
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 16,
'Caption': {
'CaptionID': 31,
'DefaultCaption': 'Grid yes\/no'
},
'Type': 6,
'Required': false,
'ReadOnly': false,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
},
{
'QuestionID': 17,
'Caption': {
'CaptionID': 32,
'DefaultCaption': 'Grid picture'
},
'Type': 10,
'Required': false,
'ReadOnly': false,
'Rows': 480,
'Columns': 640,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4,
'Resolution': '640x480'
},
{
'QuestionID': 18,
'Caption': {
'CaptionID': 33,
'DefaultCaption': 'Grid signature'
},
'Type': 11,
'Required': false,
'ReadOnly': false,
'Binding': {
'BindingType': 1,
'BoundItem': ''
},
'Revision': 4
}
],
'Type': 2,
'Items': [
],
'ItemListID': 1,
'Layout': 0,
'ModifyRole': 3,
'DeleteRole': 3
}
],
'Version': 1,
'Status': 4,
'DateCreated': '2016-05-20T10:13:48.38+01:00',
'DateLastModified': '2016-05-20T10:13:49.99+01:00',
'Revision': 2
}PUT /api/projects/:pid/questionnaires/:id
Note: The Questionnaire API is not yet available, but some other portions of the Web API do return Questionnaire-related information. This page currently just documents that information.
-
1- Survey Form -
2- Grid Form
-
1- Text -
2- Numeric -
3- Single Choice -
4- Multiple Choice -
5- Date & Time -
6- Yes / No -
7- ID -
8- Date -
9- Time -
10- Picture -
11- Signature