Reject Question
This API is used to reject the questions on the Sunbird-inQuiry Platform.
This API is used to reject the questions on the Sunbird-inQuiry Platform.
DELETE /question/v2/reject/{question_id}
• /question/v2/reject/{question_id} endpoint executes the "Reject Question" request based on parameters provided as metadata in the request body • This API is used to send back the question to the creator by the reviewer. The API changes the question object status from review to draft. • It points to inquiry-api-service (assessment service) - /question/v5/reject • It is mandatory to provide values for parameters marked with *. • Mandatory fields cannot be null or empty.
Path Parameters
question_id*
String
Append a valid Question ID To the Request URL
Headers
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
request*
Object
Metadata about the question to be rejected.
{
"id": "api.question.reject",
"ver": "5.0",
"ts": "2023-06-29T03:37:12ZZ",
"params": {
"resmsgid": "70dc4cef-b7d0-4794-ae78-e80cc85b4770",
"msgid": null,
"err": null,
"status": "successful",
"errmsg": null
},
"responseCode": "OK",
"result": {
"identifier": "do_11336893480941158415",
"versionKey": "1634627965206"
}
}{
"id": "api.question.reject",
"ver": "5.0",
"ts": "2023-06-29T03:37:12ZZ",
"params": {
"resmsgid": "415e19d2-01e3-4690-b5c7-040316c56f5b",
"msgid": null,
"err": "ERR_QUESTION_REJECT",
"status": "failed",
"errmsg": "Question is not in Review state for identifier: do_11336893480941158415"
},
"responseCode": "CLIENT_ERROR",
"result": {
"messages": null
}
}{
"id": "api.question.reject",
"ver": "5.0",
"ts": "2023-06-29T03:37:12ZZ",
"params": {
"resmsgid": "da7af22e-bdce-48f0-8743-f50fa6c2cd21",
"msgid": null,
"err": "NOT_FOUND",
"status": "failed",
"errmsg": "Error! Node(s) does not Exist. | [Invalid Node Id.]: do_11336893480941158908"
},
"responseCode": "RESOURCE_NOT_FOUND",
"result": {
"messages": null
}
}{
"id": "api.question.reject",
"ver": "5.0",
"ts": "2023-06-29T03:37:12ZZ",
"params": {
"resmsgid": "f234a6f0-3ac4-11eb-b0a2-8d5c9f561887",
"msgid": null,
"status": "failed",
"err": null,
"errmsg": null
},
"responseCode": "SERVER_ERROR",
"result": {}
}Success result schema
identifier
String
Unique Question identifier
versionKey
String
Unique version key for question
cURL
curl --location -g --request POST '{{host}}/question/v2/reject/{{question_id}}' \
--header 'Authorization: Bearer {{api_key}}' \
--header 'X-Channel-ID: {{channel_id}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"question": {
"rejectComment":"Rejected for testing"
}
}
}'Last updated
Was this helpful?