class TrustAnchorController {

    @ApiOperation("Get a trust anchor by (numeric) identifier")
    @GetMapping(path = "/{id}")
    public ResponseEntity<ApiResponse<TrustAnchorResource>> get(@PathVariable long id, Locale locale) {
        return storage.readTx(tx ->
            trustAnchors.get(tx, Key.of(id))
                    .map(ta -> ResponseEntity.ok(trustAnchorResource(tx, ta, locale)))
                    .orElse(ResponseEntity.notFound().build()));
    }

}