Docs home

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/parts
Get 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
test_idintegerrequired
The test to read.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Success
testobject[]
An array with one object holding the test's settings
Show child attributesHide child attributes
Example: 1219
Example: 1
Example: 27
Example: MyTest 1
HTML
Example: <p>DemoTest</p>
Example: 1219
Example: 1
Questions drawn into the part
Example: 0
Example: 0
Example: 1
Example: -1
Example: 1652940429
Unix timestamps
Example: 1652940429
Example: 0
Example: 300
Percent
Example: 50
Example: 0
Example: 0
Example: 0
Example: 0
Example: 0
Example: 0
Example: 0
Example: 0
0/1
Example: 1
test_partsobject[]
One object per part, in display order
Show child attributesHide child attributes
Example: 1312
Example: Part A
Example: 1
0/1
Example: 0
Example: 0
Questions drawn into the part
Example: 0
Questions available in its banks
Example: 0
Show child attributesHide child attributes
Questions drawn into the part
Example: -1
Example: 630
Questions available in its banks
Example: 0

Notes: 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.

Updated yesterday

Ask AI