View assessment attempts. Filter by assessmentId, userId, or status.
Query parameters
| Name |
Type |
Required |
Description |
assessmentId |
string (uuid) |
no |
Filter by assessment |
userId |
string (uuid) |
no |
Filter by user |
status |
string |
no |
Filter by status One of: in_progress, submitted, passed, failed, pending_review. |
with[] |
string[] |
no |
Include related resources in the response. Pass multiple values as separate query parameters (e.g., ?with[]=user&with[]=assessment). One of: user, assessment, educationalContent, safetyRequirement, answers, reviewedBy. |
orderBy |
string |
no |
Field to order by One of: id, status, scorePercentage, startedAt, submittedAt, createdAt, updatedAt. |
order |
string |
no |
Specifies in what direction the results should be ordered (ASC/DESC) One of: asc, desc. |
count |
integer |
no |
Specifies the number of results to show per page of paginated results (1-500) |
Responses
| Status |
Description |
| 200 |
A paginated response of assessment attempts |
Response 200 body
data object[] · required
links object · required
meta object · required
{
"data": [
{
"id": "string",
"answers": [
{
"id": "string",
"answer": [],
"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"
}
],
"links": {
"first": "https://api.safesites.app/sites?page=1",
"last": "https://api.safesites.app/sites?page=10",
"prev": null,
"next": "https://api.safesites.app/sites?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 10,
"links": [
{
"url": "https://api.safesites.app/sites?page=2",
"label": "Next",
"active": true
}
],
"path": "https://api.safesites.app/sites",
"per_page": 100,
"to": 100,
"total": 1000,
"userId": "01930a9b-7b61-79a5-9ba2-78f0b4b2c196",
"requestId": "01930a9b-8d1f-766f-945c-ef6408134dbc"
}
}