Docs home

Retrieve a Test

Returns the settings of one test (quiz) attached to a course: name, timing, attempts, availability, pass mark and the question bank it uses.

GET/quizzes/{quizid}
Retrieve a Test
curl --request GET \
  --url 'https://<your-api-host>/nuSource/api/v1/quizzes/{quizid}' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>'
{
  "code": 200,
  "message": "Success",
  "quiz": {
    "quiz_id": 529,
    "test_id": 1219,
    "quiz_name": "MyTest 1",
    "status": "draft",
    "instructions": "<p>DemoTest</p>\n",
    "course_id": 300,
    "test_time": 0,
    "attempts": 1,
    "sound_asset": null,
    "sound_play_times": -1,
    "availability": 0,
    "activate_at": 0,
    "deactivate_at": 0,
    "num_of_questions": 0,
    "randomize": null,
    "results_declared": 1,
    "exam_type": 1,
    "show_calculator": 0,
    "show_compiler": 0,
    "is_psycological": 0,
    "is_prerequisite": 0,
    "passing_mark": 70,
    "is_parts_timed": 0,
    "is_parts_locked": 1,
    "question_list_id": null
  }
}

Access: Any signed-in member of the organization. Tutors must be contributors on the course; learners must have access to it through a batch.

Path parameters
quiz_idintegerrequired
The test (quiz) ID.
Query parameters
class_idinteger
Batch (class) ID. Learners should send it: availability, prerequisites and attendance rules are checked for that batch.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Success
quizobject
Show child attributesHide child attributes
Example: 529
Example: 1219
Example: MyTest 1
draft or published
Example: draft
HTML
Example: <p>DemoTest</p>
Example: 300
Seconds, 0 untimed
Example: 0
-1 unlimited
Example: 1
Example: -1
1 open, 2 open until deactivate_at, 3 open between activate_at and deactivate_at, 4 closed; 0 not set
Example: 0
Example: 0
Unix timestamps
Example: 0
Example: 0
Example: 1
1 online, 2 paper-based
Example: 1
Example: 0
Example: 0
Example: 0
Example: 0
Example: 70
Example: 0
Example: 1

Notes: For learners the call fails when a prerequisite isn't completed or the test isn't available to them. Rate limit: 30 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI