Import Question

This API is used to import Question from one instance to another instance of sunbird

This API is used to import Question from one instance to another instance of sunbird

POST /question/v2/import

ā€¢ /question/v2/import endpoint executes the "Import Question" request based on parameters provided as metadata in the request body ā€¢ It points to inquiry-api-service (assessment service) - /question/v5/import ā€¢ It is mandatory to provide values for parameters marked with * ā€¢ Mandatory fields cannot be null or empty.

Headers

Request Body

{
  "id": "api.question.import",
  "ver": "5.0",
  "ts": "2023-06-29T03:37:12ZZ",
  "params": {
    "resmsgid": "7cce8934-0a2f-46bf-a0ee-be5f49874cae",
    "msgid": null,
    "err": null,
    "status": "successful",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "processId": "80a765c7-2202-4b3f-b473-448b5c2cd20e"
  }
}

Sample Request

{
  "request": {
    "question": [
      {
        "source": "https://dock.sunbirded.org/api/question/v2/read/do_1132390225275781121622",
        "metadata": {
          "framework": "ekstep_ncert_k-12",
          "channel": "01309282781705830427",
          "name": "Question 1",
          "code": "9ae33d1e-a682-f30c-04b5-9bda236650ac",
          "lastPublishedBy": "5a587cc1-e018-4859-a0a8-e842650b9d64"
        },
        "collection": [
          {
            "identifier": "do_11324642736155033614",
            "unitId": "do_11324642761348710417"
          }
        ],
        "stage": "Review"
      }
    ]
  }
}

Success result schema

cURL

curl --location -g --request POST '{{host}}/question/v2/import' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{api_key}}' \
--header 'X-Channel-Id: {{channel_id}}' \
--data-raw '{
  "request": {
    "question": [
      {
        "source": "https://dock.sunbirded.org/api/question/v2/read/do_1132390225275781121622",
        "metadata": {
          "framework": "ekstep_ncert_k-12",
          "channel": "01309282781705830427",
          "name": "Question 1",
          "code": "9ae33d1e-a682-f30c-04b5-9bda236650ac",
          "lastPublishedBy": "5a587cc1-e018-4859-a0a8-e842650b9d64"
        },
        "collection": [
          {
            "identifier": "do_11324642736155033614",
            "unitId": "do_11324642761348710417"
          }
        ]
      }
    ]
  }
}'

Last updated