Import QuestionSet

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

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

POST /questionset/v1/import

• The endpoint for Import QuestionSet is /questionset/v1/import • It points to inquiry-api-service (assessment service) - /questionset/v4/import • All parameters marked with * are mandatory. You must provide values for these parameters. • Mandatory fields cannot be null or empty.

Path Parameters

NameTypeDescription

Content-Type*

String

The Content-Type entity is the media type of the resource. The possible media types can be: Application/json

Authorization*

String

You require authorization to make use of the API. 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.

Request Body

NameTypeDescription

request*

Object

The body is the representation of the resource object for importing a question set

{
  "id": "api.questionset.import",
  "ver": "3.0",
  "ts": "2020-12-17T16:29:11ZZ",
  "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": {
    "questionset": [
      {
        "source": "https://dock.sunbirded.org/api/questionset/v1/read/do_1132613027022684161119",
        "metadata": {
          "framework": "ekstep_ncert_k-12",
          "channel": "01309282781705830427",
          "name": "QustionSet-1",
          "code": "9ae33d1e-a682-f30c-04b5-9bda236650ac",
          "lastPublishedBy": "5a587cc1-e018-4859-a0a8-e842650b9d64"
        },
        "collection": [
          {
            "identifier": "do_11324642736155033614",
            "unitId": "do_11324642761348710417"
          }
        ]
      }
    ]
  }
}

Request schema

AttributeDescriptionType

source

Represents the source of questionset object

string

metadata

Represents the additional metadata for the questionset object

Object

collection

Represents the collection with which Questionset can be linked.

Array of strings

Success result schema

AttributeTypeDescription

processId

String

Unique process ID

cURL

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

Last updated