diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/AasAgent.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/AasAgent.java index fd9e97ac..6c947ee4 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/AasAgent.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/aas/AasAgent.java @@ -121,7 +121,7 @@ public Response deleteModel(URL aasServiceUrl, String element) { * * @param aasServiceUrl AAS service to be updated * @return AAS model enriched with each elements access URL as string in assetId - * field. + * field. */ public CustomAssetAdministrationShellEnvironment getAasEnvWithUrls(URL aasServiceUrl) throws IOException, DeserializationException { @@ -139,10 +139,15 @@ public CustomAssetAdministrationShellEnvironment getAasEnvWithUrls(URL aasServic Encoder.encodeBase64(submodel.getIdentification().getId()))); submodel.getSubmodelElements() .forEach(elem -> putUrlRec( - format("%s/submodels/%s/submodel/submodel-elements", aasServiceUrlString, - Encoder.encodeBase64(submodel.getIdentification().getId())), - elem)); + format("%s/submodels/%s/submodel/submodel-elements", aasServiceUrlString, + Encoder.encodeBase64(submodel.getIdentification().getId())), + elem)); }); + model.getSubmodels().forEach(submodel -> AASUtil.getAllSubmodelElements(submodel) + .forEach(element -> element.setSourceUrl( + element.getSourceUrl() + .replaceFirst("\\.", "/")))); + // Add urls to all concept descriptions model.getConceptDescriptions().forEach( conceptDesc -> conceptDesc.setSourceUrl(format("%s/concept-descriptions/%s", aasServiceUrlString, @@ -160,12 +165,12 @@ private CustomAssetAdministrationShellEnvironment readModel(URL aasServiceUrl) String conceptResponse; String submodelResponse; try { - shellResponse = + shellResponse = Objects.requireNonNull(httpRestClient.get(aasServiceUrl.toURI().resolve("/shells").toURL()).body()).string(); - submodelResponse = + submodelResponse = Objects.requireNonNull(httpRestClient.get(aasServiceUrl.toURI().resolve("/submodels").toURL()).body()).string(); conceptResponse = Objects.requireNonNull(httpRestClient.get(aasServiceUrl.toURI().resolve("/concept" + - "-descriptions").toURL()).body()) + "-descriptions").toURL()).body()) .string(); } catch (URISyntaxException e) { throw new EdcException(e.getMessage()); @@ -219,11 +224,11 @@ private CustomSubmodelElement putUrlRec(String url, CustomSubmodelElement elemen if (element instanceof CustomSubmodelElementCollection) { Collection newCollectionElements = new ArrayList<>(); for (var collectionElement : ((CustomSubmodelElementCollection) element).getValue()) { - newCollectionElements.add(putUrlRec(format("%s/%s", url, element.getIdShort()), collectionElement)); + newCollectionElements.add(putUrlRec(format("%s.%s", url, element.getIdShort()), collectionElement)); } ((CustomSubmodelElementCollection) element).setValues(newCollectionElements); } - element.setSourceUrl(format("%s/%s", url, element.getIdShort())); + element.setSourceUrl(format("%s.%s", url, element.getIdShort())); return element; } } diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/ClientEndpoint.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/ClientEndpoint.java index 0a860398..80a98ee2 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/ClientEndpoint.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/ClientEndpoint.java @@ -168,12 +168,12 @@ public Response getDataset(@QueryParam("providerUrl") URL providerUrl, @POST @Path(NEGOTIATE_CONTRACT_PATH) public Response negotiateContract(ContractRequest contractRequest) { - Objects.requireNonNull(contractRequest, "ContractOffer must not be null"); + Objects.requireNonNull(contractRequest, "ContractRequest must not be null"); try { var agreement = negotiator.negotiate(contractRequest); - return Response.ok(agreement).build(); // TODO contract request instead of contractoffer: do whole change + return Response.ok(agreement).build(); } catch (InterruptedException | ExecutionException negotiationException) { - LOGGER.error(format("Negotiation failed for provider %s and contractOffer %s", contractRequest.getProviderId(), + LOGGER.error(format("Negotiation failed for provider %s and contractRequest %s", contractRequest.getProviderId(), contractRequest.getContractOffer().getId()), negotiationException); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(negotiationException.getMessage()) .build(); @@ -269,7 +269,7 @@ public Response deleteAcceptedPolicyDefinition(@QueryParam("policyDefinitionId") var removed = policyService.removeAccepted(policyDefinitionId); if (removed.isPresent()) { - return Response.ok(removed).build(); + return Response.ok(policyDefinitionId).build(); } return Response.status(Response.Status.NOT_FOUND).entity("Unknown policyDefinitionId.").build(); } @@ -290,7 +290,7 @@ public Response updateAcceptedPolicyDefinition(PolicyDefinition policyDefinition var updated = policyService.updateAccepted(policyDefinition.getId(), policyDefinition); if (updated.isPresent()) { - return Response.ok(updated).build(); + return Response.ok(policyDefinition.getId()).build(); } return Response.status(Response.Status.NOT_FOUND).entity("Unknown policyDefinitionId.").build(); } diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/contract/PolicyDefinitionStore.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/contract/PolicyDefinitionStore.java index 1e6e5c42..aa0c0d98 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/contract/PolicyDefinitionStore.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/contract/PolicyDefinitionStore.java @@ -16,7 +16,6 @@ package de.fraunhofer.iosb.app.client.contract; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import de.fraunhofer.iosb.app.Logger; import de.fraunhofer.iosb.app.model.configuration.Configuration; import org.eclipse.edc.connector.policy.spi.PolicyDefinition; diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/contract/PolicyService.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/contract/PolicyService.java index b7a48a19..fbcf579d 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/contract/PolicyService.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/contract/PolicyService.java @@ -86,7 +86,7 @@ public PolicyService(CatalogService catalogService, TypeTransformerRegistry tran * @param providerUrl Provider of the asset. * @param assetId Asset ID of the asset whose contract should be fetched. * @return A list of dataset offered by the provider for the given - * assetId. + * assetId. * @throws InterruptedException Thread for agreementId was waiting, sleeping, or * otherwise occupied, and was interrupted. */ @@ -140,18 +140,22 @@ public Dataset getDatasetForAssetId(URL providerUrl, String assetId) throws Inte } /** - * Return policyDefinition for assetId that match any policyDefinitions' policy of - * the services' policyDefinitionStore instance containing user added policyDefinitions. + * Return policyDefinition for assetId that match any policyDefinitions' policy + * of + * the services' policyDefinitionStore instance containing user added + * policyDefinitions. * If more than one policyDefinitions are provided by the provider * connector, an AmbiguousOrNullException will be thrown. * * @param providerUrl Provider of the asset. * @param assetId Asset ID of the asset whose contract should be fetched. * @return One policyDefinition offered by the provider for the given assetId. - * @throws InterruptedException Thread for agreementId was waiting, sleeping, or otherwise occupied, and was + * @throws InterruptedException Thread for agreementId was waiting, sleeping, or + * otherwise occupied, and was * interrupted. */ - public Pair getAcceptablePolicyForAssetId(URL providerUrl, String assetId) throws InterruptedException { + public Pair getAcceptablePolicyForAssetId(URL providerUrl, String assetId) + throws InterruptedException { var dataset = getDatasetForAssetId(providerUrl, assetId); Map.Entry acceptablePolicy; @@ -175,12 +179,12 @@ public Pair getAcceptablePolicyForAssetId(URL providerUrl, Strin .first(acceptablePolicy.getKey()).second(acceptablePolicy.getValue()).build(); } - /** * Adds an accepted contractOffer to match when checking a provider * contractOffer. Only the policies' rules are relevant. * - * @param policyDefinitions policies' rules that are acceptable for an automated contract negotiation + * @param policyDefinitions policies' rules that are acceptable for an automated + * contract negotiation */ public void addAccepted(PolicyDefinition[] policyDefinitions) { policyDefinitionStore.putPolicyDefinitions(policyDefinitions); @@ -198,7 +202,8 @@ public List getAccepted() { /** * Removes an accepted policyDefinitions. * - * @param policyDefinitions policyDefinition id of policyDefinition to be removed + * @param policyDefinitions policyDefinition id of policyDefinition to be + * removed * @return Optional containing removed policy definition or null */ public Optional removeAccepted(String policyDefinitions) { @@ -208,37 +213,37 @@ public Optional removeAccepted(String policyDefinitions) { /** * Updates an accepted policyDefinition. * - * @param policyDefinitionId PolicyDefinition id of policyDefinition to be updated + * @param policyDefinitionId PolicyDefinition id of policyDefinition to be + * updated * @param policyDefinition Updated PolicyDefinition */ public Optional updateAccepted(String policyDefinitionId, PolicyDefinition policyDefinition) { return policyDefinitionStore.updatePolicyDefinitions(policyDefinitionId, policyDefinition); } - private boolean matchesOwnPolicyDefinitions(Policy policy) { - return policyDefinitionStore.getPolicyDefinitions().stream().anyMatch(acceptedPolicyDefinition -> policyDefinitionRulesEquality(acceptedPolicyDefinition.getPolicy(), policy)); + return policyDefinitionStore.getPolicyDefinitions().stream().anyMatch( + acceptedPolicyDefinition -> policyDefinitionRulesEquality(acceptedPolicyDefinition.getPolicy(), + policy)); } private boolean policyDefinitionRulesEquality(Policy first, Policy second) { List firstRules = Stream.of( - first.getPermissions(), - first.getProhibitions(), - first.getObligations() - ) + first.getPermissions(), + first.getProhibitions(), + first.getObligations()) .flatMap(Collection::stream) .collect(Collectors.toList()); List secondRules = Stream.of( - second.getPermissions(), - second.getProhibitions(), - second.getObligations() - ) + second.getPermissions(), + second.getProhibitions(), + second.getObligations()) .flatMap(Collection::stream) .collect(Collectors.toList()); - - return firstRules.stream().anyMatch(firstRule -> secondRules.stream().anyMatch(secondRule -> !ruleEquality(firstRule, secondRule))); + return firstRules.stream().anyMatch( + firstRule -> secondRules.stream().anyMatch(secondRule -> !ruleEquality(firstRule, secondRule))); } private boolean ruleEquality(T first, T second) { @@ -246,9 +251,9 @@ private boolean ruleEquality(T first, T second) { second.getConstraints()); } - /* - * Since EDC api does not return Catalog object directly, resort to a hacky solution for now. + * Since EDC api does not return Catalog object directly, resort to another + * solution for now. */ private JsonObject modifyCatalogJson(byte[] catalogBytes) throws IOException { @@ -260,7 +265,6 @@ private JsonObject modifyCatalogJson(byte[] catalogBytes) throws IOException { .replace(DSPACE_PREFIX + ":", DSPACE_SCHEMA) .getBytes(); - // Alarming... looking into it though Distribution distribution = Distribution.Builder.newInstance() .format("JSON") .dataService(DataService.Builder.newInstance().build()) @@ -275,11 +279,16 @@ private JsonObject modifyCatalogJson(byte[] catalogBytes) throws IOException { .replace("dataService", DCAT_ACCESS_SERVICE_ATTRIBUTE)); jsonNode = om.readTree(catalogBytes); + + if (!jsonNode.has(DCAT_SCHEMA + "dataset") || jsonNode.get(DCAT_SCHEMA + "dataset") == null + || jsonNode.get(DCAT_SCHEMA + "dataset").isEmpty()) { + throw new EdcException("No dataset provided in catalog."); + } + ((ArrayNode) jsonNode .get(DCAT_SCHEMA + "dataset") .get(DCAT_SCHEMA + "distribution")) .add(distributionNode); - catalogBytes = om.writeValueAsBytes(jsonNode); var jsonReader = Json.createReader(new ByteArrayInputStream(catalogBytes)); diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/negotiation/Negotiator.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/negotiation/Negotiator.java index aad6ab28..53f53cba 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/negotiation/Negotiator.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/client/negotiation/Negotiator.java @@ -33,7 +33,7 @@ import static java.lang.String.format; /** - * Send contract offer, negotiation status watch + * Send contractrequest, negotiation status watch */ public class Negotiator { diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/controller/ConfigurationController.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/controller/ConfigurationController.java index adc33424..61931b3e 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/controller/ConfigurationController.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/controller/ConfigurationController.java @@ -19,6 +19,8 @@ import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectReader; +import com.fasterxml.jackson.databind.json.JsonMapper; + import de.fraunhofer.iosb.app.Logger; import de.fraunhofer.iosb.app.RequestType; import de.fraunhofer.iosb.app.model.configuration.Configuration; @@ -39,9 +41,7 @@ public class ConfigurationController implements Controllable { public ConfigurationController() { logger = Logger.getInstance(); configuration = Configuration.getInstance(); - objectMapper = new ObjectMapper(); - // TODO case insensitive object mapper without deprecated configuration? - objectMapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true); + objectMapper = JsonMapper.builder().configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true).build(); objectReader = objectMapper.readerForUpdating(configuration); } diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSubmodel.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSubmodel.java index f74ed5a7..3e2e10d1 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSubmodel.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/model/aas/CustomSubmodel.java @@ -19,7 +19,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import java.util.ArrayList; -import java.util.HashSet; import java.util.List; @JsonIgnoreProperties(ignoreUnknown = true) @@ -75,11 +74,7 @@ public boolean equals(Object obj) { return false; } - if ((this.getSubmodelElements() == null) ? (other.getSubmodelElements() != null) - : this.getSubmodelElements().size() != other.getSubmodelElements().size()) { - return false; - } - - return new HashSet<>(other.getSubmodelElements()).containsAll(this.getSubmodelElements()); + return true; } + } diff --git a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/sync/Synchronizer.java b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/sync/Synchronizer.java index 3e4922fa..3271906b 100644 --- a/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/sync/Synchronizer.java +++ b/edc-extension4aas/src/main/java/de/fraunhofer/iosb/app/sync/Synchronizer.java @@ -45,7 +45,7 @@ public class Synchronizer implements SelfDescriptionChangeListener { private final ResourceController resourceController; public Synchronizer(SelfDescriptionRepository selfDescriptionRepository, - AasController aasController, ResourceController resourceController) { + AasController aasController, ResourceController resourceController) { this.selfDescriptionRepository = selfDescriptionRepository; this.aasController = aasController; this.resourceController = resourceController; @@ -105,7 +105,7 @@ private CustomAssetAdministrationShellEnvironment fetchCurrentAasModel(URL aasSe private void addNewElements(CustomAssetAdministrationShellEnvironment newEnvironment) { var envElements = AASUtil.getAllElements(newEnvironment); - addAssetsContracts(envElements.stream().filter(element -> Objects.isNull(element.getIdsContractId())) + addAssetsContracts(envElements.stream().filter(element -> Objects.isNull(element.getIdsAssetId()) || Objects.isNull(element.getIdsContractId())) .toList()); } @@ -113,14 +113,14 @@ private void addNewElements(CustomAssetAdministrationShellEnvironment newEnviron * Removes elements that were deleted on AAS service */ private void removeOldElements(CustomAssetAdministrationShellEnvironment newEnvironment, - CustomAssetAdministrationShellEnvironment oldEnvironment) { + CustomAssetAdministrationShellEnvironment oldEnvironment) { var elementsToRemove = AASUtil.getAllElements(oldEnvironment); elementsToRemove.removeAll(AASUtil.getAllElements(newEnvironment)); removeAssetsContracts(elementsToRemove); } private void syncShell(CustomAssetAdministrationShellEnvironment newEnvironment, - CustomAssetAdministrationShellEnvironment oldEnvironment) { + CustomAssetAdministrationShellEnvironment oldEnvironment) { var oldShells = oldEnvironment.getAssetAdministrationShells(); newEnvironment.getAssetAdministrationShells().replaceAll( shell -> oldShells.contains(shell) @@ -129,7 +129,7 @@ private void syncShell(CustomAssetAdministrationShellEnvironment newEnvironment, } private void syncConceptDescription(CustomAssetAdministrationShellEnvironment newEnvironment, - CustomAssetAdministrationShellEnvironment oldEnvironment) { + CustomAssetAdministrationShellEnvironment oldEnvironment) { var oldConceptDescriptions = oldEnvironment.getConceptDescriptions(); newEnvironment.getConceptDescriptions().replaceAll( conceptDescription -> oldConceptDescriptions.contains(conceptDescription) @@ -138,17 +138,15 @@ private void syncConceptDescription(CustomAssetAdministrationShellEnvironment ne } private void syncSubmodel(CustomAssetAdministrationShellEnvironment newEnvironment, - CustomAssetAdministrationShellEnvironment oldEnvironment) { + CustomAssetAdministrationShellEnvironment oldEnvironment) { var oldSubmodels = oldEnvironment.getSubmodels(); newEnvironment.getSubmodels().forEach(submodel -> { CustomSubmodel oldSubmodel; if (oldSubmodels.contains(submodel)) { - oldSubmodel = oldSubmodels - .get(oldSubmodels.indexOf(submodel)); + oldSubmodel = oldSubmodels.get(oldSubmodels.indexOf(submodel)); } else { oldSubmodel = oldSubmodels.stream().filter( - oldSubmodelTest -> oldSubmodelTest.getIdentification().equals(submodel.getIdentification()) - && oldSubmodelTest.getIdShort().equals(submodel.getIdShort())) + oldSubmodelTest -> submodel.equals(oldSubmodelTest)) .findFirst().orElse(null); if (Objects.isNull(oldSubmodel)) { return; @@ -164,7 +162,7 @@ private void syncSubmodel(CustomAssetAdministrationShellEnvironment newEnvironme } private void syncSubmodelElements(Collection allElements, - Collection allOldElements) { + Collection allOldElements) { allElements.stream() .filter(allOldElements::contains) .forEach(element -> { diff --git a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/client/ClientEndpointTest.java b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/client/ClientEndpointTest.java index 5c02b686..bba5a303 100644 --- a/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/client/ClientEndpointTest.java +++ b/edc-extension4aas/src/test/java/de/fraunhofer/iosb/app/client/ClientEndpointTest.java @@ -167,9 +167,7 @@ public void negotiateContractTest() { } @Test - @Disabled("Until catalog fetching works again") public void negotiateContractAndTransferTest() { - // TODO repair after fixing ContractOfferService.class try (var ignored = clientEndpoint.negotiateContract(url, "test-id", "test-asset-id", null)) { fail(); } catch (EdcException expected) { diff --git a/example/Dockerfile b/example/Dockerfile index de98f739..e291d163 100644 --- a/example/Dockerfile +++ b/example/Dockerfile @@ -1,5 +1,5 @@ # -buster is required to have apt available -FROM openjdk:11-jre-slim-buster +FROM openjdk:17-jdk-slim # by default curl is not available, so install it RUN apt update && apt install curl -y diff --git a/example/resources/aas_edc_extension.postman_collection.json b/example/resources/aas_edc_extension.postman_collection.json index 2f8ba50e..33420325 100644 --- a/example/resources/aas_edc_extension.postman_collection.json +++ b/example/resources/aas_edc_extension.postman_collection.json @@ -1,8 +1,9 @@ { "info": { - "_postman_id": "11d46791-636f-49a5-8bb9-d040c8285963", + "_postman_id": "8953f55e-787b-4b76-9c0b-7c1b15731185", "name": "EDC Extension", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "20511334" }, "item": [ { @@ -91,7 +92,7 @@ } }, "url": { - "raw": "{{consumer}}/api/automated/acceptedPolicies", + "raw": "{{consumer}}/api/automated/acceptedPolicies?policyDefinitionId=my-custom-policy-definition", "host": [ "{{consumer}}" ], @@ -99,6 +100,12 @@ "api", "automated", "acceptedPolicies" + ], + "query": [ + { + "key": "policyDefinitionId", + "value": "my-custom-policy-definition" + } ] } }, @@ -166,7 +173,7 @@ } ], "url": { - "raw": "{{consumer}}/api/automated/negotiate?providerUrl={{provider-dsp}}&assetId={{asset-id}}", + "raw": "{{consumer}}/api/automated/negotiate?providerUrl={{provider-dsp}}&providerId=provider&assetId={{asset-id}}", "host": [ "{{consumer}}" ], @@ -180,6 +187,10 @@ "key": "providerUrl", "value": "{{provider-dsp}}" }, + { + "key": "providerId", + "value": "provider" + }, { "key": "assetId", "value": "{{asset-id}}" @@ -842,7 +853,7 @@ "response": [] }, { - "name": "Post policydefinitions", + "name": "Get assets", "request": { "method": "POST", "header": [ @@ -854,7 +865,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"@type\": \"PolicyDefinition\",\r\n \"id\": \"random-policy-definition-id\",\r\n \"https://w3id.org/edc/v0.0.1/ns/policy\": {\r\n \"permissions\": [\r\n {\r\n \"edctype\": \"dataspaceconnector:permission\",\r\n \"target\": \"{{asset-id}}\",\r\n \"action\": {\r\n \"type\": \"USE\"\r\n },\r\n \"constraints\": [\r\n {\r\n \"edctype\": \"AtomicConstraint\",\r\n \"leftExpression\": {\r\n \"edctype\": \"dataspaceconnector:literalexpression\",\r\n \"value\": \"region\"\r\n },\r\n \"rightExpression\": {\r\n \"edctype\": \"dataspaceconnector:literalexpression\",\r\n \"value\": \"eu\"\r\n },\r\n \"operator\": \"EQ\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"target\": \"{{asset-id}}\"\r\n }\r\n}", + "raw": "", "options": { "raw": { "language": "json" @@ -862,13 +873,14 @@ } }, "url": { - "raw": "{{provider-management}}/v2/policydefinitions", + "raw": "{{consumer-management}}/v3/assets/request", "host": [ - "{{provider-management}}" + "{{consumer-management}}" ], "path": [ - "v2", - "policydefinitions" + "v3", + "assets", + "request" ] } },