Docs home

Get Exercise Details

Returns the settings of one exercise or assignment: timing, attempts, availability, marks, due dates and attached files. Learners also get their own progress.

GET/exercises/{exercise_id}
Get Exercise Details
curl --request GET \
  --url 'https://<your-api-host>/nuSource/api/v1/exercises/{exercise_id}' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>'
{
  "code": 200,
  "message": "Success",
  "exercise": {
    "exercise_id": 552,
    "test_id": 899,
    "exercise_name": "Exercise 1",
    "status": "published",
    "instructions": "<p><br></p>\n",
    "section_id": 521,
    "test_time": 0,
    "sound_asset": null,
    "sound_play_times": -1,
    "availability": 1,
    "activate_at": 0,
    "deactivate_at": 0,
    "num_of_questions": 1,
    "randomize": 0,
    "attempts": -1,
    "results_declared": 1,
    "exam_type": 1,
    "show_calculator": 0,
    "show_compiler": 0,
    "is_psycological": 0,
    "is_prerequisite": 0,
    "is_assignment": 0,
    "max_marks": 0,
    "passing_mark": 50,
    "is_parts_timed": 0,
    "is_parts_locked": 1,
    "question_list_id": 200,
    "file_details": []
  },
  "user_stats": []
}

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

Path parameters
exercise_idintegerrequired
The exercise ID.
Query parameters
class_idinteger
Batch (class) ID. Learners should send it so availability, due dates, attempts and prerequisites are worked out for that batch.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Success
exerciseobject
Show child attributesHide child attributes
Example: 552
Example: 899
Example: Exercise 1
draft or published
Example: published
HTML
Example: <p><br></p>
Example: 521
Seconds
Example: 0
Example: -1
1 open, 2 open until deactivate_at, 3 open between activate_at and deactivate_at, 4 closed
Example: 1
Example: 0
Example: 0
Example: 1
Example: 0
-1 unlimited
Example: -1
Example: 1
1 online, 2 paper-based
Example: 1
Example: 0
Example: 0
Example: 0
Example: 0
0 exercise, 1 assignment, 2 programming
Example: 0
Example: 0
Example: 50
Example: 0
Example: 1
Example: 200
Attached files with temporary links
For learners, their progress in this batch (times_taken, best_grade, passed, perfect, availability and due-date details, last_attempt in practice mode)

Notes: For learners the call fails when a prerequisite isn't met or the content isn't released yet (drip schedule). When class_id belongs to a batch, the call records this exercise as the learner's last viewed item. Error "You do not have the permission!" when the exercise can't be loaded. Rate limit: 30 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI