Read QuestionSet Hierarchy

This API is used to read the question set on the Sunbird-inQuiry Platform.

This API is used to read the question set on the Sunbird-inQuiry Platform.

GET /questionset/v2/hierarchy/{questionSet_id}

• The /questionset/v2/hierarchy/{questionSet_id} endpoint executes a request for fetching the question set hierarchical structure. • By default, this API tries to fetch a question set with live status. If you need to fetch the hierarchy of qustion set having any other status please use mode=edit query parameter. • The endpoint for reading QuestionSet Hierarchy is /questionset/v2/hierarchy • It points to inquiry-api-service (assessment service) - /questionset/v5/hierarchy • You need to provide a valid QuestionSet Id value in {questionSet_id} field of the API URL. • It is mandatory to provide values for parameters marked with * • Mandatory fields cannot be null or empty.

Path Parameters

Name
Type
Description

questionSet_id*

String

Please append a valid QuestionSet Id to the Request URL

Query Parameters

Name
Type
Description

mode=edit

String

To fetch the latest version of a questionSet hierarchy from the Database for edit purposes

Headers

Name
Type
Description

Content-Type

String

The Content-Type entity is the media type of the resource. Possible media types can be: Application/json

Authorization*

String

To make use of the API, you require authorization. Raise a request to the administrator for the use of the API. You will receive the authorization key. Specify the key received, here.

Set Bearer {{api_key}}

x-channel-id

String

Unique identification number associated with a root organization.

