Docs home

Attach Question Bank to Online Exercise

Attaches a question bank to a part of an online exercise, so its questions appear in that exercise. You can get the list of question banks from the question bank list request in this collection.

POST/addexistingquesbank
Attach Question Bank to Online Exercise
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/addexistingquesbank' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --form 'JSONString={"question_list_id":36,"test_part_id":1548,"num_of_questions":-1}'
{
  "code": 200,
  "message": "Question bank added successfully !",
  "q_bank": {
    "question_list_id": 36,
    "question_list_name": "Subjective Questions for test",
    "test_question_list_id": 871,
    "randomize": null,
    "total_questions": null,
    "num_questions": 9
  }
}

Access: Institute admins, admins and tutors, plus custom roles with curriculum write permission.

Request body: form-data with one field, JSONString, containing this JSON:

BodyJSONString
question_list_idintegerrequired
Question bank to attach.
test_part_idintegerrequired
Part of the test or exercise to attach it to. A new test or exercise has one part, "Part A".
How many questions to use from the bank. Default -1 (all).
Response200application/json
codeinteger
Example: 200
messagestring
Example: Question bank added successfully !
q_bankobject
Show child attributesHide child attributes
Example: 36
Example: Subjective Questions for test
Keep it: you need it to remove the bank from the part later
Example: 871
Example: 9

Notes: The assessment's maximum marks are recalculated. Errors: "Question bank already added" when the bank is already in any part of the same assessment; "Invalid test part id"; "Invalid course id" when the part belongs to another institute. Rate limit: 30 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI