text_image_assetstring
Image attached to the question. Format unclear from code.
Creates a multiple-inputs question (several typed answers in one question) in a question bank. All question types use this same endpoint; only `input_type` and `options` change.
/questionscurl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/questions' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={"question_list_id":12,"question_JSON":[" "],"input_JSON":[{"input_type":4,"question_string":"<p>Demo For Fill In Mulitple Inputs</p>","options":[],"marks":"1.00","neg_mark":0,"hint":"","explanation":"","opposite_marking":0}],"sound_play_times":-1,"difficulty":1}'{
"code": 200,
"message": "Question Created",
"question": {
"question_id": 1469,
"question_JSON": "[\" \"]",
"input_JSON": "[{\"input_type\":4,\"question_string\":\"<p>Demo For Fill In Mulitple Inputs<\\/p>\",\"options\":[],\"marks\":\"1.00\",\"neg_mark\":0,\"hint\":\"\",\"explanation\":\"\",\"opposite_marking\":0}]",
"answer_JSON": "[{\"answer\":[],\"explanation\":\"\"}]",
"question_list_id": 12,
"sound_asset": ""
}
}Example input_JSON for this type: [{"input_type": 4, "question_string": "<p>Fill each box</p>", "options": [], "marks": 1}]. For this type question_string may also be an array of text pieces around the blanks, and the first entry of options is stored as the answer.
Access: Institute admins, admins and tutors, plus custom roles with question bank or curriculum manage permission.
Request body: form-data with one field, JSONString, containing this JSON:
JSONString[" "] if not needed.1 Easy, 2 Medium, 3 Hard. Defaults to the bank's difficulty.1.custom_field_id and field_value. Unknown field IDs and empty values are ignored.-1 (no limit).1 marks the question as AI-generated. Default 0.Fields in each input_JSON object:
| Name | Required | Type | Description |
|---|---|---|---|
| input_type | Yes | integer | 0 Single correct, 1 Multiple correct, 2 Fill in the blanks, 3 English transcription, 4 Multiple inputs, 5 Subjective, 6 True/False, 7 Psychological (1 to 5 scale). |
| question_string | Yes | string | Question text, HTML allowed. Cannot be empty. |
| options | Yes | array | Answer options; shape depends on input_type (see Notes). |
| marks | No | number | Marks for a correct answer. Must be 0 or more. Default 1. Rounded to 2 decimals. |
| neg_mark | No | number | Marks deducted for a wrong answer, e.g. -0.25. Default 0. |
| hint | No | string | Hint shown to the learner, HTML allowed. |
| explanation | No | string | Explanation of the answer, HTML allowed. Stored with the answer key. |
| opposite_marking | No | integer | Purpose unclear from code; the app sends 0. |
200Question Created[" "][{"answer":[],"explanation":""}]12Notes:
0), Multiple correct (1) and True/False (6): an array of { "index": 0, "option_string": "<p>…</p>", "is_correct": true }, at least 2 options, every option_string non-empty, and at least one marked is_correct. Fill in the blanks (2): one array of accepted answers per blank, e.g. [["Delhi", "New Delhi"]]. Subjective (5): [[]].is_correct flags are moved out of the options into the answer key, so learners never receive them.