Copy QuestionSet

This API is associated with copying questionset on the Sunbird Platform.

This API is associated with copying questionset on the Sunbird Platform.

POST /questionset/v1/copy/{QuestionSet_Id}

ā€¢ The endpoint for Copy QuestionSet is /questionset/v1/copy ā€¢ It points to inquiry-api-service (assessment service) - /questionset/v4/copy ā€¢ You need to provide a valid Question Set Id value in {QuestionSet_Id} field of the API URL. ā€¢ All parameters marked with * are mandatory. You must provide values for these parameters. ā€¢ Mandatory fields cannot be null or empty.

Path Parameters

NameTypeDescription

QuestionSet_Id*

String

Append a valid QuestionSet Id to the Request URL

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

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 organisation.

Request Body

NameTypeDescription

request*

Object

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

{
    "id": "api.questionset.copy",
    "ver": "3.0",
    "ts": "2023-06-23T06:41:31ZZ",
    "params": {
        "resmsgid": "8bba3dda-f81e-4659-8c05-55caed20d174",
        "msgid": null,
        "err": null,
        "status": "successful",
        "errmsg": null
    },
    "responseCode": "OK",
    "result": {
        "node_id": {
            "do_2138240203066900481600": "do_2138240204082216961601"
        },
        "versionKey": "1687502491400"
    }
}

Sample Request

{
  "request": {
    "questionset": {
      "createdBy": "User001",
      "createdFor": [
        "Sunbird"
      ],
      "name": "Sunbird-QS"
    }
  }
}

Request schema

AttributeDescriptionType

createdBy

Represents the the user who triggered the copy operation

string

createdFor

Represents the organization on behalf the request was triggered

Object

name

Represents the collection with which Questionset can be copied.

string

Success result schema

AttributeTypeDescription

node_id

Array of Object

Node Ids that were copied

cURL

curl --location -g --request POST '{{host}}/questionset/v1/copy/{QuestionSet_Id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{api_key}}' \
--header 'X-Channel-Id: {{channel_id}}' \
--data-raw '{
  "request": {
    "questionset": {
      "createdBy": "User001",
      "createdFor": [
        "Sunbird"
      ],
      "name": "Sunbird-QS"
    }
  }
}'

Last updated