description |
---|
This API is used to publish the question set on the Sunbird-inQuiry Platform. |
{% swagger method="post" path="/questionset/v1/publish/QuestionSet_Id" baseUrl="" summary="This API is used to publish the question set on the Sunbird-inQuiry Platform." expanded="true" %} {% swagger-description %} •
/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/v4/publish/QuestionSet_Id
\
• It is mandatory to provide values for parameters marked with
*
\
• Mandatory fields cannot be null or empty. {% endswagger-description %}
{% swagger-parameter in="path" name="QuestionSet_Id" type="String" %} Append a valid Question Set Id To the Request URL {% endswagger-parameter %}
{% swagger-parameter in="header" name="Content-Type" type="String" required="true" %} The Content-Type entity is the media type of the resource. Possible media types can be:
Application/json
{% endswagger-parameter %}{% swagger-parameter in="header" name="Authorization" type="String" required="true" %} 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}}
{% endswagger-parameter %}{% swagger-parameter in="header" name="x-channel-id" type="String" %} Unique identification number associated with a root organization. {% endswagger-parameter %}
{% swagger-parameter in="body" name="request" type="Object" %} The body is the representation of the resource object for publishing question set {% endswagger-parameter %}
{% swagger-response status="200: OK" description="QuestionSet publish operation was successfully executed." %}
{
"id": "api.questionset.publish",
"ver": "3.0",
"ts": "2021-02-03T09:39:14ZZ",
"params": {
"resmsgid": "62f7e310-39e1-4287-bc9f-f8e6ac5f5bd3",
"msgid": null,
"err": null,
"status": "successful",
"errmsg": null
},
"responseCode": "OK",
"result": {
"message": "Question is successfully sent for Publish",
"identifier": "do_113208323801554944120"
}
}
{% endswagger-response %}
{% swagger-response status="404: Not Found" description="QuestionSet Send for publish operation failed !The possible reason for failure is that you may have provided wrong questionset id." %}
{
"id": "api.questionset.publish",
"ver": "3.0",
"ts": "2021-02-03T09:39:14ZZ",
"params": {
"resmsgid": "62f7e310-39e1-4287-bc9f-f8e6ac5f5bd3",
"msgid": null,
"err": null,
"status": "successful",
"errmsg": null
},
"responseCode": "OK",
"result": {
"message": "Question is successfully sent for Publish",
"identifier": "do_113208323801554944120"
}
}
{% endswagger-response %}
{% swagger-response status="500: Internal Server Error" description="Looks like something went wrong! We track these errors automatically" %}
{
"result": {},
"id": "string",
"ver": "string",
"ts": "string",
"params": {
"resmsgid": "string",
"msgid": "string",
"err": "string",
"status": "string",
"errmsg": "string"
},
"responseCode": "string"
}
{% endswagger-response %} {% endswagger %}
{
"request": {
"questionset": {
"lastPublishedBy": "ae94b68c-a535-4dce-8e7a-fb9662b0ad68"
}
}
}
Attribute | Type | Description |
---|---|---|
identidier | String | Unique Question identifier |
message | String | Publish success message |
curl --location -g --request POST '{{host}}/questionset/v1/publish/{{questionSet_id}}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{api_key}}' \
--header 'X-Channel-Id: {{channel_id}}' \
--data-raw '{
"request": {
"questionset": {}
}
}'