{
    "id": "api.questionset.hierarchy.get",
    "ver": "5.0",
    "ts": "2023-06-29T12:03:38ZZ",
    "params": {
        "resmsgid": "a8368ba1-3246-4f69-8ba6-f37ef0605885",
        "msgid": null,
        "err": null,
        "status": "successful",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
        "questionset": {
            "copyright": "NIT123",
            "subject": [
                "Math"
            ],
            "channel": "01309282781705830427",
            "language": [
                "English"
            ],
            "mimeType": "application/vnd.sunbird.questionset",
            "showHints": false,
            "objectType": "QuestionSet",
            "gradeLevel": [
                "Class 1"
            ],
            "appIcon": "",
            "primaryCategory": "Practice Question Set",
            "children": [
                {
                    "parent": "do_2138281786908098561515",
                    "instructions": "<p>Sample Instruction</p>",
                    "code": "802700d6-c6bd-4c5d-97e9-6010b4530e13",
                    "allowSkip": "Yes",
                    "containsUserData": "No",
                    "qumlVersion": 1.1,
                    "channel": "01309282781705830427",
                    "description": "Simple Calculation",
                    "language": [
                        "English"
                    ],
                    "mimeType": "application/vnd.sunbird.questionset",
                    "showHints": false,
                    "createdOn": "2023-06-29T03:44:00.676+0000",
                    "objectType": "QuestionSet",
                    "scoreCutoffType": "AssessmentLevel",
                    "primaryCategory": "Practice Question Set",
                    "children": [
                        {
                            "parent": "do_2138281798916177921516",
                            "copyright": "NIT123",
                            "code": "ad6f06e4-1a36-47c2-964a-91c249191e4b",
                            "subject": [
                                "Math"
                            ],
                            "qumlVersion": 1.1,
                            "channel": "01309282781705830427",
                            "language": [
                                "English"
                            ],
                            "medium": [
                                "English"
                            ],
                            "mimeType": "application/vnd.sunbird.question",
                            "showHints": false,
                            "templateId": "mcq-vertical",
                            "createdOn": "2023-06-29T03:45:06.917+0000",
                            "objectType": "Question",
                            "gradeLevel": [
                                "Class 1"
                            ],
                            "primaryCategory": "Multiple Choice Question",
                            "contentDisposition": "inline",
                            "lastUpdatedOn": "2023-06-29T03:45:06.917+0000",
                            "contentEncoding": "gzip",
                            "showSolutions": false,
                            "allowAnonymousAccess": "Yes",
                            "identifier": "do_2138281804342640641518",
                            "lastStatusChangedOn": "2023-06-29T03:45:06.917+0000",
                            "audience": [
                                "Student"
                            ],
                            "schemaVersion": "1.1",
                            "visibility": "Parent",
                            "showTimer": false,
                            "author": "Creator1",
                            "index": 1,
                            "qType": "MCQ",
                            "maxScore": 1,
                            "languageCode": [
                                "en"
                            ],
                            "versionKey": "1688010307002",
                            "showFeedback": false,
                            "license": "CC BY 4.0",
                            "complexityLevel": [
                                "evaluate"
                            ],
                            "interactionTypes": [
                                "choice"
                            ],
                            "framework": "inquiry_k-12",
                            "depth": 2,
                            "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64",
                            "compatibilityLevel": 5,
                            "name": "MCQ-1",
                            "board": "CBSE",
                            "status": "Draft"
                        }
                    ],
                    "contentDisposition": "inline",
                    "lastUpdatedOn": "2023-06-29T03:44:00.676+0000",
                    "contentEncoding": "gzip",
                    "generateDIALCodes": "No",
                    "showSolutions": true,
                    "trackable": {
                        "enabled": "No",
                        "autoBatch": "No"
                    },
                    "allowAnonymousAccess": "Yes",
                    "identifier": "do_2138281798916177921516",
                    "lastStatusChangedOn": "2023-06-29T03:44:00.676+0000",
                    "schemaVersion": "1.1",
                    "requiresSubmit": "No",
                    "visibility": "Parent",
                    "showTimer": false,
                    "index": 1,
                    "setType": "materialised",
                    "languageCode": [
                        "en"
                    ],
                    "versionKey": "1688010240676",
                    "showFeedback": true,
                    "license": "CC BY 4.0",
                    "depth": 1,
                    "compatibilityLevel": 6,
                    "name": "Simple Calculation",
                    "navigationMode": "non-linear",
                    "allowBranching": "No",
                    "timeLimits": {
                        "questionSet": {
                            "max": 0,
                            "min": 0
                        }
                    },
                    "shuffle": true,
                    "attributions": [],
                    "status": "Draft"
                }
            ],
            "contentEncoding": "gzip",
            "generateDIALCodes": "No",
            "showSolutions": false,
            "trackable": {
                "enabled": "No",
                "autoBatch": "No"
            },
            "identifier": "do_2138281786908098561515",
            "audience": [
                "Student"
            ],
            "visibility": "Default",
            "showTimer": true,
            "author": "Creator1",
            "consumerId": "6968004d-c67e-434a-a350-773aa1e068a3",
            "childNodes": [
                "do_2138281804342640641518",
                "do_2138281798916177921516"
            ],
            "languageCode": [
                "en"
            ],
            "license": "CC BY 4.0",
            "name": "G-QS-1",
            "allowBranching": "No",
            "status": "Draft",
            "code": "7d5aaa70-ffb8-d062-ba10-1db445a11dbc",
            "allowSkip": "Yes",
            "containsUserData": "No",
            "qumlVersion": 1.1,
            "description": "Sample QuestionSet",
            "medium": [
                "English"
            ],
            "createdOn": "2023-06-29T03:41:34.176+0000",
            "scoreCutoffType": "AssessmentLevel",
            "contentDisposition": "inline",
            "lastUpdatedOn": "2023-06-29T03:45:07.108+0000",
            "allowAnonymousAccess": "Yes",
            "lastStatusChangedOn": "2023-06-29T03:41:34.176+0000",
            "createdFor": [
                "01309282781705830427"
            ],
            "schemaVersion": "1.1",
            "requiresSubmit": "No",
            "setType": "materialised",
            "versionKey": "1688010307108",
            "showFeedback": false,
            "framework": "inquiry_k-12",
            "depth": 0,
            "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64",
            "compatibilityLevel": 6,
            "navigationMode": "non-linear",
            "timeLimits": {
                "questionSet": {
                    "max": 900,
                    "min": 0
                }
            },
            "shuffle": true,
            "board": "CBSE"
        }
    }
}

Success result schema

Attribute
Description
Type

identifier

Questionset Identifier

string

name

Questionset name

string

versionKey

Questionset versionKey

string

code

Questionset code

string

lastStatusChangedOn

Last status changed time

string

visibility

Questionset visibility (eg. Parent/Default)

string

mimeType

Questionset mimeType (eg. application/vnd.sunbird.questionset)

string

createdOn

Questionset createtion timestamp

string

objectType

Questionset objectType (eg. QuestionSet)

string

primaryCategory

Questionset primaryCategory (eg. Practice Question Set)

string

lastUpdatedOn

Questionset last updated timestamp

string

status

Questionset status (eg. Draft/Live)

string

children

Children of Questionset, mostly sections or questions

Object

cURL

curl --location -g --request GET '{{host}}/questionset/v2/hierarchy/{{questionSet_id}}' \
--header 'Authorization: Bearer {{api_key}}'

Last updated