Get Test All Parts
Returns a test's settings and its parts, with the question banks each part draws questions from. Use the `test_id` of an exercise or quiz (returned by "Get Exercise Details") to see how the test is built.
GET
/test/partsGet Test All Parts
curl --request GET \
--url 'https://<your-api-host>/nuSource/api/v1/test/parts?test_id=<testId>' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>'{
"code": 200,
"message": "Success",
"test": [
{
"test_id": "1219",
"creator_id": "1",
"org_id": "27",
"test_name": "MyTest 1",
"instructions": "<p>DemoTest</p>\n",
"display_index": "1219",
"num_parts": "1",
"num_questions": "0",
"display_type": "0",
"use_exercise_data": "1",
"sound_asset": null,
"sound_play_times": "-1",
"video_asset": null,
"text_image_asset": null,
"create_date": "1652940429",
"last_updated": "1652940429",
"section_id": "0",
"course_id": "300",
"pass_mark": "50",
"test_type": "",
"require_capitals": "0",
"perfectionist": "0",
"hardworker": "0",
"speedrun": "0",
"speedrun_time_sec": "0",
"test_tag": "",
"default_display": "0",
"numbering_scheme": "0",
"is_parts_timed": "0",
"is_parts_locked": "1"
}
],
"test_parts": [
{
"test_part_id": "1312",
"test_part_name": "Part A",
"tp_randomize": "1",
"randomize_options": "0",
"instructions": "",
"part_time": "0",
"num_questions": "0",
"total_questions": "0",
"num_questionBanks": "1",
"max_questions_allowed": "0",
"q_banks": [
{
"test_part_id": "1312",
"test_question_list_id": "630",
"num_questions": "-1",
"randomize": "0",
"ql_index": "630",
"question_list_id": "228",
"question_list_name": "4443",
"total_questions": "0",
"question_ids": null,
"max_questions_allowed": "0"
}
]
}
]
}Access: Institute admins and tutors, plus custom roles that can view curriculum. The test must belong to your institute.
Query parameters
The test to read.
Response
codeinteger
Example:
200messagestring
Example:
Successtestobject[]
An array with one object holding the test's settings
Show child attributesHide child attributes
test.test_idstring
Example:
1219test.creator_idstring
Example:
1test.org_idstring
Example:
27test.test_namestring
Example:
MyTest 1test.display_indexstring
Example:
1219test.num_partsstring
Example:
1test.display_typestring
Example:
0test.use_exercise_datastring
Example:
1test.sound_assetnull
test.sound_play_timesstring
Example:
-1test.video_assetnull
test.create_datestring
Example:
1652940429test.section_idstring
Example:
0test.course_idstring
Example:
300test.test_typestring
test.require_capitalsstring
Example:
0test.perfectioniststring
Example:
0test.hardworkerstring
Example:
0test.speedrunstring
Example:
0test.speedrun_time_secstring
Example:
0test.test_tagstring
test.default_displaystring
Example:
0test.numbering_schemestring
Example:
0test.is_parts_timedstring
Example:
0test_partsobject[]
One object per part, in display order
Show child attributesHide child attributes
test_parts.test_part_idstring
Example:
1312Example:
Part Atest_parts.tp_randomizestring
Example:
1test_parts.instructionsstring
HTML
test_parts.part_timestring
Example:
0Example:
1Example:
0test_parts.q_banksobject[]
Show child attributesHide child attributes
Example:
1312Example:
630Example:
0Example:
630Example:
228Example:
4443Example:
0Notes: Numbers in test and test_parts come back as strings ("test_id": "1219"). Fails with "Not Authorized" if the test doesn't exist or belongs to another institute. Rate limit: 30 requests per minute; going over locks you out for 30 minutes.