Class AnnotationController

java.lang.Object
dev.dokimos.server.controller.v1.AnnotationController

@RestController @RequestMapping("/api/v1/runs/{runId}/items/{itemResultId}/annotation") public class AnnotationController extends Object
Endpoints for the single human review annotation on a run item result.
  • Constructor Details

    • AnnotationController

      public AnnotationController(AnnotationService annotationService)
  • Method Details

    • upsert

      @PutMapping public AnnotationView upsert(@PathVariable UUID runId, @PathVariable UUID itemResultId, @Valid @RequestBody @Valid AnnotationRequest request, jakarta.servlet.http.HttpServletRequest http)
      Creates or updates the annotation for the item result and returns it. Responds 200 on success, 404 if the item result does not exist or does not belong to the run, and 400 if the verdict is missing. The created_by field is taken from the authenticated principal when present.
    • get

      @GetMapping public AnnotationView get(@PathVariable UUID runId, @PathVariable UUID itemResultId)
      Returns the annotation for the item result. Responds 200 on success, or 404 if the item result does not belong to the run or has no annotation.
    • delete

      @DeleteMapping public org.springframework.http.ResponseEntity<Void> delete(@PathVariable UUID runId, @PathVariable UUID itemResultId)
      Removes the annotation for the item result. Responds 204 on success, or 404 if the item result does not belong to the run.