Read Question

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

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

GET /question/v2/read/{question_id}

ā€¢ It points to inquiry-api-service (assessment service) - /question/v5/read ā€¢ You need to provide a valid Question Id value in {question_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

NameTypeDescription

question_id*

String

Append a valid Question ID To the Request URL

Query Parameters

NameTypeDescription

mode=edit

String

To fetch the latest version of node from the database for edit purpose

fields=comma separated metadata names

String

To fetch the specific fields, this query parameter can be used eg. fields=name,body,answer...

Headers

NameTypeDescription

Content-Type

String

The Content-Type entity is the media type of the resource. It should 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.question.read",
    "ver": "5.0",
    "ts": "2023-06-29T03:49:09ZZ",
    "params": {
        "resmsgid": "8b56f8d3-4bba-4040-903d-1d8cbd01658a",
        "msgid": null,
        "err": null,
        "status": "successful",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
        "question": {
            "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: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",
            "qType": "MCQ",
            "maxScore": 1,
            "languageCode": [
                "en"
            ],
            "versionKey": "1688010307002",
            "showFeedback": false,
            "license": "CC BY 4.0",
            "complexityLevel": [
                "evaluate"
            ],
            "interactionTypes": [
                "choice"
            ],
            "framework": "inquiry_k-12",
            "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64",
            "compatibilityLevel": 5,
            "name": "MCQ-1",
            "board": "CBSE",
            "status": "Draft"
        }
    }
}

Success Result Schema

AttributeTypeDescription

identifier

string

Unique Question Identifier

name

string

Question name

versionKey

string

Question versionKey

code

string

Unique Question code

lastStatusChangedOn

string

Last status changed time

visibility

string

Question visibility eg. parent

mimeType

string

Question mimeType eg. application/vnd.sunbird.question

createdOn

string

Question createdOn Time

objectType

string

Question objectType

primaryCategory

string

Type of question (Multiple Choice Question or Subjective Question)

lastUpdatedOn

string

Question lastUpdatedOn

status

string

Question status Draft/Review/Live

cURL

sample curl to read the metadata

curl --location -g --request GET '{{host}}/question/v2/read/{{question_id}}' \
--header 'Authorization: Bearer {{api_key}}

Sample curl to read specific metadata

curl --location -g --request GET '{{host}}/question/v2/read/{{question_id}}?fields=name,body,responseDeclaration,outcomeDeclaration' \
--header 'Authorization: Bearer {{api_key}}

Last updated