+ @GetMapping(value = "/services/{csarId}/toscaModel", produces = MediaType.APPLICATION_OCTET_STREAM)
+ public ResponseEntity<byte[]> getServiceCsar(@PathVariable("csarId") final String csarId) {
+ LOGGER.info("Running getServiceCsar for {} ...", csarId);
+ final Optional<byte[]> resource = assetProvider.getAsset(csarId, AssetType.SERVICES);
+ if (resource.isPresent()) {
+ return new ResponseEntity<>(resource.get(), HttpStatus.OK);
+ }
+ LOGGER.error("Unable to find csar: {}", csarId);
+
+ return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
+ }
+
+