Docs home

Get Attempt Details

Returns one attempt at an exercise or assignment: the learner's answers and uploaded files, marks, tutor feedback and grading status. Use it to pull submission details into another system.

GET/assignment/pasttest/{attemptId}
Get Attempt Details
curl --request GET \
  --url 'https://<your-api-host>/nuSource/api/v1/assignment/pasttest/{attemptId}' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>'
{
  "code": 200,
  "message": "success",
  "exercise": {
    "attempt_id": 3047,
    "exercise_id": 891,
    "user_attempts": 1,
    "user_highest_mark": 0,
    "user_best_time": 0,
    "passed_earned": 0,
    "perfected_earned": 0,
    "speedrun_earned": 0,
    "hardworker_earned": 0,
    "perfectionist_earned": 0,
    "mark": 0,
    "evaluation_time": 1752487667,
    "user_test_time": 0,
    "curr_speedrun": 0,
    "curr_hardworker": 0,
    "curr_perfectionist": 0,
    "is_finalized": 0,
    "student_comments": "<p>Demo Subscsioj</p>\n",
    "faculty_comments": "",
    "class_id": 2754,
    "master_batch_id": 1536,
    "user_id": 1,
    "grade_range": null,
    "is_woolf_accredited": 0,
    "file_details": [
      {
        "name": "0118_Margin_of_Safety_Risk_Averse_Value_Investing_Strategies_for.pdf",
        "file_path": "https://d15g8b7hr8be7w.cloudfront.net/User(168520)/Course(1270)/Section(5447)/Exercise(891)/Attempt(3047)/125978-0118_Margin_of_Safety_Risk_Averse_Value_Investing_Strategies_for.pdf?Expires=1784023819&Signature=i7kHYKqJPqpJrGECMK77Oxjy5yVAHS2KpAXuBxzb-FZwc3G0kE57fc39LGmniMj9AJqb6udT2ufJ1uBmiNxyTNclNAXtOniFmROwWWxPXEIyULXDxsU14A-APPkTOdNryQK1xoFwAFOXXbPFg2PBZIEjuIp5bR8X96qpUSRHNHQw81uwQ2K9Nw7NryzJriwC~C40cv4GtO1N5ZU52M9EESnewGG6OFd4Cm0i-hX-30-26~~-pJ9mJjTtHEwf13L75g2twEvrPGcERcqDtl8ZfhDfiU1~fYFYLlNliDprRSRRTyqysUZMH2Ev0xhXd9M8bjlVPEBAONh6MtHX3cUanA__&Key-Pair-Id=APKAIIFZDCEANAVU2VTA"
      }
    ],
    "tutor_file_details": [],
    "exercise_name": "assignment",
    "is_psycological": 0,
    "sound_play_times": null,
    "max_marks": 40,
    "is_assignment": 1,
    "exam_type": 2,
    "instructions": "<p><br></p>",
    "sound_url": "",
    "learner_id": 168520,
    "exercise_file_details": [
      {
        "name": "pdf_file_type.pdf",
        "file_path": "https://d15g8b7hr8be7w.cloudfront.net/User(1)/Course(1270)/Section(5447)/Exercise(891)/Assignment/115054-pdf_file_type.pdf?Expires=1784023819&Signature=NedORQDXx2SyDfDF0OLvSUxm5EezaCo9Sl4V3J6Dnnk53dRTA9KHCmy25F7ghBCvbD6Oj-DwlRv4GOS6~SeZs~szKsZ3nrzy-P9~xgCFls1gCDwN9mlP4tmhZ4iNJaQSWao7YuHjy6fu4VBYvt1d0TdffZGYvFMQhIHXli0UWUI13Pi04gfcqfpYBZS4Pa9dE3XqUaodxN5vSjSxwbzybsrF95qpcpF-w~Ha43bHvJ58FzEbRac3Rng9L4sTBNTojiN08MTf2blkn48fSZw~roGZH4U-n3R5BNzPc5~EJjEuPVXaYwlQIrUbhkBi4XpZCTRXnI2yE9iEur9iVHVZDA__&Key-Pair-Id=APKAIIFZDCEANAVU2VTA",
        "file_size": 36838
      }
    ]
  }
}

Access: Any signed-in member of the organization. Learners can only read their own attempts; everyone else can read attempts in batches of their organizations.

Path parameters
attempt_idintegerrequired
The attempt (submission) ID.
Response200application/json
codeinteger
Example: 200
messagestring
Example: success
exerciseobject
Show child attributesHide child attributes
Example: 3047
Example: 891
Attempts taken
Example: 1
Example: 0
Example: 0
Example: 0
Example: 0
Example: 0
Example: 1752487667
Example: 0
Example: 0
Example: 0
1 once graded
Example: 0
Example: <p>Demo Subscsioj</p>
Example: 2754
Example: 1536
Example: 1
Files the learner uploaded, with temporary download links
Show child attributesHide child attributes
Files the tutor attached
Example: assignment
Example: 0
Example: 40
0 exercise, 1 assignment, 2 programming assignment
Example: 1
Example: 2
Example: <p><br></p>
Example: 168520
Files attached to the assignment itself
Show child attributesHide child attributes
Example: pdf_file_type.pdf

Notes: user_id in the response is the caller's own ID, not the learner's; use learner_id. File links expire. Error "Attempt not found. Please try again." when the attempt doesn't exist or you can't see it. Rate limit: 30 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI