Package dev.dokimos.server.controller.v1
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> Removes the annotation for the item result.Returns the annotation for the item result.upsert(UUID runId, UUID itemResultId, @Valid AnnotationRequest request, jakarta.servlet.http.HttpServletRequest http) Creates or updates the annotation for the item result and returns it.
-
Constructor Details
-
AnnotationController
-
-
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 run is not visible to the caller, or the item result does not exist or does not belong to the run, and 400 if the verdict is missing. Thecreated_byfield is taken from the authenticated principal when present. -
get
@GetMapping public AnnotationView get(@PathVariable UUID runId, @PathVariable UUID itemResultId, jakarta.servlet.http.HttpServletRequest http) Returns the annotation for the item result. Responds 200 on success, or 404 if the run is not visible to the caller, the item result does not belong to the run, or it has no annotation. -
delete
@DeleteMapping public org.springframework.http.ResponseEntity<Void> delete(@PathVariable UUID runId, @PathVariable UUID itemResultId, jakarta.servlet.http.HttpServletRequest http) Removes the annotation for the item result. Responds 204 on success, or 404 if the run is not visible to the caller or the item result does not belong to the run.
-