Get contest attempt answer breakdown (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/contests/:contestId/attempts/:attemptId/answers
Description
Returns per-question detail for a single submitted attempt: question text, the option the participant selected, the correct option label, and whether the answer was correct. Questions are listed in the order shown to the participant.
Authentication
Required: Workspace token. Persona: Workspace Owner (same as other workspace contest routes). Staff do not have access to the contests section.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <workspace token> |
Content-Type | No | — |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace id |
contestId | string | Yes | Contest id |
attemptId | string | Yes | Contest attempt document id (from list results or owner leaderboard) |
Response 200 OK
{
"items": [
{
"questionId": "...",
"questionText": "نص السؤال",
"selectedOptionId": "opt_a",
"selectedOptionLabel": "خيار اختاره المتسابق",
"correctOptionId": "opt_b",
"correctOptionLabel": "الإجابة الصحيحة",
"isCorrect": false
}
]
}
If the participant did not answer a question, selectedOptionId and selectedOptionLabel are null and isCorrect is false.
Common Errors
- 400 Bad Request: Invalid
attemptIdformat - 401 Unauthorized: Missing or invalid token
- 403 Forbidden: Token not allowed for this workspace
- 404 Not Found: Contest not in workspace, or attempt not found / not submitted / wrong contest
- 500 Internal Server Error