The following methods can be used to read the metadata and other contents of the survey.
This method provides access to the metadata of a survey.
URL | /api/v2/surveys |
Method | GET |
Parameter | page, limit |
Return | JSON |
Return values | Id | int | ID of the data record | CustomerId | int | ID of the customer | UserId | int | ID of the user assigned to the survey | FolderId | int | ID of the folder to which this survey belongs | StatusId | Int | Status in which the survey is now 0 = not activated 1 = activated/completed 3 = interrupted | Archive | int | Survey is in the archive false = no true = yes | LayoutId | int | ID of the layout used | GroupId | int | ID of the user group to which this survey belongs | LanguageId | int | ID of the main language of the survey | LanguagesCount | int | Number of languages used | Pages | int | Number of pages within the survey | Questions | int | Number of questions | Visitors | int | Number of visitors | SurveyCode | str | Code component of the survey URL | SurveyUrl | str | Individual text of the survey URL | Title | str | Name of the survey | Participants | int | Number of participants | StartDate | date | Date on which the survey was last started | CreatedAt | date | Date on which the survey was created | UpdateAt | date | Date on which the survey was last updated | EndDate | date | Date on which the survey was completed | CreatedDate | date | Date on which the survey was created |
|
Languages
This method can be used to list all the languages in a survey.
URL | /api/v2/surveys/languages |
Method | GET |
Parameter | surveyid, page, limit |
Return | JSON |
Return values | Id | int | ID of the data record | SurveyId | int | ID of the survey | Name | str | Name of the language | CustomName | str | Proper name of the language | Code | str | Language code, 2 letters |
|
Pages
This method gives access to the pages that were created for surveys. A special feature here is the welcome page (id: -1) and the closing page (id: -2). The surveyid parameter is mandatory for this method!
URL | /api/v2/surveys/pages |
Method | GET |
Parameter | surveyid (required), page, limit |
Return | JSON |
Return values | Id | int | ID of the data record | SurveyId | int | ID of the survey | CustomerId | int | Customer ID | Pos | int | Position of the page in the survey | Questions | int | Number of questions in the survey |
|
Questions and elements
This method provides access to the questions and elements that are assigned to a survey. The structure is strictly hierarchical. The individual levels of the elements and the IDs available there correspond to the results from /api/v2/results as follows:
- Level: questionid
- Level: answerid
- Level: levelid
The surveyid parameter is mandatory for this method!
URL | /api/v2/surveys/questions |
Method | GET |
Parameter | surveyid (required), pageid, page, limit |
Return | JSON |
Return values | Id | int | ID of the question | CustomerId | int | ID of the customer | SurveyId | int | ID of the survey | QuestionType | int | Question type: 0 = >Yes / No 1 = Multiple Choice 2 = Text Response 3 = Picture 4 = Matrix 5 = Double Matrix 6 = Opinion scale / NPS 7 = Rating 8 = Slider 9 = Ranking 10 = Semantic differential 11 = Variable 12 = Competition / Newsletter 13 = Media upload | Title | translations | Heading of the question. Zero if not available. | QuestionText | translations | Text of the question. Zero if not available. | ToolTipText | translations | Text of the question. Zero if not available. | NotSpecifiedText | translations | Contains the texts for “No answer” | IsMultipleAnswer | bool | Multiple answers possible (checkboxes as answer) | IsMultipleAnswer2 | bool | Multiple answers possible, refers to double matrix, right part. | Pos | int | Position of the question in the survey | PagePos | int | Position of the question on the survey page | ToolTip | int | Activated or deactivated tooltip. Zero if deactivated. | AdditionalTextAreaText | obj translations | Description of the additional text field. Zero if not available. | ElementCollections | arr of elements | List of elements that make up the question. | OtherText | translations | Text for the additional text field |
|
Element Object | id | int | ID of the element, corresponds to the AnswerId (e.g. open question) or LevelId (e.g. matrix question) depending on the level | resultType | – | Not currently in use | description | translations | Texts with descriptions of the element | additionalDescription | translations | Additional texts with descriptions of the element, e.g. for open questions with text elements before and after the input fields. | typeName | str | Type of element. Available are: Checkbox CheckboxInputCombination CombinedElement DropDownElement Image Input InputCollection IconArray Radio RadioCollection
|
|
| Checkbox CheckboxCollection Ranking Rating Slider Scale TextArea TextareaCollection Upload
Collections denote lists of the respective elements |
|