Publish QuestionSet

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

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

POST /questionset/v2/publish/{questionSet_id}

/questionset/v2/publish/{questionSet_id} endpoint executes the "Publish QuestionSet" request based on parameters provided as metadata in the request body. • It points to inquiry-api-service (assessment service) - /questionset/v5/publish/{questionSet_id} • It is mandatory to provide values for parameters marked with * • Mandatory fields cannot be null or empty. • Asynchronous flink job : async-questionset-publish will takes care of the publishing activity.

Path Parameters

NameTypeDescription

questionSet_id

String

Append a valid Question Set Id To the Request URL

Headers

NameTypeDescription

Content-Type*

String

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

Authorization*

String

All content APIs require authorization for use. Specify the authorization key received from the administrator when placing the request for use of the API. 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 publishing question set

{
  "id": "api.questionset.publish",
  "ver": "5.0",
  "ts": "2023-06-29T07:51:03ZZ",
  "params": {
    "resmsgid": "62f7e310-39e1-4287-bc9f-f8e6ac5f5bd3",
    "msgid": null,
    "err": null,
    "status": "successful",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "message": "QuestionSet is successfully sent for Publish",
    "identifier": "do_113208323801554944120"
  }
}

Request Sample

{
  "request": {
    "questionset": {
      "lastPublishedBy": "ae94b68c-a535-4dce-8e7a-fb9662b0ad68"
    }
  }
}

Success result schema

AttributeTypeDescription

identifier

String

Unique Question identifier

message

String

Publish success message

cURL

curl --location -g --request POST '{{host}}/questionset/v2/publish/{{questionSet_id}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{api_key}}' \
--header 'X-Channel-Id: {{channel_id}}' \
--data-raw '{
  "request": {
    "questionset": {}
  }
}'

Last updated