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
The attempt (submission) ID.
Response
codeinteger
Example:
200messagestring
Example:
successexerciseobject
Show child attributesHide child attributes
exercise.attempt_idinteger
Example:
3047exercise.exercise_idinteger
Example:
891exercise.user_highest_markinteger
Example:
0exercise.user_best_timeinteger
Example:
0exercise.passed_earnedinteger
Example:
0exercise.perfected_earnedinteger
Example:
0exercise.speedrun_earnedinteger
Example:
0exercise.hardworker_earnedinteger
Example:
0Example:
0exercise.markinteger
Example:
0exercise.evaluation_timeinteger
Example:
1752487667exercise.user_test_timeinteger
Example:
0exercise.curr_speedruninteger
Example:
0exercise.curr_hardworkerinteger
Example:
0exercise.curr_perfectionistinteger
Example:
0Example:
<p>Demo Subscsioj</p>
HTML
exercise.class_idinteger
Example:
2754exercise.master_batch_idinteger
Example:
1536exercise.user_idinteger
Example:
1exercise.is_woolf_accreditedinteger
Example:
0exercise.file_detailsobject[]
Files the learner uploaded, with temporary download links
Show child attributesHide child attributes
Files the tutor attached
exercise.exercise_namestring
Example:
assignmentexercise.is_psycologicalinteger
Example:
0exercise.max_marksinteger
Example:
40exercise.exam_typeinteger
Example:
2exercise.instructionsstring
Example:
<p><br></p>exercise.sound_urlstring
exercise.learner_idinteger
Example:
168520exercise.exercise_file_detailsobject[]
Files attached to the assignment itself
Show child attributesHide child attributes
Example:
pdf_file_type.pdfExample:
36838Notes: 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.