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/v1/read/{Question_Id}

• It points to inquiry-api-service (assessment service) - /question/v4/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": "3.0",
  "ts": "2022-12-22T10:50:02ZZ",
  "params": {
    "resmsgid": "47933f43-3aa0-42cf-8eda-495993039869",
    "msgid": null,
    "err": null,
    "status": "successful",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "question": {
      "copyright": "NIT123",
      "subject": [
        "Mathematics"
      ],
      "isReviewModificationAllowed": false,
      "responseDeclaration": {
        "response1": {
          "maxScore": 2,
          "cardinality": "single",
          "type": "integer",
          "correctResponse": {
            "value": "0",
            "outcomes": {
              "SCORE": 2
            }
          },
          "mapping": [

          ]
        }
      },
      "mimeType": "application/vnd.sunbird.question",
      "body": "<div class='question-body' tabindex='-1'><div class='mcq-title' tabindex='0'><p>color of apple is ?</p></div><div data-choice-interaction='response1' class='mcq-vertical'></div></div>",
      "editorState": {
        "options": [
          {
            "answer": true,
            "value": {
              "body": "<p>red</p>",
              "value": 0
            }
          },
          {
            "answer": false,
            "value": {
              "body": "<p>blue</p>",
              "value": 1
            }
          },
          {
            "answer": false,
            "value": {
              "body": "<p>green</p>",
              "value": 2
            }
          },
          {
            "answer": false,
            "value": {
              "body": "<p>yellow</p>",
              "value": 3
            }
          }
        ],
        "question": "<p>color of apple is ?</p>"
      },
      "templateId": "mcq-vertical",
      "gradeLevel": [
        "Class 2"
      ],
      "primaryCategory": "Multiple Choice Question",
      "identifier": "do_11365083124405043211564",
      "author": "n11@yopmail.com",
      "solutions": [

      ],
      "qType": "MCQ",
      "maxScore": 2,
      "languageCode": [
        "en"
      ],
      "interactionTypes": [
        "choice"
      ],
      "name": "MCQ",
      "topic": [
        "Identify Non Linear Shapes",
        "Counting in Groups",
        "Addition and Subtraction of Two Digit Numbers",
        "Patterns",
        "Concept of Units and Number System",
        "Addition",
        "Weights",
        "Different Lines and their Directions",
        "Counting in Tens",
        "Volumes and Capacity",
        "Days, Weeks, Months",
        "Grouping and Counting",
        "Length",
        "Shapes",
        "Addition through Carry Forward"
      ],
      "medium": [
        "English"
      ],
      "media": [

      ],
      "interactions": {
        "response1": {
          "type": "choice",
          "options": [
            {
              "label": "<p>red</p>",
              "value": 0
            },
            {
              "label": "<p>blue</p>",
              "value": 1
            },
            {
              "label": "<p>green</p>",
              "value": 2
            },
            {
              "label": "<p>yellow</p>",
              "value": 3
            }
          ]
        }
      },
      "bloomsLevel": "knowledge",
      "answer": "0",
      "board": "CBSE"
    }
  }
}

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/v1/read/{{question_id}}' \
--header 'Authorization: Bearer {{api_key}}

Sample curl to read specific metadata

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

Last updated