Get Questions Included in the Form

GET /forms/:formID/questions



Enables the retrieval of questions for a specific survey form. This provides access to question groups (number, title, and message) and questions (number, type, etc.).

Resource URL

https://api.ideasystem.org/v1/forms/1/questions

Parameters

form_id
required
 
Example: /v1/forms/1/questions
A unique survey form identifier in the IDEA system.

Response

The response will be a collection of questions that make up the form associated with the ID given. It will have an HTTP 200 status as well as a JSON body. If the form_id cannot be found an HTTP 404 (Not Found) will be returned. All other errors will result in an HTTP 500 (Internal Server Error).

Response Parameters (JSON Body)

data
Example: "data": { ... }
An array of question groups that make up the given form. Each question group will have a type, number, title, and message.
data.number
Example: "number": 12
The question group number will be unique within the collection of questions and provide an ordering of the questions for display purposes.
data.type
Example: "type": "open"
The type of questions included in this question group. This can be
  • scaled (legacy)
  • likert
  • open
  • semanticDifference
  • multipleChoice
  • fillInTheBlank
  • mixed
Open questions allow users to fill in text responses. All other types of questions have a defined set of response options that can be chosen by the user. A Mixed question group indicates that there's more than one question type contained in the group.
data.title
Example: "title": "Course Comparison"
The title of the question group. It helps provide context for the survey respondent.
data.message
Example: "message": "On the next three items, compare this course with others you have taken at this institution."
The message of the question group. It helps provide guidance for the survey respondent as they answer the questions in this group.

data.response_options
Example: "response_options": [...]
Describes the possible options that a user can select for each question in the group. This is only included when the type is scaled.
data.response_options.value
response value
data.response_options.description
response option description
data.response_options.abbreviation
short response option name/description
data.response_options.is_excluded
true if this response option should be excluded from calculated values

data.questions
Example: "questions": [ ... ]
An array of questions (scaled, open, etc). Each question has a number, text, and type. Scaled questions also have response options.
data.questions.id
Example: "id": 123
A unique question identifier in the IDEA system.
data.questions.number
Example: "number": 2
The question number. This provides ordering for questions within a question group and should be unique within this group.
data.questions.text
Example: "text": "What is your favorite color?"
The text of the question.
data.questions.type
Example: "type": "scaled"
The type of question. This can be
  • scaled (legacy)
  • likert
  • open
  • semanticDifference
  • multipleChoiceSingleAnswer
  • multipleChoiceMultipleAnswer
  • fillInTheBlank
Open questions allow users to fill in text responses. All other types of questions have a defined set of response options that can be chosen by the user.

data.questions.response_options
Example: "response_options": [ ... ]
Describes the possible options that a user can select for this question. This is only included when the type is scaled.
data.questions.response_options.value
response value
data.questions.response_options.description
response option description
data.questions.response_options.abbreviation
short response option name/description
data.questions.response_options.is_excluded
true if this response option should be excluded from calculated values

Example

This request will get all the questions associated with the form with ID 1234.

Request

GET /v1/forms/1234/questions

Response (as JSON)

HTTP 200
{
"data": [
    {
        "number": 1,
        "type": "open",
        "title": "This is an open question group title.",
        "message": "This is an open question group message.",
        "response_options": []
        "questions" : [
            {
                "id": 123,
                "number": 1,
                "text": "This is an open question 1",
                "type": "open"
            }
        ]
    },
    {
        "number": 2,
        "type": "scaled",
        "title": "Scaled Question Group Title 1",
        "message": "This is a scaled question group where each question has different response options.",
        "response_options": [],
        "questions" : [
            {   
                "id": 124,
                "number": 1,
                "text": "This is a scaled question 1",
                "type": "scaled",
                "response_options": [
                    {
                        "value": 1,
                        "description": "This is option 1",
                        "abbreviation": "O1",
                        "is_excluded": false
                    },
                    {
                        "value": 2,
                        "description": "This is option 2",
                        "abbreviation": "O2",
                        "is_excluded": false
                    },
                    {
                        "value": 3,
                        "description": "This is option 3",
                        "abbreviation": "O3",
                        "is_excluded": false
                    },
                    {
                        "value": 4,
                        "description": "Cannot Judge",
                        "abbreviation": "CJ",
                        "is_excluded": true
                    }
                ]
            },
            {
                "id": 125,
                "number": 2,
                "text": "This is a scaled question 2",
                "type": "scaled",
                "response_options": [
                    {
                        "value": 1,
                        "description": "Small",
                        "abbreviation": "SM",
                        "is_excluded": false
                    },
                    {
                        "value": 2,
                        "description": "Medium",
                        "abbreviation": "ME",
                        "is_excluded": false
                    },
                    {
                        "value": 3,
                        "description": "Large",
                        "abbreviation": "LA",
                        "is_excluded": false
                    }
                ]
            }
        ]
    },
    {
        "number": 3,
        "type": "scaled",
        "title": "Scaled Question Group Title 2",
        "message": "This is a question group where all questions have the same response options.",
        "response_options": [
            {
                "value": 1,
                "description": "This is option 1",
                "abbreviation": "O1",
                "is_excluded": false
            },
            {
                "value": 2,
                "description": "This is option 2",
                "abbreviation": "O2",
                "is_excluded": false
            },
            {
                "value": 3,
                "description": "This is option 3",
                "abbreviation": "O3",
                "is_excluded": false
            },
            {
                "value": 4,
                "description": "Cannot Judge",
                "abbreviation": "CJ",
                "is_excluded": true
            }
        ],
        "questions" : [
            {   
                "id": 126,
                "number": 1,
                "text": "This is a scaled question 1",
                "type": "scaled",
                "response_options": []
            }
        ]
    }]
}