❔
Sunbird inQuiry
  • LEARN
    • Overview
    • Capabilities
    • Components
    • Technical Architecture
    • Product & Developer Guide
      • Quick Starter Guide
        • inQuiry Components
          • Editor
          • Player
          • inQuiry Service
      • Question & Question Set Editor
        • Architecture
        • Features
        • Configuration
        • Source Code
        • APIs
        • FAQ's
      • Question & Question Set Service
        • Architecture
        • Features
        • Schema
          • Question Schema
          • QuestionSet Schema
        • APIs
          • V1
            • Question API's
              • Create Question
              • Read Question
              • Read Private Question
              • Update Question
              • Submit for Review Question
              • Publish Question
              • Retire Question
              • Question List
              • Import Question
              • Copy Question
              • Reject Question
            • QuestionSet API's
              • Create QuestionSet
              • Update QuestionSet
              • Read QuestionSet
              • Read Private QuestionSet
              • Review QuestionSet
              • Reject QuestionSet
              • Publish QuestionSet
              • Retire QuestionSet
              • Update Hierarchy QuestionSet
              • Read QuestionSet Hierarchy
              • Import QuestionSet
              • Copy QuestionSet
          • V2
            • Question API's
              • Create Question
              • Read Question
              • Read Private Question
              • Update Question
              • Submit for Review Question
              • Reject Question
              • Publish Question
              • Copy Question
              • Import Question
              • Question List
              • Retire Question
            • QuestionSet API's
              • Create QuestionSet
              • Read QuestionSet
              • Read Private QuestionSet
              • Update QuestionSet
              • Review QuestionSet
              • Reject QuestionSet
              • Publish QuestionSet
              • Update Hierarchy QuestionSet
              • Read QuestionSet Hierarchy
              • Import QuestionSet
              • Copy QuestionSet
              • Retire QuestionSet
        • Configuration
        • Source Code
        • FAQs
      • Question Set Player
        • Architecture
        • Configuration
        • Source Code
        • APIs
        • FAQ's
      • Analytics
      • Code Coverage Stats
    • 🚀Product Roadmap
  • ENGAGE
    • Discuss
  • Use
    • Overview
    • Developer Installation
      • Question & Question Set Service
        • Installation
        • Configuration
      • Question Set Editor
        • Installation
          • Object Category Definition
          • Sample Form Configuration
      • Question set Player
        • Installation
    • Release Plan & Calendar
      • Release calendar 5.2.0, 5.3.0, 5.4.0, 5.5.0, 5.6.0
      • Release calendar 5.7.0, 6.0.0,6.1.0 and 6.2.0
    • Release notes
      • inQuiry - Release v8.0.0 (Ongoing)
      • inQuiry - Release v7.0.0 (Latest)
      • inQuiry - Release v6.2.0
      • inQuiry - Release v6.1.0
      • inQuiry - Release v6.0.0
      • inQuiry - Release v5.7.0
      • inQuiry - Release v5.6.0
      • inQuiry - Release v5.5.0
      • inQuiry - Release v5.4.0
      • inQuiry - Release v5.3.0
      • inQuiry - Release v5.2.0
      • inQuiry - Release v5.1.0
      • inQuiry - Release v5.0.0
      • inQuiry - Release V 4.10.0
      • inQuiry - Release V 4.9.0
      • inQuiry - Release V 4.8.0
      • inQuiry - Release V 4.7.0
    • Deprecations
      • Release-5.6.0 (upcoming)
      • Release-5.5.0
    • Learn More
      • Dependencies
      • Delete User Functionality
        • User PII Cleanup
        • Asset Ownership Transfer
  • Guidelines or Best practices
    • Testing QA guidelines
    • Developer coding guidelines
  • Archived
    • Use Cases
    • Components
    • Server Installation
    • Capabilities
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. LEARN
  2. Product & Developer Guide
  3. Question & Question Set Service
  4. APIs
  5. V1
  6. Question API's

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

Name
Type
Description

Question_Id*

String

Append a valid Question ID To the Request URL

Query Parameters

Name
Type
Description

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

Name
Type
Description

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"
    }
  }
}
{
  "id": "api.question.read",
  "ver": "3.0",
  "ts": "2021-02-02T20:01:13ZZ",
  "params": {
    "resmsgid": "815b341a-7984-45a1-b1f9-4335da18985e",
    "msgid": null,
    "err": "NOT_FOUND",
    "status": "failed",
    "errmsg": "Error! Node(s) doesn't Exists. | [Invalid Node Id.]: do_1132079240377466881101"
  },
  "responseCode": "RESOURCE_NOT_FOUND",
  "result": {
    "messages": null
  }
}
{
  "result": {},
  "id": "string",
  "ver": "string",
  "ts": "string",
  "params": {
    "resmsgid": "string",
    "msgid": "string",
    "err": "string",
    "status": "string",
    "errmsg": "string"
  },
  "responseCode": "string"
}

Success Result Schema

Attribute
Type
Description

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}}
PreviousCreate QuestionNextRead Private Question

Last updated 2 years ago

Was this helpful?