What records completion
CTF labs: submit the flag
A lab withctf: true completes when the learner submits the correct flag:
verdict is CORRECT_FLAG, INCORRECT_FLAG, or NOT_CTF. Flags are compared without case sensitivity. markCompleted() on a CTF lab throws invalid_request with backendCode FLAG_REQUIRED.
Other labs: mark completed
When your completion policy allows it, record completion:markCompleted() resolves with { message: 'COMPLETED' } only after Cybr saves the record. Any other response throws.
Each successful call creates another completion record, so check completed first, as above. An unknown lab ID throws not_found.
Completion through markCompleted() is reported by your application. It does not prove that the learner solved anything.
Read completion
For one lab, readcompleted from the lab detail with the learner’s ID:
completed does not say whether a flag or markCompleted() recorded it. Store your own verification result if you need that.
After a timeout
Atimeout or network_error from markCompleted() or submitFlag() is ambiguous: the save may have happened. Check listCompleted() before you retry or report a failure.
