Files
lincodex/api/core/routes/candidate_assessment_attempt.yml
T

51 lines
3.1 KiB
YAML

get:
operationId: GetMyAssessmentAttempt
summary: Read an assessment attempt of the current candidate.
description: |-
Requires the session cookie of a candidate account. Returns the stored attempt projection with its state, fixed versions, time and session limits, progress, the item to answer now, and the practices. This GET is read-only: it never starts or resumes a work session, consumes session quota, advances the version, or commits expiry or finalization. A reload, a retried request, or a new session returns the same item instance with the same text and option order; a lost connection never creates a new attempt. After `idle_timeout_seconds`, the candidate explicitly starts or resumes work with StartMyAssessmentAttemptSession. The response never says whether an earlier answer was correct and never contains answer keys, item scores, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.
When the deadline passes, this read still returns the stored state and deadline. A command or background transition commits the due outcome; if the stored state is still active, GetMyAssessmentResult answers 409 until that transition is committed. The client polls this operation while a practice is `pending`, but polling alone never changes attempt state.
The attempt must belong to the candidate of the session: an attempt of another candidate answers 404 not_found, the same as an unknown identifier, so identifiers cannot be probed. An employer account answers 403 forbidden; no operation gives an employer the answers, qualification evidence, or attempt history.
security:
- sessionCookie: []
tags:
- assessment
parameters:
- $ref: ../components/parameters.yml#/AssessmentAttemptId
responses:
"200":
description: The attempt.
headers:
Cache-Control:
$ref: ../components/headers.yml#/CacheControlNoStore
content:
application/json:
schema:
$ref: ../components/schemas.yml#/AssessmentAttempt
examples:
adaptive_resumed:
$ref: ../components/examples.yml#/AssessmentAttemptResumed
practice_pending:
$ref: ../components/examples.yml#/AssessmentAttemptPracticePending
practice_verdict_pending:
$ref: ../components/examples.yml#/AssessmentAttemptPracticeVerdictPending
sandbox_failed:
$ref: ../components/examples.yml#/AssessmentAttemptSandboxFailed
ready_to_finalize:
$ref: ../components/examples.yml#/AssessmentAttemptReadyToFinalize
additional_practice_pending:
$ref: ../components/examples.yml#/AssessmentAttemptAdditionalPracticePending
completed:
$ref: ../components/examples.yml#/AssessmentAttemptCompleted
insufficient_bank:
$ref: ../components/examples.yml#/AssessmentAttemptInsufficientBank
"401":
$ref: ../components/responses.yml#/Unauthenticated
"403":
$ref: ../components/responses.yml#/Forbidden
"404":
$ref: ../components/responses.yml#/NotFound
default:
$ref: ../components/responses.yml#/Problem