# Review QuestionSet

## This API is used to send question set for review on the Sunbird-inQuiry Platform.

<mark style="color:green;">`POST`</mark> `/review/{QuestionSet_Id}`

• The <mark style="color:orange;">/review/{QuestionSet\_Id}</mark> endpoint executes the "***Submit for Review***" request based on parameters provided as metadata in the request body. \
• It points to inquiry-api-service (assessment service) - <mark style="color:orange;">/questionset/v4/review</mark>\
• You need to provide a valid QuestionSet Id value in <mark style="color:orange;">{QuestionSet\_Id}</mark> field of the API URL. \
• It is mandatory to provide values for parameters marked with <mark style="color:red;">\*</mark>\
• Mandatory fields cannot be null or empty.

#### Path Parameters

| Name                                              | Type   | Description                                       |
| ------------------------------------------------- | ------ | ------------------------------------------------- |
| QuestionSet\_Id<mark style="color:red;">\*</mark> | String | Append a valid Question Set Id To the Request URL |

#### Headers

| Name                                            | Type   | Description                                                                                                                                                                                                                                                    |
| ----------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | String | The Content-Type entity is the media type of the resource. Possible media types can be: <mark style="color:green;">Application/json</mark>                                                                                                                     |
| Authorization<mark style="color:red;">\*</mark> | String | <p>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.</p><p>Set <mark style="color:green;">Bearer {{api\_key}}</mark></p> |
| x-channel-id                                    | String | Unique identification number associated with a root organization.                                                                                                                                                                                              |

#### Request Body

| Name    | Type   | Description                                               |
| ------- | ------ | --------------------------------------------------------- |
| request | Object | It contains metadata about the questionset to be updated. |

{% tabs %}
{% tab title="200: OK  The 'Review Question Set' operation failed ! The possible reason for failure is that you may have missed providing input for a mandatory parameter." %}

```javascript
{
  "id": "api.questionset.review",
  "ver": "3.0",
  "ts": "2021-02-03T09:30:21ZZ",
  "params": {
    "resmsgid": "679a458f-cd12-4dee-a6b4-5aea11fbe426",
    "msgid": null,
    "err": null,
    "status": "successful",
    "errmsg": null
  },
  "responseCode": "OK",
  "result": {
    "identifier": "do_113208323801554944120",
    "versionKey": "1612344214060"
  }
}
```

{% endtab %}

{% tab title="400: Bad Request The 'Review Question Set' operation failed ! The possible reason for failure is that you may have missed providing input for a mandatory parameter." %}

```javascript
{
  "id": "api.questionset.review",
  "ver": "3.0",
  "ts": "2021-02-03T09:33:32ZZ",
  "params": {
    "resmsgid": "95670d2a-764c-489f-bf27-b4acedc4b465",
    "msgid": null,
    "err": "ERR_QUESTION_SET_REVIEW",
    "status": "failed",
    "errmsg": "A question set with status other than Draft can't be sent for review."
  },
  "responseCode": "CLIENT_ERROR",
  "result": {
    "messages": null
  }
}
```

{% endtab %}

{% tab title="404: Not Found The Send Question Set for Review operation failed! The possible reason for failure is that you may have provided wrong question set ID." %}

```javascript
{
  "id": "api.questionset.review",
  "ver": "3.0",
  "ts": "2021-02-02T20:07:24ZZ",
  "params": {
    "resmsgid": "852b878c-a607-4d72-9458-6239e36adb9e",
    "msgid": null,
    "err": "NOT_FOUND",
    "status": "failed",
    "errmsg": "Error! Node(s) does not exist. | [Invalid Node Id.]: do_1132079319215554561111"
  },
  "responseCode": "RESOURCE_NOT_FOUND",
  "result": {
    "messages": null
  }
}
```

{% endtab %}

{% tab title="500: Internal Server Error Looks like something went wrong! We track these errors automatically" %}

```javascript
{
  "id": "api.questionset.review",
  "ver": "3.0",
  "ts": "2021-02-02T20:07:24ZZ",
  "params": {
    "resmsgid": "852b878c-a607-4d72-9458-6239e36adb9e",
    "msgid": null,
    "err": "NOT_FOUND",
    "status": "failed",
    "errmsg": "Error! Node(s) does not exist. | [Invalid Node Id.]: do_1132079319215554561111"
  },
  "responseCode": "RESOURCE_NOT_FOUND",
  "result": {
    "messages": null
  }
}
```

{% endtab %}
{% endtabs %}

#### Success result schema

<table><thead><tr><th width="154.33333333333331">Attribute</th><th width="257">Type</th><th>Description</th></tr></thead><tbody><tr><td>identidier</td><td>String</td><td>Unique Question identifier</td></tr><tr><td>versionKey</td><td>String</td><td>Unique version key for question</td></tr></tbody></table>

#### cURL

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://inquiry.sunbird.org/learn/product-and-developer-guide/question-and-question-set-service/apis/v1/questionset-apis/review-questionset.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
