Submit answers for an assessment attempt. Calculates score and determines pass/fail.
Path parameters
| Name |
Type |
Required |
Description |
id |
string |
yes |
The unique identifier of the record |
Query parameters
| Name |
Type |
Required |
Description |
with[] |
string[] |
no |
Include related resources in the response when submitting an attempt. One of: user, assessment, answers. |
Request body
Required.
application/json
answers object[] · required
{
"answers": [
{
"questionId": "string",
"answer": [
0
]
}
]
}
Responses
| Status |
Description |
| 200 |
The submitted assessment attempt with score |
| 400 |
The attempt has already been submitted |
| 404 |
The attempt was not found |
Response 200 body
id string (uuid)
answers object[]
assessment object
assessmentId string (uuid)
createdAt string (date-time)
educationalContent object
educationalContentId string (uuid)
pointsEarned integer
pointsPossible integer
reviewedAt string (date-time)
reviewedBy object
safetyRequirement object
safetyRequirementId string (uuid)
scorePercentage integer
startedAt string (date-time)
status string
submittedAt string (date-time)
updatedAt string (date-time)
user object
userId string (uuid)
{
"id": "string",
"answers": [
{
"id": "string",
"answer": [
0
],
"attemptId": "string",
"createdAt": "string",
"isCorrect": false,
"pointsAwarded": 0,
"question": {
"id": "string",
"type": "string",
"question": "string",
"points": 0
},
"questionId": "string",
"reviewerFeedback": "string",
"updatedAt": "string"
}
],
"assessment": {
"id": "string",
"title": "string",
"passPercentage": 0
},
"assessmentId": "string",
"createdAt": "string",
"educationalContent": {
"id": "string",
"title": "string"
},
"educationalContentId": "string",
"pointsEarned": 0,
"pointsPossible": 0,
"reviewedAt": "string",
"reviewedBy": {
"id": "string",
"firstName": "string",
"lastName": "string"
},
"safetyRequirement": {
"id": "string",
"title": "string"
},
"safetyRequirementId": "string",
"scorePercentage": 0,
"startedAt": "string",
"status": "in_progress",
"submittedAt": "string",
"updatedAt": "string",
"user": {
"id": "string",
"firstName": "string",
"lastName": "string",
"email": "string"
},
"userId": "string"
}