Question List

This API is used to get the list of Questions on the Sunbird-inQuiry Platform.

This API is used to get the list of Questions on the Sunbird-inQuiry Platform.

POST /question/v2/list

• It gives all metadata of requested question identifiers • It points to inquiry-api-service (assessment service)- /question/v5/list • You need to provide list of valid question identifiers in the request body • It is mandatory to provide values for parameters marked with * • Mandatory fields cannot be null or empty.

Headers

NameTypeDescription

Content-Type*

String

The Content-Type entity is the media type of the resource. It should be Application/json

x-channel-id

String

Unique identification number associated with a root organization.

Request Body

NameTypeDescription

request*

Object

List of question identifiers

{
    "id": "api.questions.list",
    "ver": "5.0",
    "ts": "2023-06-29T06:51:54ZZ",
    "params": {
        "resmsgid": "7a23e026-3c51-4ec1-8cff-afa078a991f5",
        "msgid": null,
        "err": null,
        "status": "successful",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
        "questions": [
            {
                "copyright": "NIT123",
                "code": "ad6f06e4-1a36-47c2-964a-91c249191e4b",
                "subject": [
                    "Math"
                ],
                "qumlVersion": 1.1,
                "channel": "01309282781705830427",
                "responseDeclaration": {
                    "response1": {
                        "cardinality": "single",
                        "type": "integer",
                        "correctResponse": {
                            "value": 0
                        },
                        "mapping": [
                            {
                                "value": 0,
                                "score": 1
                            }
                        ]
                    }
                },
                "language": [
                    "English"
                ],
                "medium": [
                    "English"
                ],
                "mimeType": "application/vnd.sunbird.question",
                "showHints": false,
                "media": [],
                "body": "<div class='question-body' tabindex='-1'><div class='mcq-title' tabindex='0'><p>2+2=?</p></div><div data-choice-interaction='response1' class='mcq-vertical'></div></div>",
                "editorState": {
                    "options": [
                        {
                            "answer": true,
                            "value": {
                                "body": "<p>4</p>",
                                "value": 0
                            }
                        },
                        {
                            "answer": false,
                            "value": {
                                "body": "<p>8</p>",
                                "value": 1
                            }
                        }
                    ],
                    "question": "<p>2+2=?</p>"
                },
                "templateId": "mcq-vertical",
                "createdOn": "2023-06-29T03:45:06.917+0000",
                "objectType": "Question",
                "interactions": {
                    "response1": {
                        "type": "choice",
                        "options": [
                            {
                                "label": "<p>4</p>",
                                "value": 0
                            },
                            {
                                "label": "<p>8</p>",
                                "value": 1
                            }
                        ],
                        "validation": {
                            "required": "Yes"
                        }
                    }
                },
                "gradeLevel": [
                    "Class 1"
                ],
                "primaryCategory": "Multiple Choice Question",
                "contentDisposition": "inline",
                "lastUpdatedOn": "2023-06-29T03:45:07.002+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",
                "solutions": {},
                "outcomeDeclaration": {
                    "maxScore": {
                        "cardinality": "single",
                        "type": "integer",
                        "defaultValue": 1
                    }
                },
                "qType": "MCQ",
                "maxScore": 1,
                "languageCode": [
                    "en"
                ],
                "versionKey": "1688010307002",
                "showFeedback": false,
                "license": "CC BY 4.0",
                "complexityLevel": [
                    "evaluate"
                ],
                "interactionTypes": [
                    "choice"
                ],
                "framework": "inquiry_k-12",
                "answer": "<div class='anwser-container'><div class='anwser-body'><p>4</p></div></div>",
                "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64",
                "compatibilityLevel": 5,
                "name": "MCQ-1",
                "board": "CBSE",
                "status": "Draft"
            }
        ],
        "count": 1
    }
}

Sample Request

{
  "request": {
    "search": {
      "identifier": [
        "do_1131687689003827201864",
        "do_0987632323234356522345"
      ]
    }
  }
}

Success result schema

Below is the list of possible fields which will occur in the question list API

AttributeTypeDescription

mimeType

string

MimeType of Question eg. application/vnd.sunbird.question

audience

Array of strings

List of Audience eg. Student/Teacher/Administrator

lastStatusChangedOn

string

Timestamp of last status change

createdBy

string

UserId of creator

compatibilityLevel

integer

compatibility Level

language

Array of string

Language of Question

lastUpdatedOn

string

Timestamp of last question update

name

string

Name of question

version

integer

Version number

license

string

License under it is created

framework

string

Framework in which questiton created

code

string

Unique code for question

objectType

string

Typeof object eg. Question

identifier

string

Unique identifier of Question

languageCode

Array of strings

List of language codes

channel

string

Channel ID from which question is belongs to

visibility

string

visibility of question eg. Parent/Default

versionKey

string

Uniuque version key of question for specific version

status

string

Staus or state of the question eg. Draft/Review/Live

createdOn

string

Timestamp of creation of question

primaryCategory

string

Main category of question eg. Multiple Choice Question/ Subjective Questions

cURL

curl --location -g --request POST '{{host}}/question/v2/list' \
  -H 'Content-Type: application/json' \
  --data-raw '{"request":{"search":{"identifier":["question_id_1","question_id_2"]}}}' \
  --compressed

Last updated