Create QuestionSet

This API is used to create a question set on the Sunbird-inQuiry Platform.

This API is used to create a question set on the Sunbird-inQuiry Platform.

POST /questionset/v1/create

• The endpoint for Create QuestionSet is /questionset/v1/create • It points to inquiry-api-service (assessment service) - /questionset/v4/create • It is mandatory to provide values for parameters marked with * • Mandatory fields cannot be null or empty.

Headers

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

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.

Request Body

NameTypeDescription

request*

Object

The body is the representation of the resource object for creating questionset

{
  "id": "api.questionset.create",
  "ver": "3.0",
  "ts": "2021-02-03T08:17:28ZZ",
  "params": {
    "resmsgid": "4c45a5e2-c3b4-47c1-95a2-3a31f7e7c1ca",
    "msgid": null,
    "err": null,
    "status": "successful",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "identifier": "do_113208291312132096114",
    "versionKey": "1612340248069"
  }
}

Sample Request

{
  "request": {
    "questionset": {
      "code": "asa1212",
      "mimeType": "application/vnd.sunbird.questionset",
      "primaryCategory": "Practice Question Set",
      "name": "Test Question Set"
    }
  }
}

Request Schema

AttributeTypeDescriptionRequired

name

String

Represents the name of the questionset

Yes

code

String

Represents the unique code for the questionset

Yes

mimeType

String

questionset mime type

Yes

primaryCategory

String

PrimaryCategory agains which questionset schema will be validated

Yes

Success result schema

AttributeTypeDescription

identidier

String

Unique Question identifier

versionKey

String

Unique version key for question

cURL

curl --location -g --request POST '{{host}}/questionset/v1/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{api_key}}' \
--header 'X-Channel-Id: {{channel_id}}' \
--data-raw '{
    "request": {
        "questionset": {
            "code": "skhasa3232",
            "mimeType": "application/vnd.sunbird.questionset",
            "primaryCategory": "Practice Question Set",
            "name": "Test Question Set"
        }
    }
}'

Complete example

The following request is to create a question set object with basic information. To add additional metadata, and questions, please use the question-set update hierarchy API.

{
  "request": {
    "questionset": {
      "name": "My QuestionSet",
      "mimeType": "application/vnd.sunbird.questionset",
      "primaryCategory": "Practice Question Set",
      "createdBy": "5a587cc1-e018-4859-a0a8-e842650b9d64",
      "createdFor": [
        "01309282781705830427"
      ],
      "framework": "inquiry_k-12",
      "code": "7d5aaa70-ffb8-d062-ba10-1db445a11dbc"
    }
  }
}

Last updated