From cd665dd877e69a12c355fcdfb4cef42e2ce866a7 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 25 Mar 2024 19:49:49 +0100 Subject: [PATCH 01/58] fix(impl): [#199] fixes for incorrect implementation --- .../job/delegate/AbstractDelegate.java | 14 +-- .../job/delegate/RelationshipDelegate.java | 5 +- .../job/delegate/SubmodelDelegate.java | 12 +-- .../validation/JsonValidatorService.java | 8 +- .../eclipse/tractusx/irs/util/JsonUtil.java | 5 +- .../controllers/PolicyStoreController.java | 4 +- .../models/CreatePolicyRequest.java | 84 ++++++++--------- .../policystore/models/PolicyResponse.java | 80 +++++++++-------- .../models/UpdatePolicyRequest.java | 5 +- .../persistence/PolicyPersistence.java | 14 ++- .../services/PolicyStoreService.java | 90 +++++++++++++------ .../PolicyStoreControllerTest.java | 9 +- .../persistence/PolicyPersistenceTest.java | 16 ++-- .../services/PolicyStoreServiceTest.java | 49 +++++----- .../IRS_Request_Collection.json | 2 +- 15 files changed, 223 insertions(+), 174 deletions(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java index 0f3664fc39..fccd653888 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java @@ -88,17 +88,16 @@ protected ItemContainer next(final ItemContainer.ItemContainerBuilder itemContai protected SubmodelDescriptor requestSubmodel(final EdcSubmodelFacade submodelFacade, final ConnectorEndpointsService connectorEndpointsService, final Endpoint digitalTwinRegistryEndpoint, - final String bpn) - throws EdcClientException { + final String bpn) throws EdcClientException { final String subprotocolBody = digitalTwinRegistryEndpoint.getProtocolInformation().getSubprotocolBody(); final Optional dspEndpoint = extractDspEndpoint(subprotocolBody); if (dspEndpoint.isPresent()) { - log.debug("Using dspEndpoint of subprotocolBody '{}' to get submodel payload", subprotocolBody); + log.debug("Using dspEndpoint of subprotocolBody '{}' to get submodel policies", subprotocolBody); return submodelFacade.getSubmodelPayload(dspEndpoint.get(), - digitalTwinRegistryEndpoint.getProtocolInformation().getHref(), - extractAssetId(subprotocolBody), bpn); + digitalTwinRegistryEndpoint.getProtocolInformation().getHref(), extractAssetId(subprotocolBody), + bpn); } else { log.info("SubprotocolBody does not contain '{}'. Using Discovery Service as fallback.", DSP_ENDPOINT); final List connectorEndpoints = connectorEndpointsService.fetchConnectorEndpoints(bpn); @@ -107,8 +106,9 @@ protected SubmodelDescriptor requestSubmodel(final EdcSubmodelFacade submodelFac } } - private SubmodelDescriptor getSubmodel(final EdcSubmodelFacade submodelFacade, final Endpoint digitalTwinRegistryEndpoint, - final List connectorEndpoints, final String bpn) throws EdcClientException { + private SubmodelDescriptor getSubmodel(final EdcSubmodelFacade submodelFacade, + final Endpoint digitalTwinRegistryEndpoint, final List connectorEndpoints, final String bpn) + throws EdcClientException { for (final String connectorEndpoint : connectorEndpoints) { try { return submodelFacade.getSubmodelPayload(connectorEndpoint, diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java index d042554283..9f10710756 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java @@ -118,7 +118,8 @@ private void processEndpoint(final Endpoint endpoint, final RelationshipAspect r log.info("Encountered usage policy exception: {}. Creating Tombstone.", e.getMessage()); itemContainerBuilder.tombstone( Tombstone.from(itemId.getGlobalAssetId(), endpoint.getProtocolInformation().getHref(), e, 0, - ProcessStep.USAGE_POLICY_VALIDATION, e.getBusinessPartnerNumber(), jsonUtil.asMap(e.getPolicy()))); + ProcessStep.USAGE_POLICY_VALIDATION, e.getBusinessPartnerNumber(), + jsonUtil.asMap(e.getPolicy()))); } catch (final EdcClientException e) { log.info("Submodel Endpoint could not be retrieved for Endpoint: {}. Creating Tombstone.", endpoint.getProtocolInformation().getHref()); @@ -126,7 +127,7 @@ private void processEndpoint(final Endpoint endpoint, final RelationshipAspect r Tombstone.from(itemId.getGlobalAssetId(), endpoint.getProtocolInformation().getHref(), e, 0, ProcessStep.SUBMODEL_REQUEST)); } catch (final JsonParseException e) { - log.info("Submodel payload did not match the expected AspectType. Creating Tombstone."); + log.info("Submodel policies did not match the expected AspectType. Creating Tombstone."); itemContainerBuilder.tombstone( Tombstone.from(itemId.getGlobalAssetId(), endpoint.getProtocolInformation().getHref(), e, 0, ProcessStep.SUBMODEL_REQUEST)); diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java index f586c3c03b..9e9764cadb 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java @@ -86,8 +86,9 @@ public ItemContainer process(final ItemContainer.ItemContainerBuilder itemContai final List aasSubmodelDescriptors = shell.payload().getSubmodelDescriptors(); log.info("Retrieved {} SubmodelDescriptor for itemId {}", aasSubmodelDescriptors.size(), itemId); - final List filteredSubmodelDescriptorsByAspectType = shell.payload().filterDescriptorsByAspectTypes( - jobData.getAspects()); + final List filteredSubmodelDescriptorsByAspectType = shell.payload() + .filterDescriptorsByAspectTypes( + jobData.getAspects()); if (jobData.isCollectAspects()) { log.info("Collecting Submodels."); @@ -133,13 +134,13 @@ private List getSubmodels(final SubmodelDescriptor submodelDescriptor, } else { final String errors = String.join(", ", validationResult.getValidationErrors()); itemContainerBuilder.tombstone(Tombstone.from(itemId, endpoint.getProtocolInformation().getHref(), - new IllegalArgumentException("Submodel payload validation failed. " + errors), 0, + new IllegalArgumentException("Submodel policies validation failed. " + errors), 0, ProcessStep.SCHEMA_VALIDATION)); } } catch (final JsonParseException e) { itemContainerBuilder.tombstone(Tombstone.from(itemId, endpoint.getProtocolInformation().getHref(), e, RetryRegistry.ofDefaults().getDefaultConfig().getMaxAttempts(), ProcessStep.SCHEMA_VALIDATION)); - log.info("Submodel payload did not match the expected AspectType. Creating Tombstone."); + log.info("Submodel policies did not match the expected AspectType. Creating Tombstone."); } catch (final SchemaNotFoundException | InvalidSchemaException | RestClientException e) { itemContainerBuilder.tombstone(Tombstone.from(itemId, endpoint.getProtocolInformation().getHref(), e, 0, ProcessStep.SCHEMA_REQUEST)); @@ -147,7 +148,8 @@ private List getSubmodels(final SubmodelDescriptor submodelDescriptor, } catch (final UsagePolicyException e) { log.info("Encountered usage policy exception: {}. Creating Tombstone.", e.getMessage()); itemContainerBuilder.tombstone(Tombstone.from(itemId, endpoint.getProtocolInformation().getHref(), e, 0, - ProcessStep.USAGE_POLICY_VALIDATION, e.getBusinessPartnerNumber(), jsonUtil.asMap(e.getPolicy()))); + ProcessStep.USAGE_POLICY_VALIDATION, e.getBusinessPartnerNumber(), + jsonUtil.asMap(e.getPolicy()))); } catch (final EdcClientException e) { log.info("Submodel Endpoint could not be retrieved for Item: {}. Creating Tombstone.", itemId); itemContainerBuilder.tombstone(Tombstone.from(itemId, endpoint.getProtocolInformation().getHref(), e, 0, diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java index 9d95eefe23..756f49fa63 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java @@ -54,10 +54,10 @@ public JsonValidatorService(final JsonUtil parser) { } /** - * Validate the payload against the schema. + * Validate the policies against the schema. * * @param jsonSchema the JSON schema - * @param jsonPayload the JSON payload to validate + * @param jsonPayload the JSON policies to validate * @return the validation result, containing the validation errors if applicable */ public ValidationResult validate(final String jsonSchema, final String jsonPayload) throws InvalidSchemaException { @@ -74,10 +74,10 @@ public ValidationResult validate(final String jsonSchema, final String jsonPaylo return createValidationResult(errors); } catch (final IllegalStateException | JsonParseException e) { - log.warn("Unable to validate JSON payload ({})", jsonPayload, e); + log.warn("Unable to validate JSON policies ({})", jsonPayload, e); return ValidationResult.builder() .valid(false) - .validationError("Illegal JSON payload, cannot be validated") + .validationError("Illegal JSON policies, cannot be validated") .build(); } } diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java index 9f2668b3a3..e3d2edd65c 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java @@ -54,7 +54,8 @@ public class JsonUtil { /** * Map Type Reference helper */ - private static final class MapTypeReference extends TypeReference> { } + private static final class MapTypeReference extends TypeReference> { + } static { final SimpleModule simpleModule = new SimpleModule().addAbstractTypeMapping(TransferProcess.class, @@ -78,7 +79,7 @@ public String asString(final Object input) { try { return MAPPER.writeValueAsString(input); } catch (JsonProcessingException e) { - log.error("Error serializing payload", e); + log.error("Error serializing policies", e); throw new JsonParseException(e); } } diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 1caf0a65aa..d6bddb8939 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -110,7 +110,7 @@ public class PolicyStoreController { @ResponseStatus(HttpStatus.CREATED) @PreAuthorize("hasAuthority('" + IrsRoles.ADMIN_IRS + "')") public void registerAllowedPolicy(final @RequestBody CreatePolicyRequest request) { - request.payload() + request.policies() .stream() .map(payload -> { final Policy policy = edcTransformer.transformToPolicy(payload); @@ -118,7 +118,7 @@ public void registerAllowedPolicy(final @RequestBody CreatePolicyRequest request return policy; }) .forEach(policy -> service.registerPolicy(policy, - request.businessPartnerNumbers() == null ? List.of(DEFAULT) : request.businessPartnerNumbers())); + request.businessPartnerNumber() == null ? DEFAULT : request.businessPartnerNumber())); } @Operation(operationId = "getAllowedPoliciesByBpn", diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java index 3154a363ee..8a21513433 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java @@ -26,58 +26,60 @@ import java.time.OffsetDateTime; import java.util.List; -import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.json.JsonObject; import jakarta.validation.constraints.NotNull; /** - * Object for API to create policty + * Object for API to create policy */ @SuppressWarnings("FileTabCharacter") @Schema(description = "Request to add a policy") public record CreatePolicyRequest( - @NotNull @Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations") OffsetDateTime validUntil, - @ArraySchema() List businessPartnerNumbers, - @NotNull @Schema(example = CreatePolicyRequest.EXAMPLE_PAYLOAD) List payload) { + @NotNull @Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations", + example = "2025-12-12T23:59:59.999Z") OffsetDateTime validUntil, + @Schema() String businessPartnerNumber, + @NotNull @Schema(example = CreatePolicyRequest.EXAMPLE_PAYLOAD) List policies) { @SuppressWarnings("java:S2479") - // this value is used by open-api to show example payload + // this value is used by open-api to show example policies // \u0009 character is required for this value to be correctly shown in open-api public static final String EXAMPLE_PAYLOAD = """ - { - "validUntil": "2025-12-12T23:59:59.999Z", - "payload": { - "@context": { - "odrl": "http://www.w3.org/ns/odrl/2/" - }, - "@id": "policy-id", - "policy": { - "odrl:permission": [ - { - "odrl:action": "USE", - "odrl:constraint": { - "odrl:and": [ - { - "odrl:leftOperand": "Membership", - "odrl:operator": { - "@id": "odrl:eq" - }, - "odrl:rightOperand": "active" - }, - { - "odrl:leftOperand": "PURPOSE", - "odrl:operator": { - "@id": "odrl:eq" - }, - "odrl:rightOperand": "ID 3.1 Trace" - } - ] - } - } - ] - } - } - } - """; + [ + { + { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@id": "policy-id", + "@type": "PolicyDefinitionRequestDto", + "policy": { + "@type": "Policy", + "odrl:permission": [ + { + "odrl:action": "USE", + "odrl:constraint": { + "odrl:and": [ + { + "odrl:leftOperand": "Membership", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "active" + }, + { + "odrl:leftOperand": "PURPOSE", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "ID 3.1 Trace" + } + ] + } + } + ] + } + } + ] + """; } diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/PolicyResponse.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/PolicyResponse.java index bf009dc8cf..f48f1775ef 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/PolicyResponse.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/PolicyResponse.java @@ -32,46 +32,48 @@ @Schema(example = PolicyResponse.EXAMPLE_PAYLOAD) public record PolicyResponse(OffsetDateTime validUntil, Payload payload) { - @SuppressWarnings({"FileTabCharacter", "java:S2479"}) - // required to show correctly example payload in open-api + @SuppressWarnings({ "FileTabCharacter", + "java:S2479" + }) + // required to show example of policies correctly in open-api public static final String EXAMPLE_PAYLOAD = """ - [ - { - "validUntil": "2025-12-12T23:59:59.999Z", - "payload": { - "@context": { - "odrl": "http://www.w3.org/ns/odrl/2/" - }, - "@id": "policy-id", - "policy": { - "odrl:permission": [ - { - "odrl:action": "USE", - "odrl:constraint": { - "odrl:and": [ - { - "odrl:leftOperand": "Membership", - "odrl:operator": { - "@id": "odrl:eq" - }, - "odrl:rightOperand": "active" - }, - { - "odrl:leftOperand": "PURPOSE", - "odrl:operator": { - "@id": "odrl:eq" - }, - "odrl:rightOperand": "ID 3.1 Trace" - } - ] - } - } - ] - } - } - } - ] - """; + [ + { + "validUntil": "2025-12-12T23:59:59.999Z", + "payload": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@id": "policy-id", + "policy": { + "odrl:permission": [ + { + "odrl:action": "USE", + "odrl:constraint": { + "odrl:and": [ + { + "odrl:leftOperand": "Membership", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "active" + }, + { + "odrl:leftOperand": "PURPOSE", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "ID 3.1 Trace" + } + ] + } + } + ] + } + } + } + ] + """; public static PolicyResponse fromPolicy(final Policy policy) { return PolicyResponse.builder() diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/UpdatePolicyRequest.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/UpdatePolicyRequest.java index ead5a738bc..c247b19821 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/UpdatePolicyRequest.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/UpdatePolicyRequest.java @@ -32,9 +32,8 @@ /** * Request object for policy update */ -@Schema(description = "Request to add a policy") +@Schema(description = "Request to update a policy") public record UpdatePolicyRequest( @Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations") @NotNull OffsetDateTime validUntil, - List businessPartnerNumbers, - List policiesIds) { + List businessPartnerNumbers, List policiesIds) { } diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistence.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistence.java index 84a92b6316..64fb2885c0 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistence.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistence.java @@ -70,15 +70,11 @@ public PolicyPersistence(@Qualifier(POLICY_BLOB_PERSISTENCE) final BlobPersisten this.mapper = mapper; } - public void save(final List bpns, final Policy policy) { - final Map> storedBpnToPolicies = bpns.stream() - .collect(Collectors.toMap(bpn -> bpn, - this::readAll)); - storedBpnToPolicies.forEach((bpn, policies) -> { - checkIfPolicyAlreadyExists(policy, policies); - policies.add(policy); - save(bpn, policies); - }); + public void save(final String bpn, final Policy policy) { + final List policiesForBpn = readAll(bpn); + checkIfPolicyAlreadyExists(policy, policiesForBpn); + policiesForBpn.add(policy); + save(bpn, policiesForBpn); } private static void checkIfPolicyAlreadyExists(final Policy policy, final List policies) { diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index 725bfd4d97..d710392e1a 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -76,12 +76,12 @@ public PolicyStoreService(final DefaultAcceptedPoliciesConfig defaultAcceptedPol this.clock = clock; } - public void registerPolicy(final Policy policy, final List businessPartnersNumbers) { + public void registerPolicy(final Policy policy, final String businessPartnersNumber) { validatePolicy(policy); policy.setCreatedOn(OffsetDateTime.now(clock)); log.info("Registering new policy with id {}, valid until {}", policy.getPolicyId(), policy.getValidUntil()); try { - persistence.save(businessPartnersNumbers, policy); + persistence.save(businessPartnersNumber, policy); } catch (final PolicyStoreException e) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage(), e); } @@ -105,18 +105,27 @@ private void validatePolicy(final Policy policy) { } } - public Map> getPolicies(final List bpns) { - if (bpns == null) { + /** + * Finds policies by list of BPN. + * + * @param bpnList list of BPNs + * @return a map that maps BPN to list of policies + */ + public Map> getPolicies(final List bpnList) { + if (bpnList == null) { return getAllStoredPolicies(); } else { - return bpns.stream().map(bpn -> new AbstractMap.SimpleEntry<>(bpn, getStoredPolicies(List.of(bpn)))).collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); + return bpnList.stream() + .map(bpn -> new AbstractMap.SimpleEntry<>(bpn, getStoredPolicies(List.of(bpn)))) + .collect( + Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); } } - public List getStoredPolicies(final List bpns) { - log.info("Reading all stored polices for BPN {}", bpns); + public List getStoredPolicies(final List bpnls) { + log.info("Reading all stored polices for BPN {}", bpnls); final List storedPolicies = new LinkedList<>(); - bpns.forEach(bpn -> storedPolicies.addAll(persistence.readAll(bpn))); + bpnls.forEach(bpn -> storedPolicies.addAll(persistence.readAll(bpn))); if (storedPolicies.isEmpty()) { log.info("Policy store is empty, returning default values from config"); @@ -145,37 +154,66 @@ public void deletePolicy(final String policyId) { } catch (final PolicyStoreException e) { throw new ResponseStatusException(HttpStatus.NOT_FOUND, e.getMessage(), e); } + } + private void deletePolicyForEachBpn(final String policyId, List bpnList) { + for (final String bpn : bpnList) { + persistence.delete(bpn, policyId); + } } public void updatePolicies(final UpdatePolicyRequest request) { for (final String policyId : request.policiesIds()) { - updatePolicy(policyId, request.validUntil(), request.businessPartnerNumbers() == null ? List.of(DEFAULT) : request.businessPartnerNumbers()); + updatePolicy(policyId, request.validUntil(), + request.businessPartnerNumbers() == null ? List.of(DEFAULT) : request.businessPartnerNumbers()); } } - public void updatePolicy(final String policyId, final OffsetDateTime validUntil, final List bpns) { + public void updatePolicy(final String policyId, final OffsetDateTime newValidUntil, final List newBpns) { + + log.info("Updating policy with id {}", policyId); + + final List bpnsContainingPolicyId; try { - log.info("Updating policy with id {}", policyId); - final List bpnsContainingPolicyId = PolicyHelper.findBpnsByPolicyId(getAllStoredPolicies(), - policyId); + final Map> allStoredPolicies = getAllStoredPolicies(); + bpnsContainingPolicyId = PolicyHelper.findBpnsByPolicyId(allStoredPolicies, policyId); + } catch (PolicyStoreException e) { + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); + } - final Policy policyToUpdate = getStoredPolicies(bpnsContainingPolicyId).stream() - .filter(PolicyHelper.havingPolicyId( - policyId)) - .findAny() - .orElseThrow( - () -> new PolicyStoreException( - "Policy with id '" - + policyId - + "' doesn't exists!")); - - policyToUpdate.update(validUntil); - bpnsContainingPolicyId.forEach(bpn -> persistence.delete(bpn, policyId)); - persistence.save(bpns, policyToUpdate); + final Policy policyToUpdate; + try { + policyToUpdate = requirePolicy(policyId, bpnsContainingPolicyId); } catch (final PolicyStoreException e) { throw new ResponseStatusException(HttpStatus.NOT_FOUND, e.getMessage(), e); } + + try { + deletePolicyForEachBpn(policyId, bpnsContainingPolicyId); + } catch (final PolicyStoreException e) { + // this is an internal server error, because normally this should not happen + // because the check if policy exists was already carried out above + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); + } + + try { + policyToUpdate.update(newValidUntil); + + for (final String bpn : newBpns) { + persistence.save(bpn, policyToUpdate); + } + + } catch (final PolicyStoreException e) { + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); + } + } + + private Policy requirePolicy(final String policyId, final List bpnsContainingPolicyId) { + return getStoredPolicies(bpnsContainingPolicyId).stream() + .filter(PolicyHelper.havingPolicyId(policyId)) + .findAny() + .orElseThrow(() -> new PolicyStoreException( + "Policy with id '" + policyId + "' doesn't exists!")); } @Override diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreControllerTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreControllerTest.java index b504e5bdab..61ca381dd5 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreControllerTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreControllerTest.java @@ -66,7 +66,7 @@ class PolicyStoreControllerTest { public static final String EXAMPLE_PAYLOAD = """ { "validUntil": "2025-12-12T23:59:59.999Z", - "payload": { + "policies": { "@context": { "odrl": "http://www.w3.org/ns/odrl/2/" }, @@ -123,10 +123,10 @@ void registerAllowedPolicy() { // act testee.registerAllowedPolicy( - new CreatePolicyRequest(now.plusMinutes(1), null, List.of(jsonObject.get("payload").asJsonObject()))); + new CreatePolicyRequest(now.plusMinutes(1), null, List.of(jsonObject.get("policies").asJsonObject()))); // assert - verify(service).registerPolicy(any(), eq(List.of("default"))); + verify(service).registerPolicy(any(), eq("default")); } @Test @@ -174,7 +174,8 @@ void deleteAllowedPolicy() { void updateAllowedPolicy() { // arrange final String policyId = "policyId"; - final UpdatePolicyRequest request = new UpdatePolicyRequest(OffsetDateTime.now(), List.of("bpn"),List.of(policyId)); + final UpdatePolicyRequest request = new UpdatePolicyRequest(OffsetDateTime.now(), List.of("bpn"), + List.of(policyId)); // act testee.updateAllowedPolicy(request); diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistenceTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistenceTest.java index 60a48e3c00..4bbf0e6eee 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistenceTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistenceTest.java @@ -74,7 +74,7 @@ void save() throws BlobPersistenceException { final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); // act - testee.save(List.of("testBpn"), policy); + testee.save("testBpn", policy); // assert verify(mockPersistence).putBlob(anyString(), any()); @@ -86,7 +86,7 @@ void saveWithoutBpn() throws BlobPersistenceException { final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); // act - testee.save(List.of("default"), policy); + testee.save("default", policy); // assert verify(mockPersistence).putBlob(anyString(), any()); @@ -100,8 +100,7 @@ void saveDuplicate() throws BlobPersistenceException, JsonProcessingException { when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(policies))); // act & assert - final List bpn = List.of("testBpn"); - assertThatThrownBy(() -> testee.save(bpn, policy)).isInstanceOf(PolicyStoreException.class); + assertThatThrownBy(() -> testee.save("testBpn", policy)).isInstanceOf(PolicyStoreException.class); } @Test @@ -112,8 +111,7 @@ void saveWithError() throws BlobPersistenceException { new BlobPersistenceException("test", new IllegalStateException())); // act & assert - final List bpn = List.of("testBpn"); - assertThatThrownBy(() -> testee.save(bpn, policy)).isInstanceOf(PolicyStoreException.class); + assertThatThrownBy(() -> testee.save("testBpn", policy)).isInstanceOf(PolicyStoreException.class); } @Test @@ -124,8 +122,7 @@ void saveWithWriteError() throws BlobPersistenceException { .putBlob(any(), any()); // act & assert - final List bpn = List.of("testBpn"); - assertThatThrownBy(() -> testee.save(bpn, policy)).isInstanceOf(PolicyStoreException.class); + assertThatThrownBy(() -> testee.save("testBpn", policy)).isInstanceOf(PolicyStoreException.class); } @Test @@ -144,7 +141,8 @@ void delete() throws BlobPersistenceException, JsonProcessingException { } @Test - void deleteShouldThrowExceptionIfPolicyWithIdDoesntExists() throws BlobPersistenceException, JsonProcessingException { + void deleteShouldThrowExceptionIfPolicyWithIdDoesntExists() + throws BlobPersistenceException, JsonProcessingException { // arrange final var policy = new Policy("policyId", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(List.of(policy)))); diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java index 93a0f38afe..25d26fc553 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java @@ -26,6 +26,7 @@ import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; @@ -87,10 +88,10 @@ void registerPolicy() { final Policy policy = new Policy("testId", now, now.plusMinutes(1), emptyList()); // act - testee.registerPolicy(policy, List.of(BPN)); + testee.registerPolicy(policy, BPN); // assert - verify(persistence).save(eq(List.of(BPN)), any()); + verify(persistence).save(eq(BPN), any()); } @Test @@ -100,10 +101,10 @@ void registerPolicyWithPermission() { final Policy policy = new Policy("testId", now, now.plusMinutes(1), createPermissions()); // act - testee.registerPolicy(policy, List.of(BPN)); + testee.registerPolicy(policy, BPN); // assert - verify(persistence).save(eq(List.of(BPN)), policyCaptor.capture()); + verify(persistence).save(eq(BPN), policyCaptor.capture()); assertThat(policyCaptor.getValue()).isNotNull(); List permissionList = policyCaptor.getValue().getPermissions(); @@ -121,8 +122,7 @@ void registerPolicyShouldThrowResponseStatusException() { doThrow(new PolicyStoreException("")).when(persistence).save(any(), any()); // assert - final List bpns = List.of(BPN); - assertThrows(ResponseStatusException.class, () -> testee.registerPolicy(policy, bpns)); + assertThatThrownBy(() -> testee.registerPolicy(policy, BPN)).isInstanceOf(ResponseStatusException.class); } @Test @@ -226,7 +226,7 @@ void whenRegisterPolicyWithMissingConstraintShouldThrowException() { } @Test - void whenUpdate() { + void updatePolicyWithBpnAndValidUntilChanged() { // arrange final String policyId = "testId"; @@ -241,8 +241,8 @@ void whenUpdate() { final Policy testPolicy = new Policy(policyId, createdOn, originalValidUntil, permissions); when(persistence.readAll()).thenReturn(Map.of(originalBpn, List.of(testPolicy))); - when(persistence.readAll(originalBpn)).thenReturn( - List.of(new Policy(policyId, createdOn, originalValidUntil, permissions))); + // get policies for bpn + when(persistence.readAll(originalBpn)).thenReturn(List.of(testPolicy)); // act testee.updatePolicies(new UpdatePolicyRequest(expectedValidUntil, List.of(expectedBpn), List.of(policyId))); @@ -251,9 +251,10 @@ void whenUpdate() { verify(persistence).delete(originalBpn, policyId); final var policyCaptor = ArgumentCaptor.forClass(Policy.class); - verify(persistence).save(eq(List.of(expectedBpn)), policyCaptor.capture()); + verify(persistence).save(eq(expectedBpn), policyCaptor.capture()); assertThat(policyCaptor.getValue().getCreatedOn()).isEqualTo(createdOn); assertThat(policyCaptor.getValue().getValidUntil()).isEqualTo(expectedValidUntil); + } @SuppressWarnings("unchecked") @@ -281,18 +282,21 @@ void updatePolicies_shouldAddPolicyToEachBpn() { // ASSERT verify(persistence).delete("bpn2", policyId); - final var bpnsCaptor = ArgumentCaptor.forClass(List.class); + final var bpnCaptor = ArgumentCaptor.forClass(String.class); final var policyCaptor = ArgumentCaptor.forClass(Policy.class); - verify(persistence).save(bpnsCaptor.capture(), policyCaptor.capture()); + verify(persistence, times(2)).save(bpnCaptor.capture(), policyCaptor.capture()); // policy added to each BPN - assertThat(policyCaptor.getValue().getPolicyId()).isEqualTo(policyId); - assertThat(bpnsCaptor.getValue()).containsAll(List.of("bpn1", "bpn2")); + assertThat(policyCaptor.getAllValues().get(0).getPolicyId()).isEqualTo(policyId); + assertThat(bpnCaptor.getAllValues().get(0)).isEqualTo("bpn1"); + assertThat(policyCaptor.getAllValues().get(1).getPolicyId()).isEqualTo(policyId); + assertThat(bpnCaptor.getAllValues().get(1)).isEqualTo("bpn2"); + } @SuppressWarnings("unchecked") @Test - void updatePolicies_shouldAddBpnsToEachPolicy() { + void updatePolicies_shouldAssociateEachPolicyGivenPolicyWithEachGivenBpn() { // ARRANGE final String policyId1 = "testId1"; @@ -325,17 +329,22 @@ void updatePolicies_shouldAddBpnsToEachPolicy() { verify(persistence).delete(bpn2, policyId1); verify(persistence).delete(bpn2, policyId2); - final var bpnsCaptor = ArgumentCaptor.forClass(List.class); + final var bpnsCaptor = ArgumentCaptor.forClass(String.class); final var policyCaptor = ArgumentCaptor.forClass(Policy.class); - verify(persistence, times(2)).save(bpnsCaptor.capture(), policyCaptor.capture()); + verify(persistence, times(4)).save(bpnsCaptor.capture(), policyCaptor.capture()); // each BPNs added to policy 1 assertThat(policyCaptor.getAllValues().get(0).getPolicyId()).isEqualTo(policyId1); - assertThat(bpnsCaptor.getAllValues().get(0)).containsAll(List.of("bpn1", "bpn2")); + assertThat(bpnsCaptor.getAllValues().get(0)).isEqualTo("bpn1"); + assertThat(policyCaptor.getAllValues().get(1).getPolicyId()).isEqualTo(policyId1); + assertThat(bpnsCaptor.getAllValues().get(1)).isEqualTo("bpn2"); // each BPNs added to policy 2 - assertThat(bpnsCaptor.getAllValues().get(1)).containsAll(List.of("bpn1", "bpn2")); - assertThat(policyCaptor.getAllValues().get(1).getPolicyId()).isEqualTo(policyId2); + assertThat(policyCaptor.getAllValues().get(2).getPolicyId()).isEqualTo(policyId2); + assertThat(bpnsCaptor.getAllValues().get(2)).isEqualTo("bpn1"); + assertThat(policyCaptor.getAllValues().get(3).getPolicyId()).isEqualTo(policyId2); + assertThat(bpnsCaptor.getAllValues().get(3)).isEqualTo("bpn2"); + } @Test diff --git a/local/testing/request-collection/IRS_Request_Collection.json b/local/testing/request-collection/IRS_Request_Collection.json index 0f0b8d6f68..c6abc27a0b 100644 --- a/local/testing/request-collection/IRS_Request_Collection.json +++ b/local/testing/request-collection/IRS_Request_Collection.json @@ -3299,7 +3299,7 @@ "method": "POST", "body": { "mimeType": "application/json", - "text": "{\n\t\"@context\": {\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t},\n\t\"@id\": \"policy-id\",\n\t\"policy\": {\n\t\t\"odrl:permission\": [\n\t\t\t{\n\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n}" + "text": "{\n\t\"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumber\": \"BPNL00000000BJTL\",\n\t\"policies\": [\n\t\t{\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"policy-id12\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}" }, "parameters": [], "headers": [ From b697f631a3e1910567c05464a7e1290f581eae66 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 27 Mar 2024 21:24:46 +0100 Subject: [PATCH 02/58] fix(impl): [#199] Add 500er to OpenApiExamples.java --- .../tractusx/irs/configuration/OpenApiExamples.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java index 38d65986ec..8d67465445 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/OpenApiExamples.java @@ -99,6 +99,13 @@ public class OpenApiExamples { public void createExamples(final Components components) { components.addExamples("job-handle", toExample(createJobHandle(JOB_HANDLE_ID_1))); + components.addExamples("error-response-500", toExample(ErrorResponse.builder() + .withMessages( + List.of("InternalServerError")) + .withError("Internal Server Error") + .withStatusCode( + HttpStatus.INTERNAL_SERVER_ERROR) + .build())); components.addExamples("error-response-400", toExample(ErrorResponse.builder() .withMessages( List.of("BadRequestException")) From c7bd17d43deeb5166e8750aade0cfed8ba762cee Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 27 Mar 2024 21:51:33 +0100 Subject: [PATCH 03/58] fix(impl): [#199] Add CreatePoliciesResponse --- .../models/CreatePoliciesResponse.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java new file mode 100644 index 0000000000..9111fca9e9 --- /dev/null +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java @@ -0,0 +1,35 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.policystore.models; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Builder; +import org.eclipse.tractusx.irs.edc.client.policy.Policy; + +/** + * Response for registration of policy. + */ +@Builder +public record CreatePoliciesResponse(@Schema(description = "ID of the registered policy") String policyId) { + + public static CreatePoliciesResponse fromPolicy(final Policy policy) { + return CreatePoliciesResponse.builder().policyId(policy.getPolicyId()).build(); + } +} From 6c7fd6f11b958f38ee077356d4997ebbeaf4b4f4 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 27 Mar 2024 21:52:39 +0100 Subject: [PATCH 04/58] fix(impl): [#199] Correct CreatePolicyRequest OpenAPI --- .../models/CreatePolicyRequest.java | 86 ++++++++++--------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java index 8a21513433..07901d178e 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java @@ -24,7 +24,6 @@ package org.eclipse.tractusx.irs.policystore.models; import java.time.OffsetDateTime; -import java.util.List; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.json.JsonObject; @@ -36,50 +35,59 @@ @SuppressWarnings("FileTabCharacter") @Schema(description = "Request to add a policy") public record CreatePolicyRequest( - @NotNull @Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations", - example = "2025-12-12T23:59:59.999Z") OffsetDateTime validUntil, - @Schema() String businessPartnerNumber, - @NotNull @Schema(example = CreatePolicyRequest.EXAMPLE_PAYLOAD) List policies) { + + @NotNull // + @Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations.", + example = "2025-12-12T23:59:59.999Z") // + OffsetDateTime validUntil, // + + @Schema(description = """ + The business partner number (BPN) for which the policy should be registered. + This parameter is optional. + If not set the policy is registered for each existing BPN. + """, example = "BPNL00000123ABCD") // + String businessPartnerNumber, + + @NotNull // + @Schema(description = "The policy payload.", example = CreatePolicyRequest.EXAMPLE_PAYLOAD) // + JsonObject payload) { @SuppressWarnings("java:S2479") // this value is used by open-api to show example policies // \u0009 character is required for this value to be correctly shown in open-api public static final String EXAMPLE_PAYLOAD = """ - [ - { - { - "@context": { - "odrl": "http://www.w3.org/ns/odrl/2/" - }, - "@id": "policy-id", - "@type": "PolicyDefinitionRequestDto", - "policy": { - "@type": "Policy", - "odrl:permission": [ - { - "odrl:action": "USE", - "odrl:constraint": { - "odrl:and": [ - { - "odrl:leftOperand": "Membership", - "odrl:operator": { - "@id": "odrl:eq" - }, - "odrl:rightOperand": "active" + { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@id": "policy-id", + "@type": "PolicyDefinitionRequestDto", + "policy": { + "@type": "Policy", + "odrl:permission": [ + { + "odrl:action": "USE", + "odrl:constraint": { + "odrl:and": [ + { + "odrl:leftOperand": "Membership", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "active" + }, + { + "odrl:leftOperand": "PURPOSE", + "odrl:operator": { + "@id": "odrl:eq" }, - { - "odrl:leftOperand": "PURPOSE", - "odrl:operator": { - "@id": "odrl:eq" - }, - "odrl:rightOperand": "ID 3.1 Trace" - } - ] - } + "odrl:rightOperand": "ID 3.1 Trace" + } + ] } - ] - } - } - ] + } + ] + } + } """; } From f17fedafbe7618e0b8d2f65f11970abf49293934 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 27 Mar 2024 22:13:22 +0100 Subject: [PATCH 05/58] fix(impl): [#199] Add BPN regex constant --- .../irs/policystore/controllers/PolicyStoreController.java | 2 ++ .../irs/policystore/models/CreatePolicyRequest.java | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index d6bddb8939..4364742eba 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -77,6 +77,8 @@ }) public class PolicyStoreController { + public static final String BPN_REGEX = "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}"; + private final PolicyStoreService service; private final EdcTransformer edcTransformer; private static final String DEFAULT = "default"; diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java index 07901d178e..9b297e5979 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java @@ -23,11 +23,14 @@ ********************************************************************************/ package org.eclipse.tractusx.irs.policystore.models; +import static org.eclipse.tractusx.irs.policystore.controllers.PolicyStoreController.BPN_REGEX; + import java.time.OffsetDateTime; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.json.JsonObject; import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; /** * Object for API to create policy @@ -45,8 +48,8 @@ public record CreatePolicyRequest( The business partner number (BPN) for which the policy should be registered. This parameter is optional. If not set the policy is registered for each existing BPN. - """, example = "BPNL00000123ABCD") // - String businessPartnerNumber, + """, example = "BPNL1234567890AB") // + @Pattern(regexp = BPN_REGEX, message = " Invalid BPN.") String businessPartnerNumber, @NotNull // @Schema(description = "The policy payload.", example = CreatePolicyRequest.EXAMPLE_PAYLOAD) // From df32eb27531da21e93b59092564512c28641abef Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 27 Mar 2024 22:14:11 +0100 Subject: [PATCH 06/58] fix(impl): [#199] Fix OpenAPI --- .../policystore/controllers/PolicyStoreController.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 4364742eba..6da98f51fa 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -88,7 +88,15 @@ public class PolicyStoreController { security = @SecurityRequirement(name = "api_key"), tags = { "Item Relationship Service" }, description = "Register a policy that should be accepted in EDC negotiation.") @ApiResponses(value = { @ApiResponse(responseCode = "201"), - @ApiResponse(responseCode = "400", description = "Policy registration failed.", + @ApiResponse(responseCode = "500", + description = "Policy registration failed due to an internal error.", + content = { @Content(mediaType = APPLICATION_JSON_VALUE, + schema = @Schema(implementation = ErrorResponse.class), + examples = @ExampleObject(name = "error", + ref = "#/components/examples/error-response-500")) + }), + @ApiResponse(responseCode = "400", + description = "Policy registration failed due to an invalid request.", content = { @Content(mediaType = APPLICATION_JSON_VALUE, schema = @Schema(implementation = ErrorResponse.class), examples = @ExampleObject(name = "error", From 00dfa3c83b1924855bbf6b466fe546c645ec1779 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 27 Mar 2024 22:33:01 +0100 Subject: [PATCH 07/58] fix(impl): [#199] Update insomnia collection for POST policy --- local/testing/request-collection/IRS_Request_Collection.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/local/testing/request-collection/IRS_Request_Collection.json b/local/testing/request-collection/IRS_Request_Collection.json index c6abc27a0b..1e512acea8 100644 --- a/local/testing/request-collection/IRS_Request_Collection.json +++ b/local/testing/request-collection/IRS_Request_Collection.json @@ -139,7 +139,7 @@ { "_id": "req_95aa08cefddc4743afc85fcabf40e4ee", "parentId": "fld_c751e5e73d5248a3ae22a44bafae7906", - "modified": 1711099862861, + "modified": 1711573295984, "created": 1687243182397, "url": "{{IRS_HOST}}/irs/policies", "name": "Register policy", @@ -147,7 +147,7 @@ "method": "POST", "body": { "mimeType": "application/json", - "text": "{\n\t\"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumbers\": [\n\t\t\"BPNL00000001CRHK\"\n\t],\n\t\"payload\": [\n\t\t{\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"test-1\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"test-12\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}" + "text": "{\n\t\"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumber\": \"x\",\n\t\"payload\":\n\t\t{\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"mf-policy-4\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n}" }, "parameters": [], "headers": [ @@ -165,7 +165,6 @@ }, "metaSortKey": -1683962737633.5, "isPrivate": false, - "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, From 7e07b493e3678a1e98c62c79f4a894f018e9da97 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 01:47:32 +0100 Subject: [PATCH 08/58] fix(impl): [#199] Improve variable naming --- .../org/eclipse/tractusx/irs/IrsApplicationTests.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java index 8fc619a1e5..c3b0e50fc1 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java @@ -77,11 +77,12 @@ class IrsApplicationTests { @Test void generatedOpenApiMatchesContract() throws Exception { - final String generatedYaml = this.restTemplate.getForObject("http://localhost:" + port + "/api/api-docs.yaml", String.class); - final InputStream fixedYaml = Files.newInputStream(Path.of("../docs/src/api/irs-api.yaml")); + final String generatedYaml = this.restTemplate.getForObject("http://localhost:" + port + "/api/api-docs.yaml", + String.class); + final InputStream definedYaml = Files.newInputStream(Path.of("../docs/src/api/irs-api.yaml")); final ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); - final Map fixedYamlMap = mapper.readerForMapOf(Object.class).readValue(fixedYaml); + final Map definedYamlMap = mapper.readerForMapOf(Object.class).readValue(definedYaml); final Map generatedYamlMap = mapper.readerForMapOf(Object.class).readValue(generatedYaml); // To correctly display both documentations examples - manual and generated by annotations - @@ -93,7 +94,8 @@ void generatedOpenApiMatchesContract() throws Exception { .ignoringFields("components.schemas.Jobs.example") .ignoringFields("components.schemas.Policy") .ignoringFields("components.schemas.BatchResponse.example") - .isEqualTo(fixedYamlMap); + .isEqualTo(definedYamlMap); + } @Test From 4a209189ff045a6effbb06364c2c89c9930aa497 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 01:49:22 +0100 Subject: [PATCH 09/58] fix(impl): [#199] Add BPN validator --- .../controllers/PolicyStoreController.java | 3 +- .../BusinessPartnerNumberListValidator.java | 53 +++++++++++++ .../ValidListOfBusinessPartnerNumbers.java | 43 ++++++++++ ...usinessPartnerNumberListValidatorTest.java | 79 +++++++++++++++++++ 4 files changed, 177 insertions(+), 1 deletion(-) create mode 100644 irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java create mode 100644 irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java create mode 100644 irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 6da98f51fa..6324ac0e00 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -51,6 +51,7 @@ import org.eclipse.tractusx.irs.policystore.models.PolicyResponse; import org.eclipse.tractusx.irs.policystore.models.UpdatePolicyRequest; import org.eclipse.tractusx.irs.policystore.services.PolicyStoreService; +import org.eclipse.tractusx.irs.policystore.validators.BusinessPartnerNumberListValidator; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.DeleteMapping; @@ -77,7 +78,7 @@ }) public class PolicyStoreController { - public static final String BPN_REGEX = "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}"; + public static final String BPN_REGEX = BusinessPartnerNumberListValidator.BPN_REGEX; private final PolicyStoreService service; private final EdcTransformer edcTransformer; diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java new file mode 100644 index 0000000000..7cd81e3f8e --- /dev/null +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java @@ -0,0 +1,53 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.policystore.validators; + +import java.util.List; +import java.util.regex.Pattern; + +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + +public class BusinessPartnerNumberListValidator + implements ConstraintValidator> { + + public static final String BPN_REGEX = "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}"; + + private static final Pattern PATTERN = Pattern.compile(BPN_REGEX); + + @Override + public boolean isValid(List value, ConstraintValidatorContext context) { + if (value == null || value.isEmpty()) { + return true; + } + + for (int i = 0; i < value.size(); i++) { + if (!PATTERN.matcher(value.get(i)).matches()) { + context.disableDefaultConstraintViolation(); + context.buildConstraintViolationWithTemplate( + "The business partner number at index %d is invalid (should conform to pattern '%s')".formatted( + i, BPN_REGEX)).addConstraintViolation(); + return false; + } + } + + return true; + } +} \ No newline at end of file diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java new file mode 100644 index 0000000000..bd68f94617 --- /dev/null +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java @@ -0,0 +1,43 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.policystore.validators; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + +@Documented +@Constraint(validatedBy = BusinessPartnerNumberListValidator.class) +@Target({ ElementType.FIELD, + ElementType.PARAMETER +}) +@Retention(RetentionPolicy.RUNTIME) +public @interface ValidListOfBusinessPartnerNumbers { + String message() default "Invalid list of business partner numbers"; + + Class[] groups() default { }; + + Class[] payload() default { }; +} \ No newline at end of file diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java new file mode 100644 index 0000000000..018f9da437 --- /dev/null +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java @@ -0,0 +1,79 @@ +/******************************************************************************** + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.policystore.validators; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.verify; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import jakarta.validation.ConstraintValidatorContext; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Answers; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class BusinessPartnerNumberListValidatorTest { + + public static final String VALID_BPN_1 = "BPNL1234567890AB"; + public static final String VALID_BPN_2 = "BPNL123456789012"; + + @InjectMocks + private BusinessPartnerNumberListValidator validator; + + @Captor + private ArgumentCaptor messageCaptor; + + @Mock(answer = Answers.RETURNS_DEEP_STUBS) + private ConstraintValidatorContext contextMock; + + @Test + void withEmptyListOfStrings() { + assertThat(validator.isValid(Collections.emptyList(), contextMock)).isTrue(); + } + + @Test + void withNull() { + assertThat(validator.isValid(null, contextMock)).isTrue(); + } + + @Test + void withValidListOfStrings() { + List validList = Arrays.asList(VALID_BPN_1, VALID_BPN_2); + assertThat(validator.isValid(validList, contextMock)).isTrue(); + } + + @Test + void withListContainingInvalidBPN() { + List invalidList = Arrays.asList(VALID_BPN_1, "INVALID_BPN", VALID_BPN_2); + assertThat(validator.isValid(invalidList, contextMock)).isFalse(); + // verify(contextMock).buildConstraintViolationWithTemplate( + //// startsWith("Element at index 1 does not match the pattern")); + verify(contextMock).buildConstraintViolationWithTemplate(messageCaptor.capture()); + assertThat(messageCaptor.getValue()).contains("BPN").contains(" index 1 ").contains("invalid"); + } +} From 5dee36ac44c02bb21d52fbc9dc068824df5e7bdf Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 01:51:42 +0100 Subject: [PATCH 10/58] fix(impl): [#199] Fix api doc --- docs/src/api/irs-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index 406fcf0808..058dbf70a6 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -2964,7 +2964,7 @@ components: UpdatePolicyRequest: type: object additionalProperties: false - description: Request to add a policy + description: Request to update a policy properties: businessPartnerNumbers: type: array From d5000256d2a63edf9916442cb489da8b856252b1 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 01:52:30 +0100 Subject: [PATCH 11/58] fix(impl): [#199] Fix UpdatePolicyRequest attribute naming --- docs/src/api/irs-api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index 058dbf70a6..bdc7aa7534 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -2970,7 +2970,7 @@ components: type: array items: type: string - policiesIds: + policyIds: type: array items: type: string From fba5c64782acab126219ae09f4c6196a4d4fd23b Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 01:53:32 +0100 Subject: [PATCH 12/58] fix(impl): [#199] Fix UpdatePolicyRequest (attribute name and validators) --- .../models/UpdatePolicyRequest.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/UpdatePolicyRequest.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/UpdatePolicyRequest.java index c247b19821..cf10874e5d 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/UpdatePolicyRequest.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/UpdatePolicyRequest.java @@ -27,13 +27,27 @@ import java.util.List; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; +import org.eclipse.tractusx.irs.policystore.validators.ValidListOfBusinessPartnerNumbers; /** * Request object for policy update */ @Schema(description = "Request to update a policy") public record UpdatePolicyRequest( - @Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations") @NotNull OffsetDateTime validUntil, - List businessPartnerNumbers, List policiesIds) { + + @Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations.") // + @NotNull // + OffsetDateTime validUntil, // + + @Schema(description = "Business Partner Number (BPN).") // + @ValidListOfBusinessPartnerNumbers // + List businessPartnerNumbers, // + + @Schema(description = "The IDs of the policies to be updated.") // + @NotNull // + @NotEmpty // + List policyIds // +) { } From bb09996c3ceb1977248877666919b2a4fc67ae48 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 01:54:32 +0100 Subject: [PATCH 13/58] fix(impl): [#199] PolicyPersistence: return saved policy --- .../irs/policystore/persistence/PolicyPersistence.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistence.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistence.java index 64fb2885c0..c240987eed 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistence.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistence.java @@ -70,11 +70,12 @@ public PolicyPersistence(@Qualifier(POLICY_BLOB_PERSISTENCE) final BlobPersisten this.mapper = mapper; } - public void save(final String bpn, final Policy policy) { + public Policy save(final String bpn, final Policy policy) { final List policiesForBpn = readAll(bpn); checkIfPolicyAlreadyExists(policy, policiesForBpn); policiesForBpn.add(policy); save(bpn, policiesForBpn); + return policy; } private static void checkIfPolicyAlreadyExists(final Policy policy, final List policies) { From 01bda7904450c20d8ac0e46d6b1581e2d7ef019d Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 01:57:23 +0100 Subject: [PATCH 14/58] fix(impl): [#199] Correct updateAllowedPolicy API doc and code formatting --- .../controllers/PolicyStoreController.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 6324ac0e00..00d3acc2ea 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -196,10 +196,17 @@ public void deleteAllowedPolicy(@PathVariable("policyId") final String policyId) service.deletePolicy(policyId); } - @Operation(operationId = "updateAllowedPolicy", summary = "Updates an existing policy.", + @Operation(operationId = "updateAllowedPolicy", summary = "Updates existing policies.", security = @SecurityRequirement(name = "api_key"), tags = { "Item Relationship Service" }, - description = "Updates an existing policy.") + description = "Updates existing policies.") @ApiResponses(value = { @ApiResponse(responseCode = "200"), + @ApiResponse(responseCode = "500", + description = "Updating policies failed due to an internal error.", + content = { @Content(mediaType = APPLICATION_JSON_VALUE, + schema = @Schema(implementation = ErrorResponse.class), + examples = @ExampleObject(name = "error", + ref = "#/components/examples/error-response-500")) + }), @ApiResponse(responseCode = "400", description = "Policy update failed.", content = { @Content(mediaType = APPLICATION_JSON_VALUE, schema = @Schema(implementation = ErrorResponse.class), @@ -222,7 +229,7 @@ public void deleteAllowedPolicy(@PathVariable("policyId") final String policyId) @PutMapping("/policies") @ResponseStatus(HttpStatus.OK) @PreAuthorize("hasAuthority('" + IrsRoles.ADMIN_IRS + "')") - public void updateAllowedPolicy(final @Valid @RequestBody UpdatePolicyRequest request) { + public void updateAllowedPolicy(@Valid @RequestBody final UpdatePolicyRequest request) { service.updatePolicies(request); } From 8e89f0d821313748fa2819bcd25a280e58d1ce5d Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 02:26:24 +0100 Subject: [PATCH 15/58] fix(impl): [#199] Fixes, improvements, move of business logic to service By moving business logic from PolicyStoreController to PolicyStoreService the PolicyStoreServiceTest can test all business logic while the PolicyStoreControllerTest can focus on web layer concerns such as parameter validation. Besides this, tests were structured via Nested in order to group tests for each method together. This helps not to forget about test cases. --- .../controllers/PolicyStoreController.java | 23 +- .../services/PolicyStoreService.java | 133 +++-- .../PolicyStoreControllerTest.java | 224 +++---- .../persistence/PolicyPersistenceTest.java | 263 +++++---- .../services/PolicyStoreServiceTest.java | 556 +++++++++++------- 5 files changed, 705 insertions(+), 494 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 00d3acc2ea..e5db25cb70 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -46,7 +46,7 @@ import org.eclipse.tractusx.irs.common.auth.IrsRoles; import org.eclipse.tractusx.irs.dtos.ErrorResponse; import org.eclipse.tractusx.irs.edc.client.policy.Policy; -import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; +import org.eclipse.tractusx.irs.policystore.models.CreatePoliciesResponse; import org.eclipse.tractusx.irs.policystore.models.CreatePolicyRequest; import org.eclipse.tractusx.irs.policystore.models.PolicyResponse; import org.eclipse.tractusx.irs.policystore.models.UpdatePolicyRequest; @@ -64,6 +64,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.server.ResponseStatusException; /** * Policy Store REST controller. @@ -116,20 +117,18 @@ public class PolicyStoreController { ref = "#/components/examples/error-response-403")) }), }) - @PostMapping("/policies") @ResponseStatus(HttpStatus.CREATED) @PreAuthorize("hasAuthority('" + IrsRoles.ADMIN_IRS + "')") - public void registerAllowedPolicy(final @RequestBody CreatePolicyRequest request) { - request.policies() - .stream() - .map(payload -> { - final Policy policy = edcTransformer.transformToPolicy(payload); - policy.setValidUntil(request.validUntil()); - return policy; - }) - .forEach(policy -> service.registerPolicy(policy, - request.businessPartnerNumber() == null ? DEFAULT : request.businessPartnerNumber())); + public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final CreatePolicyRequest request) { + + final Policy registeredPolicy = service.registerPolicy(request); + + if (registeredPolicy == null) { + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Policy was not registered"); + } + + return CreatePoliciesResponse.fromPolicy(registeredPolicy); } @Operation(operationId = "getAllowedPoliciesByBpn", diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index d710392e1a..37b9e7cbaf 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -34,9 +34,11 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.TreeSet; import java.util.stream.Collectors; +import jakarta.json.JsonObject; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.irs.edc.client.policy.AcceptedPoliciesProvider; import org.eclipse.tractusx.irs.edc.client.policy.AcceptedPolicy; @@ -47,8 +49,10 @@ import org.eclipse.tractusx.irs.edc.client.policy.Permission; import org.eclipse.tractusx.irs.edc.client.policy.Policy; import org.eclipse.tractusx.irs.edc.client.policy.PolicyType; +import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; import org.eclipse.tractusx.irs.policystore.config.DefaultAcceptedPoliciesConfig; import org.eclipse.tractusx.irs.policystore.exceptions.PolicyStoreException; +import org.eclipse.tractusx.irs.policystore.models.CreatePolicyRequest; import org.eclipse.tractusx.irs.policystore.models.UpdatePolicyRequest; import org.eclipse.tractusx.irs.policystore.persistence.PolicyPersistence; import org.springframework.http.HttpStatus; @@ -60,28 +64,60 @@ */ @Service @Slf4j +@SuppressWarnings({ "PMD.ExcessiveImports", + "PMD.TooManyMethods" +}) public class PolicyStoreService implements AcceptedPoliciesProvider { public static final int DEFAULT_POLICY_LIFETIME_YEARS = 5; + private final List allowedPoliciesFromConfig; + private final PolicyPersistence persistence; + + private final EdcTransformer edcTransformer; + private final Clock clock; - private static final String MISSING_REQUEST_FIELD_MESSAGE = "Request does not contain all required fields. Missing: %s"; + + private static final String MISSING_REQUEST_FIELD_MESSAGE = + "Request does not contain all required fields. " + "Missing: %s"; + private static final String DEFAULT = "default"; public PolicyStoreService(final DefaultAcceptedPoliciesConfig defaultAcceptedPoliciesConfig, - final PolicyPersistence persistence, final Clock clock) { + final PolicyPersistence persistence, final EdcTransformer edcTransformer, final Clock clock) { this.allowedPoliciesFromConfig = createDefaultPolicyFromConfig(defaultAcceptedPoliciesConfig); this.persistence = persistence; + this.edcTransformer = edcTransformer; this.clock = clock; } - public void registerPolicy(final Policy policy, final String businessPartnersNumber) { + /** + * Registers a policy. + * + * @param request the {@link CreatePolicyRequest} + * @return the registered policy + */ + public Policy registerPolicy(final CreatePolicyRequest request) { + + final Policy registeredPolicy; + final JsonObject policyJson = request.payload(); + + final Policy policy = edcTransformer.transformToPolicy(policyJson); + policy.setValidUntil(request.validUntil()); + + registeredPolicy = doRegisterPolicy(policy, + request.businessPartnerNumber() == null ? DEFAULT : request.businessPartnerNumber()); + + return registeredPolicy; + } + + public Policy doRegisterPolicy(final Policy policy, final String businessPartnersNumber) { validatePolicy(policy); policy.setCreatedOn(OffsetDateTime.now(clock)); log.info("Registering new policy with id {}, valid until {}", policy.getPolicyId(), policy.getValidUntil()); try { - persistence.save(businessPartnersNumber, policy); + return persistence.save(businessPartnersNumber, policy); } catch (final PolicyStoreException e) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage(), e); } @@ -115,17 +151,19 @@ public Map> getPolicies(final List bpnList) { if (bpnList == null) { return getAllStoredPolicies(); } else { - return bpnList.stream() - .map(bpn -> new AbstractMap.SimpleEntry<>(bpn, getStoredPolicies(List.of(bpn)))) - .collect( - Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); + return bpnList.stream().map(bpn -> { + final List storedPolicies = getStoredPolicies(List.of(bpn)); + return new AbstractMap.SimpleEntry<>(bpn, storedPolicies); + }).collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); } } public List getStoredPolicies(final List bpnls) { log.info("Reading all stored polices for BPN {}", bpnls); final List storedPolicies = new LinkedList<>(); - bpnls.forEach(bpn -> storedPolicies.addAll(persistence.readAll(bpn))); + for (final String bpn : bpnls) { + storedPolicies.addAll(persistence.readAll(bpn)); + } if (storedPolicies.isEmpty()) { log.info("Policy store is empty, returning default values from config"); @@ -144,62 +182,60 @@ public Map> getAllStoredPolicies() { } public void deletePolicy(final String policyId) { - try { - log.info("Getting all policies to find correct bpn number"); - final List bpnsContainingPolicyId = PolicyHelper.findBpnsByPolicyId(getAllStoredPolicies(), - policyId); + log.info("Getting all policies to find correct bpn number"); + final List bpnsContainingPolicyId = PolicyHelper.findBpnsByPolicyId(getAllStoredPolicies(), policyId); + if (bpnsContainingPolicyId.isEmpty()) { + throw new ResponseStatusException(HttpStatus.NOT_FOUND, + "Policy with id '%s' not found".formatted(policyId)); + } + + try { log.info("Deleting policy with id {}", policyId); bpnsContainingPolicyId.forEach(bpn -> persistence.delete(bpn, policyId)); } catch (final PolicyStoreException e) { - throw new ResponseStatusException(HttpStatus.NOT_FOUND, e.getMessage(), e); + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); } } - private void deletePolicyForEachBpn(final String policyId, List bpnList) { - for (final String bpn : bpnList) { - persistence.delete(bpn, policyId); + private void deletePolicyForEachBpn(final String policyId, final List bpnList) { + try { + for (final String bpn : bpnList) { + persistence.delete(bpn, policyId); + } + } catch (final PolicyStoreException e) { + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); } } public void updatePolicies(final UpdatePolicyRequest request) { - for (final String policyId : request.policiesIds()) { + for (final String policyId : request.policyIds()) { updatePolicy(policyId, request.validUntil(), request.businessPartnerNumbers() == null ? List.of(DEFAULT) : request.businessPartnerNumbers()); } } - public void updatePolicy(final String policyId, final OffsetDateTime newValidUntil, final List newBpns) { + public void updatePolicy(final String policyId, final OffsetDateTime newValidUntil, + final List newBusinessPartnerNumbers) { log.info("Updating policy with id {}", policyId); - final List bpnsContainingPolicyId; - try { - final Map> allStoredPolicies = getAllStoredPolicies(); - bpnsContainingPolicyId = PolicyHelper.findBpnsByPolicyId(allStoredPolicies, policyId); - } catch (PolicyStoreException e) { - throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); - } + final List businessPartnerNumbersContainingPolicyId = findBusinessPartnerNumbersByPolicyId(policyId); - final Policy policyToUpdate; - try { - policyToUpdate = requirePolicy(policyId, bpnsContainingPolicyId); - } catch (final PolicyStoreException e) { - throw new ResponseStatusException(HttpStatus.NOT_FOUND, e.getMessage(), e); - } + final Policy policyToUpdate = findPolicy(policyId, businessPartnerNumbersContainingPolicyId).orElseThrow( + () -> new ResponseStatusException(HttpStatus.NOT_FOUND, + "Policy with id '" + policyId + "' doesn't exists!")); - try { - deletePolicyForEachBpn(policyId, bpnsContainingPolicyId); - } catch (final PolicyStoreException e) { - // this is an internal server error, because normally this should not happen - // because the check if policy exists was already carried out above - throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); - } + deletePolicyForEachBpn(policyId, businessPartnerNumbersContainingPolicyId); + updatePolicy(policyToUpdate, newValidUntil, newBusinessPartnerNumbers); + } + private void updatePolicy(final Policy policyToUpdate, final OffsetDateTime newValidUntil, + final List newBusinessPartnerNumbers) { try { policyToUpdate.update(newValidUntil); - for (final String bpn : newBpns) { + for (final String bpn : newBusinessPartnerNumbers) { persistence.save(bpn, policyToUpdate); } @@ -208,12 +244,21 @@ public void updatePolicy(final String policyId, final OffsetDateTime newValidUnt } } - private Policy requirePolicy(final String policyId, final List bpnsContainingPolicyId) { + private List findBusinessPartnerNumbersByPolicyId(final String policyId) { + final List businessPartnerNumbersContainingPolicyId; + try { + final Map> allStoredPolicies = getAllStoredPolicies(); + businessPartnerNumbersContainingPolicyId = PolicyHelper.findBpnsByPolicyId(allStoredPolicies, policyId); + } catch (PolicyStoreException e) { + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage(), e); + } + return businessPartnerNumbersContainingPolicyId; + } + + private Optional findPolicy(final String policyId, final List bpnsContainingPolicyId) { return getStoredPolicies(bpnsContainingPolicyId).stream() .filter(PolicyHelper.havingPolicyId(policyId)) - .findAny() - .orElseThrow(() -> new PolicyStoreException( - "Policy with id '" + policyId + "' doesn't exists!")); + .findAny(); } @Override diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreControllerTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreControllerTest.java index 61ca381dd5..efb004e775 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreControllerTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreControllerTest.java @@ -24,8 +24,7 @@ package org.eclipse.tractusx.irs.policystore.controllers; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -39,9 +38,7 @@ import jakarta.json.Json; import jakarta.json.JsonObject; import jakarta.json.JsonReader; -import org.eclipse.edc.core.transform.TypeTransformerRegistryImpl; -import org.eclipse.edc.jsonld.TitaniumJsonLd; -import org.eclipse.edc.spi.monitor.ConsoleMonitor; +import jakarta.servlet.http.HttpServletRequest; import org.eclipse.tractusx.irs.edc.client.policy.Constraint; import org.eclipse.tractusx.irs.edc.client.policy.Constraints; import org.eclipse.tractusx.irs.edc.client.policy.Operator; @@ -49,139 +46,160 @@ import org.eclipse.tractusx.irs.edc.client.policy.Permission; import org.eclipse.tractusx.irs.edc.client.policy.Policy; import org.eclipse.tractusx.irs.edc.client.policy.PolicyType; -import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; +import org.eclipse.tractusx.irs.policystore.models.CreatePoliciesResponse; import org.eclipse.tractusx.irs.policystore.models.CreatePolicyRequest; import org.eclipse.tractusx.irs.policystore.models.PolicyResponse; import org.eclipse.tractusx.irs.policystore.models.UpdatePolicyRequest; import org.eclipse.tractusx.irs.policystore.services.PolicyStoreService; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(MockitoExtension.class) -class PolicyStoreControllerTest { +public class PolicyStoreControllerTest { - public static final String EXAMPLE_PAYLOAD = """ + public static final String REGISTER_POLICY_EXAMPLE_PAYLOAD = """ { - "validUntil": "2025-12-12T23:59:59.999Z", - "policies": { - "@context": { - "odrl": "http://www.w3.org/ns/odrl/2/" - }, - "@id": "policy-id", - "policy": { - "odrl:permission": [ - { - "odrl:action": "USE", - "odrl:constraint": { - "odrl:and": [ - { - "odrl:leftOperand": "Membership", - "odrl:operator": { - "@id": "odrl:eq" - }, - "odrl:rightOperand": "active" - }, - { - "odrl:leftOperand": "PURPOSE", - "odrl:operator": { - "@id": "odrl:eq" - }, - "odrl:rightOperand": "ID 3.1 Trace" - } - ] - } - } - ] - } - } - } + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@id": "policy-id", + "policy": { + "odrl:permission": [ + { + "odrl:action": "USE", + "odrl:constraint": { + "odrl:and": [ + { + "odrl:leftOperand": "Membership", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "active" + }, + { + "odrl:leftOperand": "PURPOSE", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "ID 3.1 Trace" + } + ] + } + } + ] + } + } """; private PolicyStoreController testee; - private final TitaniumJsonLd titaniumJsonLd = new TitaniumJsonLd(new ConsoleMonitor()); - private final EdcTransformer edcTransformer = new EdcTransformer(new com.fasterxml.jackson.databind.ObjectMapper(), - titaniumJsonLd, new TypeTransformerRegistryImpl()); @Mock - private PolicyStoreService service; + private PolicyStoreService policyStoreServiceMock; @BeforeEach void setUp() { - testee = new PolicyStoreController(service, edcTransformer); + testee = new PolicyStoreController(policyStoreServiceMock, mock(HttpServletRequest.class)); } - @Test - void registerAllowedPolicy() { - // arrange - final OffsetDateTime now = OffsetDateTime.now(); - JsonReader jsonReader = Json.createReader(new StringReader(EXAMPLE_PAYLOAD)); - JsonObject jsonObject = jsonReader.readObject(); - jsonReader.close(); - - // act - testee.registerAllowedPolicy( - new CreatePolicyRequest(now.plusMinutes(1), null, List.of(jsonObject.get("policies").asJsonObject()))); - - // assert - verify(service).registerPolicy(any(), eq("default")); + @Nested + class RegisterPolicyTests { + + @Test + void registerAllowedPolicy() { + // arrange + final OffsetDateTime now = OffsetDateTime.now(); + final JsonObject jsonObject; + try (JsonReader jsonReader = Json.createReader(new StringReader(REGISTER_POLICY_EXAMPLE_PAYLOAD))) { + jsonObject = jsonReader.readObject(); + } + + // act + final CreatePolicyRequest request = new CreatePolicyRequest(now.plusMinutes(1), null, + jsonObject.get("policy").asJsonObject()); + when(policyStoreServiceMock.registerPolicy(request)).thenReturn(Policy.builder().policyId("dummy").build()); + final CreatePoliciesResponse createPoliciesResponse = testee.registerAllowedPolicy(request); + + // assert + verify(policyStoreServiceMock).registerPolicy(request); + assertThat(createPoliciesResponse.policyId()).isEqualTo("dummy"); + } } - @Test - void getPolicies() { - // arrange - final List policies = List.of( - new Policy("testId", OffsetDateTime.now(), OffsetDateTime.now(), createPermissions())); - final String bpn = "bpn1"; - when(service.getPolicies(List.of(bpn))).thenReturn(Map.of(bpn, policies)); - - // act - final Map> returnedPolicies = testee.getPolicies(List.of(bpn)); - - // assert - assertThat(returnedPolicies.get(bpn)).isEqualTo( - policies.stream().map(PolicyResponse::fromPolicy).collect(Collectors.toList())); + @Nested + class GetPolicyTests { + + @Test + void getPolicies() { + // arrange + final List policies = List.of( + new Policy("testId", OffsetDateTime.now(), OffsetDateTime.now(), createPermissions())); + final String bpn = "bpn1"; + when(policyStoreServiceMock.getPolicies(List.of(bpn))).thenReturn(Map.of(bpn, policies)); + + // act + final Map> returnedPolicies = testee.getPolicies(List.of(bpn)); + + // assert + assertThat(returnedPolicies.get(bpn)).isEqualTo( + policies.stream().map(PolicyResponse::fromPolicy).collect(Collectors.toList())); + } + + @Test + void getAllPolicies() { + // arrange + final List policies = List.of( + new Policy("testId", OffsetDateTime.now(), OffsetDateTime.now(), createPermissions())); + final String bpn = "bpn1"; + when(policyStoreServiceMock.getPolicies(null)).thenReturn(Map.of(bpn, policies)); + + // act + final Map> returnedPolicies = testee.getPolicies(null); + + // assert + assertThat(returnedPolicies).containsEntry(bpn, + policies.stream().map(PolicyResponse::fromPolicy).collect(Collectors.toList())); + } } - @Test - void getAllPolicies() { - // arrange - final List policies = List.of( - new Policy("testId", OffsetDateTime.now(), OffsetDateTime.now(), createPermissions())); - final String bpn = "bpn1"; - when(service.getPolicies(null)).thenReturn(Map.of(bpn, policies)); + @Nested + class DeletePolicyTests { - // act - final Map> returnedPolicies = testee.getPolicies(null); + @Test + void deleteAllowedPolicy() { + // act + testee.deleteAllowedPolicy("testId"); - // assert - assertThat(returnedPolicies).containsEntry(bpn, - policies.stream().map(PolicyResponse::fromPolicy).collect(Collectors.toList())); + // assert + verify(policyStoreServiceMock).deletePolicy("testId"); + } } - @Test - void deleteAllowedPolicy() { - // act - testee.deleteAllowedPolicy("testId"); + @Nested + class UpdatePolicyTests { - // assert - verify(service).deletePolicy("testId"); - } + @Test + void updateAllowedPolicy() { + // arrange + final String policyId = "policyId"; + final UpdatePolicyRequest request = new UpdatePolicyRequest(OffsetDateTime.now(), List.of("bpn"), + List.of(policyId)); + + // act + testee.updateAllowedPolicy(request); - @Test - void updateAllowedPolicy() { - // arrange - final String policyId = "policyId"; - final UpdatePolicyRequest request = new UpdatePolicyRequest(OffsetDateTime.now(), List.of("bpn"), - List.of(policyId)); + // assert + verify(policyStoreServiceMock).updatePolicies(request); + } - // act - testee.updateAllowedPolicy(request); + /* + There are no null and empty tests for the list of business partner numbers and the list of policy IDs + because this is done via jakarta validation. + */ - // assert - verify(service).updatePolicies(request); } private List createPermissions() { diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistenceTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistenceTest.java index 4bbf0e6eee..ee193a9ea2 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistenceTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/persistence/PolicyPersistenceTest.java @@ -35,6 +35,7 @@ import static org.mockito.Mockito.when; import java.time.OffsetDateTime; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; @@ -47,6 +48,7 @@ import org.eclipse.tractusx.irs.edc.client.policy.Policy; import org.eclipse.tractusx.irs.policystore.exceptions.PolicyStoreException; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; @@ -68,129 +70,150 @@ void setUp() { testee = new PolicyPersistence(mockPersistence, mapper); } - @Test - void save() throws BlobPersistenceException { - // arrange - final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - - // act - testee.save("testBpn", policy); - - // assert - verify(mockPersistence).putBlob(anyString(), any()); - } - - @Test - void saveWithoutBpn() throws BlobPersistenceException { - // arrange - final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - - // act - testee.save("default", policy); - - // assert - verify(mockPersistence).putBlob(anyString(), any()); - } - - @Test - void saveDuplicate() throws BlobPersistenceException, JsonProcessingException { - // arrange - final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - final var policies = List.of(policy); - when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(policies))); - - // act & assert - assertThatThrownBy(() -> testee.save("testBpn", policy)).isInstanceOf(PolicyStoreException.class); - } - - @Test - void saveWithError() throws BlobPersistenceException { - // arrange - final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - when(mockPersistence.getBlob(any())).thenThrow( - new BlobPersistenceException("test", new IllegalStateException())); - - // act & assert - assertThatThrownBy(() -> testee.save("testBpn", policy)).isInstanceOf(PolicyStoreException.class); - } - - @Test - void saveWithWriteError() throws BlobPersistenceException { - // arrange - final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - doThrow(new BlobPersistenceException("test", new IllegalStateException())).when(mockPersistence) - .putBlob(any(), any()); - - // act & assert - assertThatThrownBy(() -> testee.save("testBpn", policy)).isInstanceOf(PolicyStoreException.class); + @Nested + class SavePolicyTests { + @Test + void save() throws BlobPersistenceException { + // ARRANGE + final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); + + // ACT + testee.save("testBpn", policy); + + // ASSERT + verify(mockPersistence).putBlob(anyString(), any()); + } + + @Test + void saveWithoutBpn() throws BlobPersistenceException { + // ARRANGE + final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); + + // ACT + testee.save("default", policy); + + // ASSERT + verify(mockPersistence).putBlob(anyString(), any()); + } + + @Test + void saveDuplicate() throws BlobPersistenceException, JsonProcessingException { + // ARRANGE + final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); + final var policies = List.of(policy); + when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(policies))); + + // ACT & ASSERT + assertThatThrownBy(() -> testee.save("testBpn", policy)).isInstanceOf(PolicyStoreException.class); + } + + @Test + void saveWithError() throws BlobPersistenceException { + // ARRANGE + final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); + when(mockPersistence.getBlob(any())).thenThrow( + new BlobPersistenceException("test", new IllegalStateException())); + + // ACT & ASSERT + assertThatThrownBy(() -> testee.save("testBpn", policy)).isInstanceOf(PolicyStoreException.class); + } + + @Test + void saveWithWriteError() throws BlobPersistenceException { + // ARRANGE + final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); + doThrow(new BlobPersistenceException("test", new IllegalStateException())).when(mockPersistence) + .putBlob(any(), any()); + + // ACT & ASSERT + assertThatThrownBy(() -> testee.save("testBpn", policy)).isInstanceOf(PolicyStoreException.class); + } } - @Test - void delete() throws BlobPersistenceException, JsonProcessingException { - // arrange - final String policyId = "test"; - final var policy = new Policy(policyId, OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - final var policies = List.of(policy); - when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(policies))); - - // act - testee.delete("testBpn", policyId); - - // assert - verify(mockPersistence).putBlob(anyString(), any()); - } - - @Test - void deleteShouldThrowExceptionIfPolicyWithIdDoesntExists() - throws BlobPersistenceException, JsonProcessingException { - // arrange - final var policy = new Policy("policyId", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(List.of(policy)))); - - // act - assertThrows(PolicyStoreException.class, () -> testee.delete("testBpn", "notExistingPolicyId")); + @Nested + class DeletePolicyTests { + @Test + void delete_success() throws BlobPersistenceException, JsonProcessingException { + // ARRANGE + final String policyId = "test"; + final var policy = new Policy(policyId, OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); + final var policies = List.of(policy); + when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(policies))); + + // ACT + testee.delete("testBpn", policyId); + + // ASSERT + verify(mockPersistence).putBlob(anyString(), any()); + } + + @Test + void delete_shouldThrowExceptionIfPolicyWithIdDoesntExists() + throws BlobPersistenceException, JsonProcessingException { + // ARRANGE + final var policy = new Policy("policyId", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); + when(mockPersistence.getBlob(anyString())).thenReturn( + Optional.of(mapper.writeValueAsBytes(List.of(policy)))); + + // ACT + assertThrows(PolicyStoreException.class, () -> testee.delete("testBpn", "notExistingPolicyId")); + } } - @Test - void readAll() throws BlobPersistenceException, JsonProcessingException { - // arrange - final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - final var policies = List.of(policy); - when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(policies))); - - // act - final var readPolicies = testee.readAll("testBpn"); - - // assert - assertThat(readPolicies).hasSize(1); - } - - @Test - void whenReadAllShouldReturnCorrect() throws BlobPersistenceException, JsonProcessingException { - // arrange - final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - final var policies = List.of(policy); - when(mockPersistence.getAllBlobs()).thenReturn(Map.of("bpn1", mapper.writeValueAsBytes(policies))); - - // act - final var readPolicies = testee.readAll(); - - // assert - assertThat(readPolicies).hasSize(1); - } - - @Test - void readAllWithError() throws BlobPersistenceException, JsonProcessingException { - // arrange - final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); - final var policies = List.of(policy); - final var mapperMock = mock(ObjectMapper.class); - when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(policies))); - when(mapperMock.readerForListOf(Policy.class)).thenThrow(new IllegalStateException()); - - final var localTestee = new PolicyPersistence(mockPersistence, mapperMock); - - // act & assert - assertThatThrownBy(() -> localTestee.readAll("testBpn")).isInstanceOf(PolicyStoreException.class); + @Nested + class ReadPoliciesTests { + + @Test + void readAll_withBpn() throws BlobPersistenceException, JsonProcessingException { + // ARRANGE + final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); + final var policies = List.of(policy); + when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(policies))); + + // ACT + final var readPolicies = testee.readAll("testBpn"); + + // ASSERT + assertThat(readPolicies).hasSize(1); + } + + @Test + void readAll_shouldReturnCorrect() throws BlobPersistenceException, JsonProcessingException { + // ARRANGE + final var policy = Policy.builder() + .policyId("test") + .createdOn(OffsetDateTime.now()) + .validUntil(OffsetDateTime.now()) + .permissions(emptyList()) + .build(); + final Map blobMap = new HashMap<>(); + blobMap.put("bpn1", mapper.writeValueAsBytes(List.of(policy))); + blobMap.put("bpn2", mapper.writeValueAsBytes(emptyList())); + when(mockPersistence.getAllBlobs()).thenReturn(blobMap); + + // ACT + final var readPolicies = testee.readAll(); + + // ASSERT + assertThat(readPolicies).hasSize(2); + assertThat(readPolicies.keySet()).containsExactlyInAnyOrder("bpn1", "bpn2"); + assertThat(readPolicies.get("bpn1")).isNotEmpty(); + assertThat(readPolicies.get("bpn2")).isEmpty(); + } + + @Test + void readAll_withBpn_withError() throws BlobPersistenceException, JsonProcessingException { + // ARRANGE + final var policy = new Policy("test", OffsetDateTime.now(), OffsetDateTime.now(), emptyList()); + final var policies = List.of(policy); + final var mapperMock = mock(ObjectMapper.class); + when(mockPersistence.getBlob(anyString())).thenReturn(Optional.of(mapper.writeValueAsBytes(policies))); + when(mapperMock.readerForListOf(Policy.class)).thenThrow(new IllegalStateException()); + + final var localTestee = new PolicyPersistence(mockPersistence, mapperMock); + + // ACT & ASSERT + assertThatThrownBy(() -> localTestee.readAll("testBpn")).isInstanceOf(PolicyStoreException.class); + } } } \ No newline at end of file diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java index 25d26fc553..b6eb45aee0 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java @@ -27,7 +27,6 @@ import static java.util.Collections.emptyMap; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doThrow; @@ -35,12 +34,21 @@ import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; +import java.io.StringReader; import java.time.Clock; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; import java.util.Map; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; +import org.assertj.core.api.AbstractThrowableAssert; +import org.assertj.core.api.ThrowableAssert; +import org.eclipse.edc.core.transform.TypeTransformerRegistryImpl; +import org.eclipse.edc.jsonld.TitaniumJsonLd; +import org.eclipse.edc.spi.monitor.ConsoleMonitor; import org.eclipse.tractusx.irs.edc.client.policy.Constraint; import org.eclipse.tractusx.irs.edc.client.policy.Constraints; import org.eclipse.tractusx.irs.edc.client.policy.Operator; @@ -48,17 +56,22 @@ import org.eclipse.tractusx.irs.edc.client.policy.Permission; import org.eclipse.tractusx.irs.edc.client.policy.Policy; import org.eclipse.tractusx.irs.edc.client.policy.PolicyType; +import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; import org.eclipse.tractusx.irs.policystore.config.DefaultAcceptedPoliciesConfig; +import org.eclipse.tractusx.irs.policystore.controllers.PolicyStoreControllerTest; import org.eclipse.tractusx.irs.policystore.exceptions.PolicyStoreException; +import org.eclipse.tractusx.irs.policystore.models.CreatePolicyRequest; import org.eclipse.tractusx.irs.policystore.models.UpdatePolicyRequest; import org.eclipse.tractusx.irs.policystore.persistence.PolicyPersistence; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.http.HttpStatus; import org.springframework.web.server.ResponseStatusException; @ExtendWith(MockitoExtension.class) @@ -67,98 +80,224 @@ class PolicyStoreServiceTest { private static final String BPN = "testBpn"; private static final String EXAMPLE_ALLOWED_NAME = "ID 3.0 Trace"; private static final String EXAMPLE_ACCEPTED_LEFT_OPERAND = "PURPOSE"; + private static final String REGISTER_POLICY_EXAMPLE_PAYLOAD = PolicyStoreControllerTest.REGISTER_POLICY_EXAMPLE_PAYLOAD; + private final Clock clock = Clock.systemUTC(); + + private final TitaniumJsonLd titaniumJsonLd = new TitaniumJsonLd(new ConsoleMonitor()); + private final EdcTransformer edcTransformer = new EdcTransformer(new com.fasterxml.jackson.databind.ObjectMapper(), + titaniumJsonLd, new TypeTransformerRegistryImpl()); + @Captor - ArgumentCaptor policyCaptor; + private ArgumentCaptor policyCaptor; + @Captor + private ArgumentCaptor bpnCaptor; + private PolicyStoreService testee; + @Mock - private PolicyPersistence persistence; + private PolicyPersistence persistenceMock; @BeforeEach void setUp() { final DefaultAcceptedPoliciesConfig defaultAcceptedPoliciesConfig = new DefaultAcceptedPoliciesConfig(); defaultAcceptedPoliciesConfig.setAcceptedPolicies(List.of()); - testee = new PolicyStoreService(defaultAcceptedPoliciesConfig, persistence, clock); + testee = new PolicyStoreService(defaultAcceptedPoliciesConfig, persistenceMock, edcTransformer, clock); } - @Test - void registerPolicy() { - // arrange - final OffsetDateTime now = OffsetDateTime.now(clock); - final Policy policy = new Policy("testId", now, now.plusMinutes(1), emptyList()); + @Nested + class RegisterPolicyTests { + + @Test + void registerPolicy_withBpnNull_shouldStoreAsDefault() { + + // ARRANGE + final OffsetDateTime now = OffsetDateTime.now(); + final JsonObject jsonObject; + try (JsonReader jsonReader = Json.createReader(new StringReader(REGISTER_POLICY_EXAMPLE_PAYLOAD))) { + jsonObject = jsonReader.readObject(); + } + + // ACT + testee.registerPolicy(new CreatePolicyRequest(now, null, jsonObject)); + + // ASSERT + verify(persistenceMock).save(eq("default"), policyCaptor.capture()); + assertThat(policyCaptor.getValue().getPolicyId()).isEqualTo("policy-id"); + assertThat(policyCaptor.getValue().getValidUntil()).isEqualTo(now); + assertThat(policyCaptor.getValue().getPermissions()).hasSize(1); + } + + @Test + void registerPolicy() { + + // ARRANGE + final OffsetDateTime now = OffsetDateTime.now(); + final JsonObject jsonObject; + try (JsonReader jsonReader = Json.createReader(new StringReader(REGISTER_POLICY_EXAMPLE_PAYLOAD))) { + jsonObject = jsonReader.readObject(); + } + + // ACT + final OffsetDateTime validUntil = now.plusMonths(1); + final CreatePolicyRequest request = new CreatePolicyRequest(validUntil, "BPNL00000123ABCD", jsonObject); + testee.registerPolicy(request); + // it does not make sense to check the return value from the method, + // because it comes from persistence, which is mocked in this test + + // ASSERT + verify(persistenceMock).save(eq("BPNL00000123ABCD"), policyCaptor.capture()); + assertThat(policyCaptor.getValue().getPolicyId()).isEqualTo("policy-id"); + assertThat(policyCaptor.getValue().getValidUntil()).isEqualTo(validUntil); + assertThat(policyCaptor.getValue().getPermissions()).isNotEmpty(); + + } + } - // act - testee.registerPolicy(policy, BPN); + @Nested + class DoRegisterPolicyTests { - // assert - verify(persistence).save(eq(BPN), any()); - } + @Test + void doRegisterPolicy_permissionEmpty() { - @Test - void registerPolicyWithPermission() { - // arrange - final OffsetDateTime now = OffsetDateTime.now(clock); - final Policy policy = new Policy("testId", now, now.plusMinutes(1), createPermissions()); + // ARRANGE + final OffsetDateTime now = OffsetDateTime.now(clock); + final Policy policy = new Policy("testId", now, now.plusMinutes(1), emptyList()); - // act - testee.registerPolicy(policy, BPN); + // ACT + testee.doRegisterPolicy(policy, BPN); - // assert - verify(persistence).save(eq(BPN), policyCaptor.capture()); + // ASSERT + verify(persistenceMock).save(eq(BPN), any()); + } - assertThat(policyCaptor.getValue()).isNotNull(); - List permissionList = policyCaptor.getValue().getPermissions(); - assertThat(permissionList).hasSize(2); - assertThat(permissionList.get(0)).usingRecursiveComparison().isEqualTo(createPermissions().get(0)); - assertThat(permissionList.get(1)).usingRecursiveComparison().isEqualTo(createPermissions().get(1)); - } + @Test + void doRegisterPolicy_permissionsNull() { - @Test - void registerPolicyShouldThrowResponseStatusException() { - // act - final String policyId = "testId"; - final OffsetDateTime now = OffsetDateTime.now(clock); - final Policy policy = new Policy(policyId, now, now.plusMinutes(1), createPermissions()); - doThrow(new PolicyStoreException("")).when(persistence).save(any(), any()); + // ARRANGE + final OffsetDateTime now = OffsetDateTime.now(clock); + final Policy policy = new Policy("testId", now, now.plusMinutes(1), null); - // assert - assertThatThrownBy(() -> testee.registerPolicy(policy, BPN)).isInstanceOf(ResponseStatusException.class); - } + // ACT + final ThrowableAssert.ThrowingCallable call = () -> testee.doRegisterPolicy(policy, "A"); + + // ASSERT + final AbstractThrowableAssert throwableAssert = assertThatThrownBy(call); + throwableAssert.isInstanceOf(ResponseStatusException.class) + .hasMessageContaining("Missing: odrl:permission") + .extracting(e -> (ResponseStatusException) e) + .satisfies(e -> assertThat(e.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST)); + } + + @Test + void doRegisterPolicy_withFilledPermissionList() { - @Test - void getStoredPolicies() { - // arrange - final List policies = List.of(createPolicy("test1"), createPolicy("test2"), createPolicy("test3")); - when(persistence.readAll(BPN)).thenReturn(policies); + // ARRANGE + final OffsetDateTime now = OffsetDateTime.now(clock); + final Policy policy = new Policy("testId", now, now.plusMinutes(1), createPermissions()); - // act - final var storedPolicies = testee.getStoredPolicies(List.of(BPN)); + // ACT + testee.doRegisterPolicy(policy, BPN); + + // ASSERT + verify(persistenceMock).save(eq(BPN), policyCaptor.capture()); + + assertThat(policyCaptor.getValue()).isNotNull(); + List permissionList = policyCaptor.getValue().getPermissions(); + assertThat(permissionList).hasSize(2); + assertThat(permissionList.get(0)).usingRecursiveComparison().isEqualTo(createPermissions().get(0)); + assertThat(permissionList.get(1)).usingRecursiveComparison().isEqualTo(createPermissions().get(1)); + } + + @Test + void doRegisterPolicy_whenPolicyStoreExceptionOccurs() { + + // ACT + final String policyId = "testId"; + final OffsetDateTime now = OffsetDateTime.now(clock); + final Policy policy = new Policy(policyId, now, now.plusMinutes(1), createPermissions()); + doThrow(new PolicyStoreException("")).when(persistenceMock).save(any(), any()); + + // ASSERT + assertThatThrownBy(() -> testee.doRegisterPolicy(policy, BPN)).isInstanceOf(ResponseStatusException.class); + } + + @Test + void doRegisterPolicy_withMissingConstraintShouldThrowException() { + + // ARRANGE + final Policy policy = Policy.builder() + .permissions(List.of(Permission.builder() + .constraint(new Constraints(emptyList(), + emptyList())) + .build(), Permission.builder().build())) + .build(); + + // ACT & ASSERT + assertThatThrownBy(() -> testee.doRegisterPolicy(policy, null)).isInstanceOf(ResponseStatusException.class) + .hasMessageContaining("400 BAD_REQUEST") + .hasMessageContaining( + "Missing: odrl:constraint"); + } - // assert - assertThat(storedPolicies).hasSize(3); } - @Test - void getDefaultStoredPoliciesWhenEmpty() { - // arrange - final DefaultAcceptedPoliciesConfig.AcceptedPolicy acceptedPolicy1 = new DefaultAcceptedPoliciesConfig.AcceptedPolicy( - EXAMPLE_ACCEPTED_LEFT_OPERAND, "eq", EXAMPLE_ALLOWED_NAME); - final DefaultAcceptedPoliciesConfig.AcceptedPolicy acceptedPolicy2 = new DefaultAcceptedPoliciesConfig.AcceptedPolicy( - EXAMPLE_ACCEPTED_LEFT_OPERAND, "eq", EXAMPLE_ALLOWED_NAME); - final DefaultAcceptedPoliciesConfig defaultAcceptedPoliciesConfig = new DefaultAcceptedPoliciesConfig(); - defaultAcceptedPoliciesConfig.setAcceptedPolicies(List.of(acceptedPolicy1, acceptedPolicy2)); - testee = new PolicyStoreService(defaultAcceptedPoliciesConfig, persistence, clock); - - // act - final var defaultPolicies = testee.getStoredPolicies(List.of(BPN)); - - // assert - assertThat(defaultPolicies).hasSize(1); - final List permissionList = defaultPolicies.get(0).getPermissions(); - assertThat(permissionList).hasSize(1); - final Constraints constraints = permissionList.get(0).getConstraint(); - assertThat(constraints.getOr()).hasSize(2); - assertThat(constraints.getAnd()).hasSize(2); + @Nested + class GetPoliciesTests { + + @Test + void getStoredPolicies() { + + // ARRANGE + final List policies = List.of(createPolicy("test1"), createPolicy("test2"), createPolicy("test3")); + when(persistenceMock.readAll(BPN)).thenReturn(policies); + + // ACT + final var storedPolicies = testee.getStoredPolicies(List.of(BPN)); + + // ASSERT + assertThat(storedPolicies).hasSize(3); + } + + @Test + void getDefaultStoredPoliciesWhenEmpty() { + + // ARRANGE + final DefaultAcceptedPoliciesConfig.AcceptedPolicy acceptedPolicy1 = new DefaultAcceptedPoliciesConfig.AcceptedPolicy( + EXAMPLE_ACCEPTED_LEFT_OPERAND, "eq", EXAMPLE_ALLOWED_NAME); + final DefaultAcceptedPoliciesConfig.AcceptedPolicy acceptedPolicy2 = new DefaultAcceptedPoliciesConfig.AcceptedPolicy( + EXAMPLE_ACCEPTED_LEFT_OPERAND, "eq", EXAMPLE_ALLOWED_NAME); + final DefaultAcceptedPoliciesConfig defaultAcceptedPoliciesConfig = new DefaultAcceptedPoliciesConfig(); + defaultAcceptedPoliciesConfig.setAcceptedPolicies(List.of(acceptedPolicy1, acceptedPolicy2)); + testee = new PolicyStoreService(defaultAcceptedPoliciesConfig, persistenceMock, edcTransformer, clock); + + // ACT + final var defaultPolicies = testee.getStoredPolicies(List.of(BPN)); + + // ASSERT + assertThat(defaultPolicies).hasSize(1); + + final List permissionList = defaultPolicies.get(0).getPermissions(); + assertThat(permissionList).hasSize(1); + + final Constraints constraints = permissionList.get(0).getConstraint(); + assertThat(constraints.getOr()).hasSize(2); + assertThat(constraints.getAnd()).hasSize(2); + } + + @Test + void shouldReturnDefaultPolicyWhenBpnIsEmpty() { + + // ARRANGE + when(persistenceMock.readAll()).thenReturn(emptyMap()); + + // ACT + final var acceptedPolicies = testee.getAcceptedPolicies(null); + + // ASSERT + assertThat(acceptedPolicies.get(0).policy().getPolicyId()).isEqualTo("default-policy"); + } + } private Policy createPolicy(final String policyId) { @@ -177,198 +316,185 @@ private Constraints createConstraints() { new Constraint(EXAMPLE_ACCEPTED_LEFT_OPERAND, new Operator(OperatorType.EQ), "ID 3.1 Trace"))); } - @Test - void deletePolicy() { - // arrange - when(persistence.readAll()).thenReturn(Map.of(BPN, List.of(new Policy("testId", null, null, null)))); + @Nested + class DeletePolicyTests { - // act - testee.deletePolicy("testId"); + @Test + void deletePolicy_success() { + // ARRANGE + when(persistenceMock.readAll()).thenReturn(Map.of(BPN, List.of(new Policy("testId", null, null, null)))); - // assert - verify(persistence).delete(BPN, "testId"); - } + // ACT + testee.deletePolicy("testId"); - @Test - void deletePolicyShouldThrowResponseStatusException() { - // act - final String policyId = "testId"; - when(persistence.readAll()).thenReturn(Map.of(BPN, List.of(new Policy("testId", null, null, null)))); - doThrow(new PolicyStoreException("")).when(persistence).delete(BPN, policyId); + // ASSERT + verify(persistenceMock).delete(BPN, "testId"); + } - // assert - assertThrows(ResponseStatusException.class, () -> testee.deletePolicy(policyId)); - } + @Test + void deletePolicy_internalServerError() { - @Test - void whenRegisterPolicyWithMissingPermissionsShouldThrowException() { - // arrange - final Policy policy = new Policy(); + // ACT + final String policyId = "testId"; + when(persistenceMock.readAll()).thenReturn(Map.of(BPN, List.of(new Policy(policyId, null, null, null)))); + doThrow(new PolicyStoreException("")).when(persistenceMock).delete(BPN, policyId); - // act - // assert - assertThrows(ResponseStatusException.class, () -> testee.registerPolicy(policy, null)); - } + // ASSERT + assertThatThrownBy(() -> testee.deletePolicy(policyId)).isInstanceOf(ResponseStatusException.class) + .hasMessageContaining("500 INTERNAL_SERVER_ERROR"); + } - @Test - void whenRegisterPolicyWithMissingConstraintShouldThrowException() { - // arrange - final Policy policy = Policy.builder() - .permissions(List.of(Permission.builder() - .constraint( - new Constraints(emptyList(), emptyList())) - .build(), Permission.builder().build())) - .build(); - - // act - // assert - assertThrows(ResponseStatusException.class, () -> testee.registerPolicy(policy, null)); - } + @Test + void deletePolicy_policyNotFound() { - @Test - void updatePolicyWithBpnAndValidUntilChanged() { - // arrange - final String policyId = "testId"; + // ACT + final String policyId = "notExistingPolicyId"; + when(persistenceMock.readAll()).thenReturn(Map.of(BPN, List.of(new Policy("testId", null, null, null)))); - final String originalBpn = "bpn2"; - final String expectedBpn = "bpn1"; + // ASSERT + assertThatThrownBy(() -> testee.deletePolicy(policyId)).isInstanceOf(ResponseStatusException.class) + .hasMessageContaining("404 NOT_FOUND") + .hasMessageContaining(policyId); + } - final OffsetDateTime createdOn = OffsetDateTime.now(clock).minusDays(10); - final OffsetDateTime originalValidUntil = createdOn.plusMinutes(1); - final OffsetDateTime expectedValidUntil = createdOn.plusDays(3); + } - final List permissions = emptyList(); + @Nested + class UpdatePolicyTests { - final Policy testPolicy = new Policy(policyId, createdOn, originalValidUntil, permissions); - when(persistence.readAll()).thenReturn(Map.of(originalBpn, List.of(testPolicy))); - // get policies for bpn - when(persistence.readAll(originalBpn)).thenReturn(List.of(testPolicy)); + @Test + void updatePolicy_withBpnAndValidUntilChanged() { + // ARRANGE + final String policyId = "testId"; - // act - testee.updatePolicies(new UpdatePolicyRequest(expectedValidUntil, List.of(expectedBpn), List.of(policyId))); + final String originalBpn = "bpn2"; + final String expectedBpn = "bpn1"; - // assert - verify(persistence).delete(originalBpn, policyId); + final OffsetDateTime createdOn = OffsetDateTime.now(clock).minusDays(10); + final OffsetDateTime originalValidUntil = createdOn.plusMinutes(1); + final OffsetDateTime expectedValidUntil = createdOn.plusDays(3); - final var policyCaptor = ArgumentCaptor.forClass(Policy.class); - verify(persistence).save(eq(expectedBpn), policyCaptor.capture()); - assertThat(policyCaptor.getValue().getCreatedOn()).isEqualTo(createdOn); - assertThat(policyCaptor.getValue().getValidUntil()).isEqualTo(expectedValidUntil); + final List permissions = emptyList(); - } + final Policy testPolicy = new Policy(policyId, createdOn, originalValidUntil, permissions); + when(persistenceMock.readAll()).thenReturn(Map.of(originalBpn, List.of(testPolicy))); + // get policies for bpn + when(persistenceMock.readAll(originalBpn)).thenReturn(List.of(testPolicy)); - @SuppressWarnings("unchecked") - @Test - void updatePolicies_shouldAddPolicyToEachBpn() { + // ACT + testee.updatePolicies(new UpdatePolicyRequest(expectedValidUntil, List.of(expectedBpn), List.of(policyId))); - // ARRANGE - final String policyId = "testId"; + // ASSERT + verify(persistenceMock).delete(originalBpn, policyId); - final OffsetDateTime createdOn = OffsetDateTime.now(clock).minusDays(10); - final OffsetDateTime validUntil = createdOn.plusDays(14); + verify(persistenceMock).save(eq(expectedBpn), policyCaptor.capture()); + assertThat(policyCaptor.getValue().getCreatedOn()).isEqualTo(createdOn); + assertThat(policyCaptor.getValue().getValidUntil()).isEqualTo(expectedValidUntil); + } - final List permissions = emptyList(); + @SuppressWarnings("unchecked") + @Test + void updatePolicies_shouldAddPolicyToEachBpn() { - // BPN1 without any policies + // ARRANGE + final String policyId = "testId"; - // BPN2 with testPolicy - final Policy testPolicy = new Policy(policyId, createdOn, validUntil, permissions); - when(persistence.readAll()).thenReturn(Map.of("bpn2", List.of(testPolicy))); - when(persistence.readAll("bpn2")).thenReturn(List.of(testPolicy)); + final OffsetDateTime createdOn = OffsetDateTime.now(clock).minusDays(10); + final OffsetDateTime validUntil = createdOn.plusDays(14); - // ACT - testee.updatePolicies(new UpdatePolicyRequest(validUntil, List.of("bpn1", "bpn2"), List.of(policyId))); + final List permissions = emptyList(); - // ASSERT - verify(persistence).delete("bpn2", policyId); + // BPN1 without any policies - final var bpnCaptor = ArgumentCaptor.forClass(String.class); - final var policyCaptor = ArgumentCaptor.forClass(Policy.class); - verify(persistence, times(2)).save(bpnCaptor.capture(), policyCaptor.capture()); + // BPN2 with testPolicy + final Policy testPolicy = new Policy(policyId, createdOn, validUntil, permissions); + when(persistenceMock.readAll()).thenReturn(Map.of("bpn2", List.of(testPolicy))); + when(persistenceMock.readAll("bpn2")).thenReturn(List.of(testPolicy)); - // policy added to each BPN - assertThat(policyCaptor.getAllValues().get(0).getPolicyId()).isEqualTo(policyId); - assertThat(bpnCaptor.getAllValues().get(0)).isEqualTo("bpn1"); - assertThat(policyCaptor.getAllValues().get(1).getPolicyId()).isEqualTo(policyId); - assertThat(bpnCaptor.getAllValues().get(1)).isEqualTo("bpn2"); + // ACT + testee.updatePolicies(new UpdatePolicyRequest(validUntil, List.of("bpn1", "bpn2"), List.of(policyId))); - } + // ASSERT + verify(persistenceMock).delete("bpn2", policyId); - @SuppressWarnings("unchecked") - @Test - void updatePolicies_shouldAssociateEachPolicyGivenPolicyWithEachGivenBpn() { + verify(persistenceMock, times(2)).save(bpnCaptor.capture(), policyCaptor.capture()); - // ARRANGE - final String policyId1 = "testId1"; - final String policyId2 = "testId2"; + // policy added to each BPN + assertThat(policyCaptor.getAllValues().get(0).getPolicyId()).isEqualTo(policyId); + assertThat(bpnCaptor.getAllValues().get(0)).isEqualTo("bpn1"); + assertThat(policyCaptor.getAllValues().get(1).getPolicyId()).isEqualTo(policyId); + assertThat(bpnCaptor.getAllValues().get(1)).isEqualTo("bpn2"); + } - final String bpn1 = "bpn1"; - final String bpn2 = "bpn2"; + @SuppressWarnings("unchecked") + @Test + void updatePolicies_shouldAssociateEachGivenPolicyWithEachGivenBpn() { - final OffsetDateTime createdOn = OffsetDateTime.now(clock).minusDays(10); - final OffsetDateTime originalValidUntil = createdOn.plusMinutes(1); + // ARRANGE + final String policyId1 = "testId1"; + final String policyId2 = "testId2"; - final List permissions = emptyList(); + final String bpn1 = "bpn1"; + final String bpn2 = "bpn2"; - final Policy testPolicy1 = new Policy(policyId1, createdOn, originalValidUntil, permissions); - final Policy testPolicy2 = new Policy(policyId2, createdOn, originalValidUntil, permissions); + final OffsetDateTime createdOn = OffsetDateTime.now(clock).minusDays(10); + final OffsetDateTime originalValidUntil = createdOn.plusMinutes(1); - // BPN1 without any policies + final List permissions = emptyList(); - // BPN2 with testPolicy1 and testPolicy2 - when(persistence.readAll()).thenReturn(Map.of(bpn2, List.of(testPolicy1, testPolicy2))); - when(persistence.readAll(bpn2)).thenReturn( - List.of(new Policy(policyId1, createdOn, originalValidUntil, permissions), - new Policy(policyId2, createdOn, originalValidUntil, permissions))); + final Policy testPolicy1 = new Policy(policyId1, createdOn, originalValidUntil, permissions); + final Policy testPolicy2 = new Policy(policyId2, createdOn, originalValidUntil, permissions); - // ACT - testee.updatePolicies( - new UpdatePolicyRequest(originalValidUntil, List.of(bpn1, bpn2), List.of(policyId1, policyId2))); + // BPN1 without any policies - // ASSERT - verify(persistence).delete(bpn2, policyId1); - verify(persistence).delete(bpn2, policyId2); + // BPN2 with testPolicy1 and testPolicy2 + when(persistenceMock.readAll()).thenReturn(Map.of(bpn2, List.of(testPolicy1, testPolicy2))); + when(persistenceMock.readAll(bpn2)).thenReturn( + List.of(new Policy(policyId1, createdOn, originalValidUntil, permissions), + new Policy(policyId2, createdOn, originalValidUntil, permissions))); - final var bpnsCaptor = ArgumentCaptor.forClass(String.class); - final var policyCaptor = ArgumentCaptor.forClass(Policy.class); - verify(persistence, times(4)).save(bpnsCaptor.capture(), policyCaptor.capture()); + // ACT + testee.updatePolicies( + new UpdatePolicyRequest(originalValidUntil, List.of(bpn1, bpn2), List.of(policyId1, policyId2))); - // each BPNs added to policy 1 - assertThat(policyCaptor.getAllValues().get(0).getPolicyId()).isEqualTo(policyId1); - assertThat(bpnsCaptor.getAllValues().get(0)).isEqualTo("bpn1"); - assertThat(policyCaptor.getAllValues().get(1).getPolicyId()).isEqualTo(policyId1); - assertThat(bpnsCaptor.getAllValues().get(1)).isEqualTo("bpn2"); + // ASSERT + verify(persistenceMock).delete(bpn2, policyId1); + verify(persistenceMock).delete(bpn2, policyId2); - // each BPNs added to policy 2 - assertThat(policyCaptor.getAllValues().get(2).getPolicyId()).isEqualTo(policyId2); - assertThat(bpnsCaptor.getAllValues().get(2)).isEqualTo("bpn1"); - assertThat(policyCaptor.getAllValues().get(3).getPolicyId()).isEqualTo(policyId2); - assertThat(bpnsCaptor.getAllValues().get(3)).isEqualTo("bpn2"); + verify(persistenceMock, times(4)).save(bpnCaptor.capture(), policyCaptor.capture()); - } + // each BPNs added to policy 1 + assertThat(policyCaptor.getAllValues().get(0).getPolicyId()).isEqualTo(policyId1); + assertThat(bpnCaptor.getAllValues().get(0)).isEqualTo("bpn1"); + assertThat(policyCaptor.getAllValues().get(1).getPolicyId()).isEqualTo(policyId1); + assertThat(bpnCaptor.getAllValues().get(1)).isEqualTo("bpn2"); - @Test - void shouldReturnDefaultPolicyWhenBpnIsEmpty() { - // arrange - when(persistence.readAll()).thenReturn(emptyMap()); + // each BPNs added to policy 2 + assertThat(policyCaptor.getAllValues().get(2).getPolicyId()).isEqualTo(policyId2); + assertThat(bpnCaptor.getAllValues().get(2)).isEqualTo("bpn1"); + assertThat(policyCaptor.getAllValues().get(3).getPolicyId()).isEqualTo(policyId2); + assertThat(bpnCaptor.getAllValues().get(3)).isEqualTo("bpn2"); + } - // act - final var acceptedPolicies = testee.getAcceptedPolicies(null); + @Test + void updatePolicy_shouldThrowResponseStatusException() { - // assert - assertThat(acceptedPolicies.get(0).policy().getPolicyId()).isEqualTo("default-policy"); - } + // ARRANGE + final String policyId = "testId"; + final OffsetDateTime validUntil = OffsetDateTime.now(); + doThrow(new PolicyStoreException("")).when(persistenceMock).readAll(); + + // ACT + final List bpn = List.of("bpn"); + final ThrowableAssert.ThrowingCallable call = () -> testee.updatePolicy(policyId, validUntil, bpn); - @Test - void updatePolicyShouldThrowResponseStatusException() { - // act - final String policyId = "testId"; - final OffsetDateTime validUntil = OffsetDateTime.now(); - doThrow(new PolicyStoreException("")).when(persistence).readAll(); + // ASSERT + assertThatThrownBy(call).isInstanceOf(ResponseStatusException.class) // + .extracting(e -> (ResponseStatusException) e) + .satisfies(e -> assertThat(e.getStatusCode()).isEqualTo( + HttpStatus.INTERNAL_SERVER_ERROR)); + } - // assert - final List bpn = List.of("bpn"); - assertThrows(ResponseStatusException.class, () -> testee.updatePolicy(policyId, validUntil, bpn)); } } \ No newline at end of file From 2be0088e458543a3bf92bb1df0095c812a7bf5fb Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 02:29:57 +0100 Subject: [PATCH 16/58] fix(impl): [#199] Rename request parameter for GET policies --- docs/src/api/irs-api.yaml | 2 +- .../irs/policystore/controllers/PolicyStoreController.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index bdc7aa7534..ab7d6e247d 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -796,7 +796,7 @@ paths: description: Lists the registered policies that should be accepted in EDC negotiation. operationId: getAllowedPoliciesByBpn parameters: - - name: bpnls + - name: businessPartnerNumbers in: query required: false schema: diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index e5db25cb70..a89af03c0d 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -155,8 +155,9 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr @GetMapping("/policies") @ResponseStatus(HttpStatus.OK) @PreAuthorize("hasAuthority('" + IrsRoles.ADMIN_IRS + "')") - public Map> getPolicies(@RequestParam(required = false) final List bpnls) { - return service.getPolicies(bpnls) + public Map> getPolicies( + @RequestParam(required = false) final List businessPartnerNumbers) { + return service.getPolicies(businessPartnerNumbers) .entrySet() .stream() .map(entry -> new AbstractMap.SimpleEntry<>(entry.getKey(), From 968b04dc9e61d12385565c1415631d0b0c46559f Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 02:30:53 +0100 Subject: [PATCH 17/58] fix(impl): [#199] Code formatting --- .../irs/policystore/models/CreatePolicyRequest.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java index 9b297e5979..a3e3054150 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java @@ -39,20 +39,23 @@ @Schema(description = "Request to add a policy") public record CreatePolicyRequest( - @NotNull // @Schema(description = "Timestamp after which the policy will no longer be accepted in negotiations.", example = "2025-12-12T23:59:59.999Z") // + @NotNull // OffsetDateTime validUntil, // @Schema(description = """ The business partner number (BPN) for which the policy should be registered. This parameter is optional. If not set the policy is registered for each existing BPN. - """, example = "BPNL1234567890AB") // - @Pattern(regexp = BPN_REGEX, message = " Invalid BPN.") String businessPartnerNumber, + """, // + example = "BPNL1234567890AB") // + @Pattern(regexp = BPN_REGEX, message = " Invalid BPN.") // + String businessPartnerNumber, + @Schema(description = "The policy payload.", // + example = CreatePolicyRequest.EXAMPLE_PAYLOAD) // @NotNull // - @Schema(description = "The policy payload.", example = CreatePolicyRequest.EXAMPLE_PAYLOAD) // JsonObject payload) { @SuppressWarnings("java:S2479") From 97122e8f8258ec29779350d6958d8857e009b4e2 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 02:32:57 +0100 Subject: [PATCH 18/58] fix(impl): [#199] Remove relicts from move of business logic to service --- .../irs/policystore/controllers/PolicyStoreController.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index a89af03c0d..f04f580d84 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -82,8 +82,6 @@ public class PolicyStoreController { public static final String BPN_REGEX = BusinessPartnerNumberListValidator.BPN_REGEX; private final PolicyStoreService service; - private final EdcTransformer edcTransformer; - private static final String DEFAULT = "default"; @Operation(operationId = "registerAllowedPolicy", summary = "Register a policy that should be accepted in EDC negotiation.", From 8397352f0d633ab836316f479592707f017f5dbd Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 02:34:05 +0100 Subject: [PATCH 19/58] fix(impl): [#199] Add additional validation to avoid wrong API usage --- .../controllers/PolicyStoreController.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index f04f580d84..2ae6705ef4 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -40,9 +40,11 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import jakarta.servlet.http.HttpServletRequest; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections.CollectionUtils; import org.eclipse.tractusx.irs.common.auth.IrsRoles; import org.eclipse.tractusx.irs.dtos.ErrorResponse; import org.eclipse.tractusx.irs.edc.client.policy.Policy; @@ -83,6 +85,8 @@ public class PolicyStoreController { private final PolicyStoreService service; + private final HttpServletRequest httpServletRequest; + @Operation(operationId = "registerAllowedPolicy", summary = "Register a policy that should be accepted in EDC negotiation.", security = @SecurityRequirement(name = "api_key"), tags = { "Item Relationship Service" }, @@ -155,6 +159,13 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr @PreAuthorize("hasAuthority('" + IrsRoles.ADMIN_IRS + "')") public Map> getPolicies( @RequestParam(required = false) final List businessPartnerNumbers) { + + final Map parameterMap = this.httpServletRequest.getParameterMap(); + if (CollectionUtils.containsAny(parameterMap.keySet(), List.of("bpn", "bpns", "bpnls"))) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, + "Please use parameter 'businessPartnerNumbers' instead"); + } + return service.getPolicies(businessPartnerNumbers) .entrySet() .stream() From a87a67a25b264d80b0a4f26f90850e5a7d5f5ca4 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 02:35:13 +0100 Subject: [PATCH 20/58] fix(impl): [#199] Correct IRS collection for PUT policies request --- local/testing/request-collection/IRS_Request_Collection.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local/testing/request-collection/IRS_Request_Collection.json b/local/testing/request-collection/IRS_Request_Collection.json index 1e512acea8..d82b1b0671 100644 --- a/local/testing/request-collection/IRS_Request_Collection.json +++ b/local/testing/request-collection/IRS_Request_Collection.json @@ -104,12 +104,12 @@ "modified": 1711099840007, "created": 1693576003390, "url": "{{IRS_HOST}}/irs/policies", - "name": "Update policy", + "name": "Update policies", "description": "", "method": "PUT", "body": { "mimeType": "application/json", - "text": "{\n \"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumbers\": [\n\t\t\"BPNL00000001CRHK\"\n\t],\n\t\"policiesIds\": [\n\t\t\"policyId\"\n\t]\n}" + "text": "{\n \"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumbers\": [\n\t\t\"BPNL00000001CRHK\"\n\t],\n\t\"policyIds\": [\n\t\t\"policyId\"\n\t]\n}" }, "parameters": [], "headers": [ From 6a75e2926a8fe359fe566272d25c39809f4339ee Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 11 Mar 2024 15:06:01 +0100 Subject: [PATCH 21/58] fix(impl): [#199] Fix gitignore --- .gitignore | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 5e4582a016..2603550c32 100644 --- a/.gitignore +++ b/.gitignore @@ -71,7 +71,5 @@ docs/src/diagram-replacer/package.json docs/src/diagram-replacer/plantuml.jar # Helm Chart Dependencies -/charts/irs-helm/Chart.lock -/charts/irs-helm/charts/ - - +/charts/item-relationship-service/charts/ +/charts/item-relationship-service/Chart.lock From 21b107cc1ac9f786379cbecee7c05b20d24daa90 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 03:57:17 +0100 Subject: [PATCH 22/58] fix(impl): [#199] Fix validation and add documentation --- .../irs/controllers/IrsExceptionHandler.java | 26 +++++++++++++++++-- .../controllers/PolicyStoreController.java | 9 +++++-- .../BusinessPartnerNumberListValidator.java | 19 +++++++++----- .../ValidListOfBusinessPartnerNumbers.java | 6 ++++- 4 files changed, 49 insertions(+), 11 deletions(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/controllers/IrsExceptionHandler.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/controllers/IrsExceptionHandler.java index b8d1805b74..a98edf7010 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/controllers/IrsExceptionHandler.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/controllers/IrsExceptionHandler.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.NoSuchElementException; +import jakarta.validation.ConstraintViolationException; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; import org.eclipse.tractusx.irs.dtos.ErrorResponse; @@ -66,6 +67,25 @@ public ResponseEntity handleResponseStatusException(final Respons .build()); } + /** + * Handler for {@link ConstraintViolationException} + * + * @param exception see {@link ConstraintViolationException} + * @return see {@link ErrorResponse} + */ + @ExceptionHandler(ConstraintViolationException.class) + public ResponseEntity handleConstraintViolation(final ConstraintViolationException exception) { + log.info(exception.getClass().getName(), exception); + + final HttpStatus httpStatus = HttpStatus.BAD_REQUEST; + return ResponseEntity.status(httpStatus) + .body(ErrorResponse.builder() + .withStatusCode(httpStatus) + .withError(httpStatus.getReasonPhrase()) + .withMessages(List.of(exception.getMessage())) + .build()); + } + /** * Handler for spring BindException * @@ -91,7 +111,8 @@ public ResponseEntity handleBindException(final BindException exc } @ExceptionHandler(MethodArgumentTypeMismatchException.class) - public ResponseEntity handleMethodArgumentTypeMismatchException(final MethodArgumentTypeMismatchException exception) { + public ResponseEntity handleMethodArgumentTypeMismatchException( + final MethodArgumentTypeMismatchException exception) { log.info(exception.getClass().getName(), exception); if (exception.getRootCause() instanceof IllegalArgumentException illegalArgumentException) { @@ -117,7 +138,8 @@ public ResponseEntity handleIllegalStateException(final IllegalSt } @ExceptionHandler(HttpMessageNotReadableException.class) - public ResponseEntity handleHttpMessageNotReadableException(final HttpMessageNotReadableException exception) { + public ResponseEntity handleHttpMessageNotReadableException( + final HttpMessageNotReadableException exception) { log.info(exception.getClass().getName(), exception); String message = "Malformed JSON request"; diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 2ae6705ef4..89deebaf71 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -54,8 +54,10 @@ import org.eclipse.tractusx.irs.policystore.models.UpdatePolicyRequest; import org.eclipse.tractusx.irs.policystore.services.PolicyStoreService; import org.eclipse.tractusx.irs.policystore.validators.BusinessPartnerNumberListValidator; +import org.eclipse.tractusx.irs.policystore.validators.ValidListOfBusinessPartnerNumbers; import org.springframework.http.HttpStatus; import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -79,6 +81,7 @@ "PMD.ExcessiveImports", "PMD.UseVarargs" }) +@Validated public class PolicyStoreController { public static final String BPN_REGEX = BusinessPartnerNumberListValidator.BPN_REGEX; @@ -157,8 +160,10 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr @GetMapping("/policies") @ResponseStatus(HttpStatus.OK) @PreAuthorize("hasAuthority('" + IrsRoles.ADMIN_IRS + "')") - public Map> getPolicies( - @RequestParam(required = false) final List businessPartnerNumbers) { + public Map> getPolicies( // + @RequestParam(required = false) // + @ValidListOfBusinessPartnerNumbers // + final List businessPartnerNumbers) { final Map parameterMap = this.httpServletRequest.getParameterMap(); if (CollectionUtils.containsAny(parameterMap.keySet(), List.of("bpn", "bpns", "bpnls"))) { diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java index 7cd81e3f8e..ef9a5f4a1d 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java @@ -25,29 +25,36 @@ import jakarta.validation.ConstraintValidator; import jakarta.validation.ConstraintValidatorContext; +/** + * Validator for list of business partner numbers (BPN). + */ public class BusinessPartnerNumberListValidator implements ConstraintValidator> { + /** + * Regex for BPN. + */ public static final String BPN_REGEX = "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}"; private static final Pattern PATTERN = Pattern.compile(BPN_REGEX); @Override public boolean isValid(List value, ConstraintValidatorContext context) { + + // allow null and empty here (in order to allow flexible combination with @NotNull and @NotEmpty) if (value == null || value.isEmpty()) { return true; } - for (int i = 0; i < value.size(); i++) { - if (!PATTERN.matcher(value.get(i)).matches()) { + for (int index = 0; index < value.size(); index++) { + if (!PATTERN.matcher(value.get(index)).matches()) { context.disableDefaultConstraintViolation(); - context.buildConstraintViolationWithTemplate( - "The business partner number at index %d is invalid (should conform to pattern '%s')".formatted( - i, BPN_REGEX)).addConstraintViolation(); + final String msg = "The business partner number at index %d is invalid (should conform to pattern '%s')"; + context.buildConstraintViolationWithTemplate(msg.formatted(index, BPN_REGEX)).addConstraintViolation(); return false; } } return true; } -} \ No newline at end of file +} diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java index bd68f94617..44b11e0a11 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java @@ -28,6 +28,9 @@ import jakarta.validation.Constraint; import jakarta.validation.Payload; +/** + * Annotation for validating list of business partner numbers. + */ @Documented @Constraint(validatedBy = BusinessPartnerNumberListValidator.class) @Target({ ElementType.FIELD, @@ -35,9 +38,10 @@ }) @Retention(RetentionPolicy.RUNTIME) public @interface ValidListOfBusinessPartnerNumbers { + String message() default "Invalid list of business partner numbers"; Class[] groups() default { }; Class[] payload() default { }; -} \ No newline at end of file +} From e2ba964526d2a128ac53184f3998d2e782cad7a4 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 04:30:52 +0100 Subject: [PATCH 23/58] fix(impl): [#199] tests --- .../controllers/IrsExceptionHandlerTest.java | 153 +++++++++++++----- 1 file changed, 110 insertions(+), 43 deletions(-) diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/controllers/IrsExceptionHandlerTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/controllers/IrsExceptionHandlerTest.java index d36324a41b..921057af72 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/controllers/IrsExceptionHandlerTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/controllers/IrsExceptionHandlerTest.java @@ -25,11 +25,13 @@ import static io.restassured.RestAssured.given; import static org.eclipse.tractusx.irs.util.TestMother.registerJobWithoutDepthAndAspect; +import static org.hamcrest.Matchers.containsString; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.when; import static org.springframework.http.HttpStatus.BAD_REQUEST; import static org.springframework.http.HttpStatus.FORBIDDEN; import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR; +import static org.springframework.http.HttpStatus.OK; import static org.springframework.web.client.HttpServerErrorException.InternalServerError; import io.restassured.RestAssured; @@ -40,6 +42,7 @@ import org.eclipse.tractusx.irs.services.IrsItemGraphQueryService; import org.eclipse.tractusx.irs.services.SemanticHubService; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.junit.jupiter.MockitoExtension; @@ -54,13 +57,18 @@ @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = { "digitalTwinRegistry.type=central" }) -@ActiveProfiles(profiles = { "test", "local" }) +@ActiveProfiles(profiles = { "test", + "local" +}) @Import(TestConfig.class) -@ExtendWith({ MockitoExtension.class, SpringExtension.class }) +@ExtendWith({ MockitoExtension.class, + SpringExtension.class +}) class IrsExceptionHandlerTest extends ControllerTest { @MockBean private IrsItemGraphQueryService service; + @MockBean private SemanticHubService semanticHubService; @@ -73,63 +81,122 @@ public void configureRestAssured() { RestAssured.port = port; } - @Test - void handleAll() { - authenticateWith(IrsRoles.VIEW_IRS); + @Nested + class PoliciesTests { + + @Test + void getPolicies_forbidden() { + authenticateWith(IrsRoles.VIEW_IRS); + given().port(port).get("/irs/policies").then().statusCode(FORBIDDEN.value()); + } + + @Test + void getPolicies_success() { + authenticateWith(IrsRoles.ADMIN_IRS); + given().port(port).get("/irs/policies").then().statusCode(OK.value()); + } + + @Test + void getPolicies_withInvalidBpn() { + authenticateWith(IrsRoles.ADMIN_IRS); + given().port(port) + .get("/irs/policies?businessPartnerNumbers=invalid") + .then() + .statusCode(BAD_REQUEST.value()) + .body("messages[0]", containsString("The business partner number at index 0 is invalid")); + } + + @Test + void getPolicies_withValidAndInvalidBpn() { + authenticateWith(IrsRoles.ADMIN_IRS); + given().port(port) + .get("/irs/policies" // + + "?businessPartnerNumbers=BPNL1234567890AB" // + + "&businessPartnerNumbers=__invalid__BPN__" // + + "&businessPartnerNumbers=BPNL1234567890AB") + .then() + .statusCode(BAD_REQUEST.value()) + .body("messages[0]", containsString("The business partner number at index 1 is invalid")); + } + + @Test + void getPolicies_withEmptyBpn() { + authenticateWith(IrsRoles.ADMIN_IRS); + given().port(port) + .get("/irs/policies" // + + "?businessPartnerNumbers=BPNL1234567890AB" // + + "&businessPartnerNumbers=__invalid__BPN__" // + + "&businessPartnerNumbers=BPNL1234567890AB") + .then() + .statusCode(BAD_REQUEST.value()) + .body("messages[0]", containsString("The business partner number at index 1 is invalid")); + } + } + + @Nested + class JobsTests { - when(service.registerItemJob(any())).thenThrow(InternalServerError.class); + @Test + void handleAll() { + authenticateWith(IrsRoles.VIEW_IRS); - given().port(port).contentType(ContentType.JSON).body(registerJobWithoutDepthAndAspect()).post("/irs/jobs") - .then().statusCode(INTERNAL_SERVER_ERROR.value()); + when(service.registerItemJob(any())).thenThrow(InternalServerError.class); + + given().port(port) + .contentType(ContentType.JSON) + .body(registerJobWithoutDepthAndAspect()) + .post("/irs/jobs") + .then() + .statusCode(INTERNAL_SERVER_ERROR.value()); + } } - @Test - void shouldReturn500WhenGetSemanticModelsFails() throws Exception { - authenticateWith(IrsRoles.VIEW_IRS); + @Nested + class AspectModelsTests { - when(semanticHubService.getAllAspectModels()).thenThrow(InternalServerError.class); + @Test + void shouldReturn500WhenGetSemanticModelsFails() throws Exception { + authenticateWith(IrsRoles.VIEW_IRS); - given().port(port).get("/irs/aspectmodels") - .then().statusCode(INTERNAL_SERVER_ERROR.value()); - } + when(semanticHubService.getAllAspectModels()).thenThrow(InternalServerError.class); - @Test - void shouldReturn400WhenProvidingBadInput() throws Exception { - authenticateWith(IrsRoles.VIEW_IRS); + given().port(port).get("/irs/aspectmodels").then().statusCode(INTERNAL_SERVER_ERROR.value()); + } - when(semanticHubService.getAllAspectModels()).thenThrow(IllegalArgumentException.class); + @Test + void shouldReturn400WhenProvidingBadInput() throws Exception { + authenticateWith(IrsRoles.VIEW_IRS); - given().port(port).get("/irs/aspectmodels") - .then().statusCode(BAD_REQUEST.value()); - } + when(semanticHubService.getAllAspectModels()).thenThrow(IllegalArgumentException.class); - @Test - void shouldReturn400WhenCatchingIllegalStateException() throws Exception { - authenticateWith(IrsRoles.VIEW_IRS); + given().port(port).get("/irs/aspectmodels").then().statusCode(BAD_REQUEST.value()); + } - when(semanticHubService.getAllAspectModels()).thenThrow(IllegalStateException.class); + @Test + void shouldReturn400WhenCatchingIllegalStateException() throws Exception { + authenticateWith(IrsRoles.VIEW_IRS); - given().port(port).get("/irs/aspectmodels") - .then().statusCode(BAD_REQUEST.value()); - } + when(semanticHubService.getAllAspectModels()).thenThrow(IllegalStateException.class); - @Test - void shouldReturn400WhenCatchingMethodArgumentTypeMismatchException() throws Exception { - authenticateWith(IrsRoles.VIEW_IRS); + given().port(port).get("/irs/aspectmodels").then().statusCode(BAD_REQUEST.value()); + } - when(semanticHubService.getAllAspectModels()).thenThrow(MethodArgumentTypeMismatchException.class); + @Test + void shouldReturn400WhenCatchingMethodArgumentTypeMismatchException() throws Exception { + authenticateWith(IrsRoles.VIEW_IRS); - given().port(port).get("/irs/aspectmodels") - .then().statusCode(BAD_REQUEST.value()); - } + when(semanticHubService.getAllAspectModels()).thenThrow(MethodArgumentTypeMismatchException.class); + + given().port(port).get("/irs/aspectmodels").then().statusCode(BAD_REQUEST.value()); + } - @Test - void shouldReturn403WhenRightsAreMissing() throws Exception { - authenticateWith(IrsRoles.VIEW_IRS); + @Test + void shouldReturn403WhenRightsAreMissing() throws Exception { + authenticateWith(IrsRoles.VIEW_IRS); - when(semanticHubService.getAllAspectModels()).thenThrow(AccessDeniedException.class); + when(semanticHubService.getAllAspectModels()).thenThrow(AccessDeniedException.class); - given().port(port).get("/irs/aspectmodels") - .then().statusCode(FORBIDDEN.value()); + given().port(port).get("/irs/aspectmodels").then().statusCode(FORBIDDEN.value()); + } } -} \ No newline at end of file +} From 09925a4d936ab638479b65c0bae6774ac6f48fee Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 04:59:14 +0100 Subject: [PATCH 24/58] fix(impl): [#199] Correct API doc --- docs/src/api/irs-api.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index ab7d6e247d..06033344e3 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -880,7 +880,7 @@ paths: tags: - Item Relationship Service put: - description: Updates an existing policy. + description: Updates existing policies. operationId: updateAllowedPolicy requestBody: content: @@ -920,7 +920,7 @@ paths: description: Authorization refused by server. security: - api_key: [ ] - summary: Updates an existing policy. + summary: Updates existing policies. tags: - Item Relationship Service /irs/policies/{policyId}: From f9400dc0940e8848cd7f439d8293d1c7b977aa63 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 04:59:31 +0100 Subject: [PATCH 25/58] fix(impl): [#199] Format code --- .../controllers/PolicyStoreController.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 89deebaf71..0100a59b22 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -171,12 +171,13 @@ public Map> getPolicies( // "Please use parameter 'businessPartnerNumbers' instead"); } - return service.getPolicies(businessPartnerNumbers) - .entrySet() - .stream() - .map(entry -> new AbstractMap.SimpleEntry<>(entry.getKey(), - entry.getValue().stream().map(PolicyResponse::fromPolicy).toList())) - .collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); + final Map> policies = service.getPolicies(businessPartnerNumbers); + + return policies.entrySet() + .stream() + .map(entry -> new AbstractMap.SimpleEntry<>(entry.getKey(), + entry.getValue().stream().map(PolicyResponse::fromPolicy).toList())) + .collect(Collectors.toMap(AbstractMap.SimpleEntry::getKey, AbstractMap.SimpleEntry::getValue)); } @Operation(operationId = "deleteAllowedPolicy", From 6e3b4881e47b49c6ffb38ff271716ec26ed7d7c3 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 05:03:22 +0100 Subject: [PATCH 26/58] fix(impl): [#199] Fix checkstyle --- .../irs/policystore/controllers/PolicyStoreController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 0100a59b22..d1fad32c2f 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -160,7 +160,7 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr @GetMapping("/policies") @ResponseStatus(HttpStatus.OK) @PreAuthorize("hasAuthority('" + IrsRoles.ADMIN_IRS + "')") - public Map> getPolicies( // + public Map> getPolicies(// @RequestParam(required = false) // @ValidListOfBusinessPartnerNumbers // final List businessPartnerNumbers) { @@ -172,7 +172,7 @@ public Map> getPolicies( // } final Map> policies = service.getPolicies(businessPartnerNumbers); - + return policies.entrySet() .stream() .map(entry -> new AbstractMap.SimpleEntry<>(entry.getKey(), From b86b209bd4fa11f1f537d95afd21e5a23f3d9b94 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 05:15:54 +0100 Subject: [PATCH 27/58] fix(impl): [#199] Fix OpenAPI annotation --- .../irs/policystore/controllers/PolicyStoreController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index d1fad32c2f..0e26db38da 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -33,6 +33,7 @@ import java.util.stream.Collectors; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.ExampleObject; @@ -163,7 +164,7 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr public Map> getPolicies(// @RequestParam(required = false) // @ValidListOfBusinessPartnerNumbers // - final List businessPartnerNumbers) { + @Parameter(description = "List of business partner numbers.") final List businessPartnerNumbers) { final Map parameterMap = this.httpServletRequest.getParameterMap(); if (CollectionUtils.containsAny(parameterMap.keySet(), List.of("bpn", "bpns", "bpnls"))) { From 78c42467a2130a0cb0603fbd20aa2a9f9223b32e Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 05:16:44 +0100 Subject: [PATCH 28/58] fix(impl): [#199] add todo concerning OpenAPI response value description for GET policies --- .../irs/policystore/controllers/PolicyStoreController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 0e26db38da..8cad644c21 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -144,6 +144,7 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Returns the policies.", content = { @Content(mediaType = APPLICATION_JSON_VALUE, array = @ArraySchema( schema = @Schema(implementation = Policy.class))) + // TODO #199 OpenApi does not describe returned map correctly }), @ApiResponse(responseCode = "401", description = UNAUTHORIZED_DESC, content = { @Content(mediaType = APPLICATION_JSON_VALUE, From 25e8259a17f98806ed1f19c39dcb0e4ee23164b0 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 28 Mar 2024 05:38:37 +0100 Subject: [PATCH 29/58] fix(impl): [#199] fix insomnia collection - fix Get all policies - add Get policies for BPN - fix Create policy body ("payload" with single policy instead of array named "policies"), see #249 --- .../IRS_Request_Collection.json | 52 +++++++++++++++++-- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/local/testing/request-collection/IRS_Request_Collection.json b/local/testing/request-collection/IRS_Request_Collection.json index d82b1b0671..01f36f74ba 100644 --- a/local/testing/request-collection/IRS_Request_Collection.json +++ b/local/testing/request-collection/IRS_Request_Collection.json @@ -7,9 +7,9 @@ { "_id": "req_2d5a4fb5ec0845059533cb9904910156", "parentId": "fld_c751e5e73d5248a3ae22a44bafae7906", - "modified": 1711099785377, + "modified": 1705006817408, "created": 1705005887617, - "url": "{{IRS_HOST}}/irs/policies?bpnls=BPNL00000001CRHK", + "url": "{{IRS_HOST}}/irs/policies", "name": "Get all policies", "description": "", "method": "GET", @@ -25,7 +25,6 @@ }, "metaSortKey": -1705005887617, "isPrivate": false, - "pathParameters": [], "settingStoreCookies": true, "settingSendCookies": true, "settingDisableRenderRequestBody": false, @@ -34,6 +33,51 @@ "settingFollowRedirects": "global", "_type": "request" }, + { + "_id": "req_3982c8bdad534c0ea601f61bdb785816", + "parentId": "fld_c751e5e73d5248a3ae22a44bafae7906", + "modified": 1711596830125, + "created": 1711449523700, + "url": "{{IRS_HOST}}/irs/policies", + "name": "Get policies for BPN", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "id": "pair_8482da576c10480b9f7edf7a4aa752c6", + "name": "businessPartnerNumbers", + "value": "BPNL1234567890AB", + "description": "", + "disabled": false + }, + { + "id": "pair_ec0ce8fad21144aaa531cbbcb941f522", + "name": "businessPartnerNumbers", + "value": "BPNL123456789012", + "description": "", + "disabled": false + } + ], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.ADMIN_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1703116992024, + "isPrivate": false, + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + } + , { "_id": "fld_c751e5e73d5248a3ae22a44bafae7906", "parentId": "fld_7b1b2f5f85934d3d8c82d7c7ce458380", @@ -3298,7 +3342,7 @@ "method": "POST", "body": { "mimeType": "application/json", - "text": "{\n\t\"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumber\": \"BPNL00000000BJTL\",\n\t\"policies\": [\n\t\t{\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"policy-id12\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t]\n}" + "text": "{\n\t\"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumber\": \"BPNL00000000BJTL\",\n\t\"payload\": {\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"policy-id12\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n}" }, "parameters": [], "headers": [ From e95dd6dcde4672b4dc898586a7ffeb9188177787 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 8 Apr 2024 11:56:52 +0200 Subject: [PATCH 30/58] Update irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java Co-authored-by: Lucas Capellino <137265091+ds-lcapellino@users.noreply.github.com> --- .../irs/policystore/models/CreatePoliciesResponse.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java index 9111fca9e9..95399261f0 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java @@ -1,6 +1,5 @@ /******************************************************************************** - * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. From 7b289650d74d497d8caeb3c2349e155add7c838d Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 8 Apr 2024 11:56:58 +0200 Subject: [PATCH 31/58] Update irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java Co-authored-by: Lucas Capellino <137265091+ds-lcapellino@users.noreply.github.com> --- .../validators/BusinessPartnerNumberListValidator.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java index ef9a5f4a1d..5bd9fa0b66 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java @@ -1,6 +1,5 @@ /******************************************************************************** - * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. From 8d05fa78e173eacac5f0bff743c277311f100ac4 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 8 Apr 2024 11:57:04 +0200 Subject: [PATCH 32/58] Update irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java Co-authored-by: Lucas Capellino <137265091+ds-lcapellino@users.noreply.github.com> --- .../validators/ValidListOfBusinessPartnerNumbers.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java index 44b11e0a11..bcfd91fb5f 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java @@ -1,6 +1,5 @@ /******************************************************************************** - * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. From 2d9eef2b19a873fd85e71e46ceee642ac0cb7ddd Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 8 Apr 2024 11:57:11 +0200 Subject: [PATCH 33/58] Update irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java Co-authored-by: Lucas Capellino <137265091+ds-lcapellino@users.noreply.github.com> --- .../validators/BusinessPartnerNumberListValidatorTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java index 018f9da437..a3ced7099f 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java @@ -1,6 +1,5 @@ /******************************************************************************** - * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation + * Copyright (c) 2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. From 68fe1a65b7ff1ac09493070917efedac8a25eb84 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 8 Apr 2024 12:34:38 +0200 Subject: [PATCH 34/58] fix(impl): [#199] update irs-api.yaml --- docs/src/api/irs-api.yaml | 67 +++++++++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 9 deletions(-) diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index 06033344e3..b6804167db 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -796,13 +796,14 @@ paths: description: Lists the registered policies that should be accepted in EDC negotiation. operationId: getAllowedPoliciesByBpn parameters: - - name: businessPartnerNumbers - in: query - required: false - schema: - type: array - items: - type: string + - name: businessPartnerNumbers + description: List of business partner numbers. + in: query + required: false + schema: + type: array + items: + type: string responses: "200": content: @@ -846,6 +847,10 @@ paths: required: true responses: "201": + content: + '*/*': + schema: + $ref: '#/components/schemas/CreatePoliciesResponse' description: Created "400": content: @@ -855,7 +860,7 @@ paths: $ref: '#/components/examples/error-response-400' schema: $ref: '#/components/schemas/ErrorResponse' - description: Policy registration failed. + description: Policy registration failed due to an invalid request. "401": content: application/json: @@ -874,6 +879,15 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Authorization refused by server. + "500": + content: + application/json: + examples: + error: + $ref: '#/components/examples/error-response-500' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Policy registration failed due to an internal error. security: - api_key: [] summary: Register a policy that should be accepted in EDC negotiation. @@ -918,6 +932,15 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' description: Authorization refused by server. + "500": + content: + application/json: + examples: + error: + $ref: '#/components/examples/error-response-500' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Updating policies failed due to an internal error. security: - api_key: [ ] summary: Updates existing policies. @@ -1310,6 +1333,12 @@ components: messages: - NotFoundException statusCode: 404 NOT_FOUND + error-response-500: + value: + error: Internal Server Error + messages: + - InternalServerError + statusCode: 500 INTERNAL_SERVER_ERROR failed-job-result: value: bpns: [] @@ -1732,11 +1761,26 @@ components: type: array items: $ref: '#/components/schemas/Constraint' + CreatePoliciesResponse: + type: object + additionalProperties: false + properties: + policyId: + type: string + description: ID of the registered policy CreatePolicyRequest: type: object additionalProperties: false description: Request to add a policy properties: + businessPartnerNumber: + type: string + description: | + The business partner number (BPN) for which the policy should be registered. + This parameter is optional. + If not set the policy is registered for each existing BPN. + example: BPNL1234567890AB + pattern: "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}" payload: type: array items: @@ -2968,18 +3012,23 @@ components: properties: businessPartnerNumbers: type: array + description: Business Partner Number (BPN). items: type: string + description: Business Partner Number (BPN). policyIds: type: array + description: The IDs of the policies to be updated. items: type: string + description: The IDs of the policies to be updated. validUntil: type: string format: date-time description: Timestamp after which the policy will no longer be accepted - in negotiations + in negotiations. required: + - policyIds - validUntil securitySchemes: api_key: From d7e0a33f16f6ec12e548778a8cffc7b417ecac01 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 8 Apr 2024 12:35:00 +0200 Subject: [PATCH 35/58] fix(impl): [#199] remove obsolete code --- .../validators/BusinessPartnerNumberListValidatorTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java index 018f9da437..9c510c3fe7 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidatorTest.java @@ -71,8 +71,6 @@ void withValidListOfStrings() { void withListContainingInvalidBPN() { List invalidList = Arrays.asList(VALID_BPN_1, "INVALID_BPN", VALID_BPN_2); assertThat(validator.isValid(invalidList, contextMock)).isFalse(); - // verify(contextMock).buildConstraintViolationWithTemplate( - //// startsWith("Element at index 1 does not match the pattern")); verify(contextMock).buildConstraintViolationWithTemplate(messageCaptor.capture()); assertThat(messageCaptor.getValue()).contains("BPN").contains(" index 1 ").contains("invalid"); } From b04026d5ae90ba3eec5e1a6233a176d2c4966260 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 9 Apr 2024 12:31:03 +0200 Subject: [PATCH 36/58] fix(impl): [#199] add test --- .../services/PolicyHelperTest.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyHelperTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyHelperTest.java index 1362d7a7bb..8612ae2610 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyHelperTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyHelperTest.java @@ -30,7 +30,7 @@ class PolicyHelperTest { @Test - void shouldFilterMapByPolicyId() { + void findBpnsByPolicyId_shouldFilterMapByPolicyId() { // ARRANGE final HashMap> policyMap = new HashMap<>(); @@ -50,4 +50,23 @@ void shouldFilterMapByPolicyId() { assertThat(result).containsExactlyInAnyOrder("BPN1", "BPN2", "BPN4"); } + @Test + void havingPolicyId_whenAppliedAsFilterToAListOfPolicies_shouldFilterByPolicyId() { + + // ARRANGE + final String policyIdToFind = "policyToFind"; + List policies = List.of( // + Policy.builder().policyId("policy1").build(), // + Policy.builder().policyId(policyIdToFind).build(), // + Policy.builder().policyId("policy3").build(), // + Policy.builder().policyId("policy4").build(), // + Policy.builder().policyId(policyIdToFind).build()); + + // ACT + final List result = policies.stream().filter(PolicyHelper.havingPolicyId(policyIdToFind)).toList(); + + // ASSERT + assertThat(result.stream().map(Policy::getPolicyId).toList()).hasSize(2).containsOnly(policyIdToFind); + } + } From 06c542a866098b58a3982bb7eb305bddf1b582e9 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 9 Apr 2024 12:34:39 +0200 Subject: [PATCH 37/58] fix(impl): [#199] group constants via interface reason: better distinguish between configured and registered default policy/policies --- .../services/PolicyStoreService.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index 37b9e7cbaf..cc4a4db3ee 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -69,7 +69,20 @@ }) public class PolicyStoreService implements AcceptedPoliciesProvider { - public static final int DEFAULT_POLICY_LIFETIME_YEARS = 5; + /** + * Constants for the configured default policy. + */ + private interface ConfiguredDefaultPolicy { + /** + * ID for default policy (see TRI-1594) + */ + String DEFAULT_POLICY_ID = "default-policy"; + + /** + * Lifetime for default policy in years (see TRI-1594) + */ + int DEFAULT_POLICY_LIFETIME_YEARS = 5; + } private final List allowedPoliciesFromConfig; @@ -295,6 +308,8 @@ private List createDefaultPolicyFromConfig( acceptedPolicy.getRightOperand()))); final Policy policy = new Policy("default-policy", OffsetDateTime.now(), OffsetDateTime.now().plusYears(DEFAULT_POLICY_LIFETIME_YEARS), + final Policy policy = new Policy(ConfiguredDefaultPolicy.DEFAULT_POLICY_ID, OffsetDateTime.now(), + OffsetDateTime.now().plusYears(ConfiguredDefaultPolicy.DEFAULT_POLICY_LIFETIME_YEARS), List.of(new Permission(PolicyType.USE, new Constraints(constraints, constraints)))); return List.of(policy); From dd1486213ae78c4cb563b99ab95a9a9ec1f5a4a9 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 9 Apr 2024 12:44:42 +0200 Subject: [PATCH 38/58] fix(impl): [#199] correct logging --- .../tractusx/irs/policystore/services/PolicyStoreService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index cc4a4db3ee..cd276d9c33 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -195,7 +195,7 @@ public Map> getAllStoredPolicies() { } public void deletePolicy(final String policyId) { - log.info("Getting all policies to find correct bpn number"); + log.info("Getting all policies to find correct BPN"); final List bpnsContainingPolicyId = PolicyHelper.findBpnsByPolicyId(getAllStoredPolicies(), policyId); if (bpnsContainingPolicyId.isEmpty()) { @@ -306,8 +306,6 @@ private List createDefaultPolicyFromConfig( new Constraint(acceptedPolicy.getLeftOperand(), new Operator(OperatorType.fromValue(acceptedPolicy.getOperator())), acceptedPolicy.getRightOperand()))); - final Policy policy = new Policy("default-policy", OffsetDateTime.now(), - OffsetDateTime.now().plusYears(DEFAULT_POLICY_LIFETIME_YEARS), final Policy policy = new Policy(ConfiguredDefaultPolicy.DEFAULT_POLICY_ID, OffsetDateTime.now(), OffsetDateTime.now().plusYears(ConfiguredDefaultPolicy.DEFAULT_POLICY_LIFETIME_YEARS), List.of(new Permission(PolicyType.USE, new Constraints(constraints, constraints)))); From 45fd8956f8cc914aa3879483136a6891704ae4a0 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 9 Apr 2024 12:51:03 +0200 Subject: [PATCH 39/58] fix(impl): [#199] fix default handling including: - additional tests - improved test naming - superfluous SuppressWarnings removed --- .../services/PolicyStoreService.java | 35 ++++++++--- .../services/PolicyStoreServiceTest.java | 62 ++++++++++++++----- 2 files changed, 73 insertions(+), 24 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index cd276d9c33..fe62a2eb9f 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -37,6 +37,7 @@ import java.util.Optional; import java.util.TreeSet; import java.util.stream.Collectors; +import java.util.stream.Stream; import jakarta.json.JsonObject; import lombok.extern.slf4j.Slf4j; @@ -95,7 +96,7 @@ private interface ConfiguredDefaultPolicy { private static final String MISSING_REQUEST_FIELD_MESSAGE = "Request does not contain all required fields. " + "Missing: %s"; - private static final String DEFAULT = "default"; + static final String DEFAULT = "default"; public PolicyStoreService(final DefaultAcceptedPoliciesConfig defaultAcceptedPoliciesConfig, final PolicyPersistence persistence, final EdcTransformer edcTransformer, final Clock clock) { @@ -178,6 +179,12 @@ public List getStoredPolicies(final List bpnls) { storedPolicies.addAll(persistence.readAll(bpn)); } + // Policies not associated with a BPN (default policies) should only be returned + // if there are no policies that are registered for this BPN explicitly (see #199). + if (storedPolicies.isEmpty()) { + storedPolicies.addAll(persistence.readAll(DEFAULT_BLOB_NAME)); + } + if (storedPolicies.isEmpty()) { log.info("Policy store is empty, returning default values from config"); return allowedPoliciesFromConfig; @@ -276,22 +283,29 @@ private Optional findPolicy(final String policyId, final List bp @Override public List getAcceptedPolicies(final String bpn) { + if (bpn == null) { - return getAllStoredPolicies().values() - .stream() - .flatMap(Collection::stream) - .map(this::toAcceptedPolicy) - .toList(); + return getAllPolicies(); } - final ArrayList policies = new ArrayList<>(); - policies.addAll(getStoredPolicies(List.of(bpn))); - policies.addAll(getStoredPolicies(List.of(DEFAULT_BLOB_NAME))); + final List storedPolicies = getStoredPolicies(List.of(bpn)); + final Stream result = sortByPolicyId(storedPolicies); + return result.map(this::toAcceptedPolicy).toList(); + } + + private static Stream sortByPolicyId(final List policies) { final TreeSet result = new TreeSet<>(Comparator.comparing(Policy::getPolicyId)); result.addAll(policies); + return result.stream(); + } - return result.stream().map(this::toAcceptedPolicy).toList(); + private List getAllPolicies() { + return getAllStoredPolicies().values() + .stream() + .flatMap(Collection::stream) + .map(this::toAcceptedPolicy) + .toList(); } private AcceptedPolicy toAcceptedPolicy(final Policy policy) { @@ -300,6 +314,7 @@ private AcceptedPolicy toAcceptedPolicy(final Policy policy) { private List createDefaultPolicyFromConfig( final DefaultAcceptedPoliciesConfig defaultAcceptedPoliciesConfig) { + final List constraints = new ArrayList<>(); defaultAcceptedPoliciesConfig.getAcceptedPolicies() .forEach(acceptedPolicy -> constraints.add( diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java index b6eb45aee0..40bbcf386e 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java @@ -49,6 +49,7 @@ import org.eclipse.edc.core.transform.TypeTransformerRegistryImpl; import org.eclipse.edc.jsonld.TitaniumJsonLd; import org.eclipse.edc.spi.monitor.ConsoleMonitor; +import org.eclipse.tractusx.irs.edc.client.policy.AcceptedPolicy; import org.eclipse.tractusx.irs.edc.client.policy.Constraint; import org.eclipse.tractusx.irs.edc.client.policy.Constraints; import org.eclipse.tractusx.irs.edc.client.policy.Operator; @@ -90,6 +91,7 @@ class PolicyStoreServiceTest { @Captor private ArgumentCaptor policyCaptor; + @Captor private ArgumentCaptor bpnCaptor; @@ -129,7 +131,7 @@ void registerPolicy_withBpnNull_shouldStoreAsDefault() { } @Test - void registerPolicy() { + void registerPolicy_success() { // ARRANGE final OffsetDateTime now = OffsetDateTime.now(); @@ -243,10 +245,10 @@ void doRegisterPolicy_withMissingConstraintShouldThrowException() { } @Nested - class GetPoliciesTests { + class GetStoredPoliciesTests { @Test - void getStoredPolicies() { + void getStoredPolicies_shouldReturnAllPoliciesStoredForTheBpn() { // ARRANGE final List policies = List.of(createPolicy("test1"), createPolicy("test2"), createPolicy("test3")); @@ -260,9 +262,11 @@ void getStoredPolicies() { } @Test - void getDefaultStoredPoliciesWhenEmpty() { + void getStoredPolicies_whenNoPoliciesForBpn_shouldReturnTheConfiguredDefaultPolicies() { // ARRANGE + + // default policy configuration final DefaultAcceptedPoliciesConfig.AcceptedPolicy acceptedPolicy1 = new DefaultAcceptedPoliciesConfig.AcceptedPolicy( EXAMPLE_ACCEPTED_LEFT_OPERAND, "eq", EXAMPLE_ALLOWED_NAME); final DefaultAcceptedPoliciesConfig.AcceptedPolicy acceptedPolicy2 = new DefaultAcceptedPoliciesConfig.AcceptedPolicy( @@ -284,9 +288,13 @@ void getDefaultStoredPoliciesWhenEmpty() { assertThat(constraints.getOr()).hasSize(2); assertThat(constraints.getAnd()).hasSize(2); } + } + + @Nested + class GetAcceptedPoliciesTests { @Test - void shouldReturnDefaultPolicyWhenBpnIsEmpty() { + void getAcceptedPolicies_whenParameterBpnIsNull_shouldReturnTheConfiguredDefaultPolicy() { // ARRANGE when(persistenceMock.readAll()).thenReturn(emptyMap()); @@ -295,7 +303,35 @@ void shouldReturnDefaultPolicyWhenBpnIsEmpty() { final var acceptedPolicies = testee.getAcceptedPolicies(null); // ASSERT - assertThat(acceptedPolicies.get(0).policy().getPolicyId()).isEqualTo("default-policy"); + final String policyIdOfConfiguredDefaultPolicy = "default-policy"; + assertThat(acceptedPolicies.get(0).policy().getPolicyId()).isEqualTo(policyIdOfConfiguredDefaultPolicy); + } + + @Test + void getAcceptedPolicies_whenNoPoliciesAssociatedWithTheGivenBpn_shouldReturnTheRegisteredDefaultPolicies() { + + // ARRANGE + when(persistenceMock.readAll(BPN)).thenReturn(emptyList()); + + // policy registered without BPN should be used as default policy (see #199) + // this overrides the configured default policy (see the previous test above) + final String defaultPolicyId1 = "registered-default-policy-1"; + final String defaultPolicyId2 = "registered-default-policy-2"; + when(persistenceMock.readAll(PolicyStoreService.DEFAULT)).thenReturn(List.of( + // default policy 1 + createPolicy(defaultPolicyId1), + // default policy 2 + createPolicy(defaultPolicyId2))); + + // ACT + final var acceptedPolicies = testee.getAcceptedPolicies(BPN); + + // ASSERT + final List policyIds = acceptedPolicies.stream() + .map(AcceptedPolicy::policy) + .map(Policy::getPolicyId) + .toList(); + assertThat(policyIds).containsExactlyInAnyOrder(defaultPolicyId1, defaultPolicyId2); } } @@ -320,7 +356,7 @@ private Constraints createConstraints() { class DeletePolicyTests { @Test - void deletePolicy_success() { + void deletePolicy_deleteSuccessful() { // ARRANGE when(persistenceMock.readAll()).thenReturn(Map.of(BPN, List.of(new Policy("testId", null, null, null)))); @@ -332,7 +368,7 @@ void deletePolicy_success() { } @Test - void deletePolicy_internalServerError() { + void deletePolicy_exceptionFromPolicyPersistence_shouldReturnHttpStatus500() { // ACT final String policyId = "testId"; @@ -345,7 +381,7 @@ void deletePolicy_internalServerError() { } @Test - void deletePolicy_policyNotFound() { + void deletePolicy_whenPolicyNotFound_shouldReturnHttpStatus404() { // ACT final String policyId = "notExistingPolicyId"; @@ -360,10 +396,10 @@ void deletePolicy_policyNotFound() { } @Nested - class UpdatePolicyTests { + class UpdatePoliciesTests { @Test - void updatePolicy_withBpnAndValidUntilChanged() { + void updatePolicies_shouldUpdateBpnAndValidUntil() { // ARRANGE final String policyId = "testId"; @@ -392,7 +428,6 @@ void updatePolicy_withBpnAndValidUntilChanged() { assertThat(policyCaptor.getValue().getValidUntil()).isEqualTo(expectedValidUntil); } - @SuppressWarnings("unchecked") @Test void updatePolicies_shouldAddPolicyToEachBpn() { @@ -426,7 +461,6 @@ void updatePolicies_shouldAddPolicyToEachBpn() { assertThat(bpnCaptor.getAllValues().get(1)).isEqualTo("bpn2"); } - @SuppressWarnings("unchecked") @Test void updatePolicies_shouldAssociateEachGivenPolicyWithEachGivenBpn() { @@ -477,7 +511,7 @@ void updatePolicies_shouldAssociateEachGivenPolicyWithEachGivenBpn() { } @Test - void updatePolicy_shouldThrowResponseStatusException() { + void updatePolicies_exceptionFromPolicyPersistence_shouldReturnHttpStatus500() { // ARRANGE final String policyId = "testId"; From 1431c4a9bac926fd597768444ff71e66ec3fc4ee Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 9 Apr 2024 16:30:07 +0200 Subject: [PATCH 40/58] fix(impl): [#199] fix checkstyle warning (copyright header) --- .../irs/policystore/models/CreatePoliciesResponse.java | 3 ++- .../validators/BusinessPartnerNumberListValidator.java | 3 ++- .../validators/ValidListOfBusinessPartnerNumbers.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java index 95399261f0..9111fca9e9 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePoliciesResponse.java @@ -1,5 +1,6 @@ /******************************************************************************** - * Copyright (c) 2024 Contributors to the Eclipse Foundation + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java index 5bd9fa0b66..ef9a5f4a1d 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java @@ -1,5 +1,6 @@ /******************************************************************************** - * Copyright (c) 2024 Contributors to the Eclipse Foundation + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java index bcfd91fb5f..44b11e0a11 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/ValidListOfBusinessPartnerNumbers.java @@ -1,5 +1,6 @@ /******************************************************************************** - * Copyright (c) 2024 Contributors to the Eclipse Foundation + * Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * Copyright (c) 2021,2024 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. From 51c03e2e23cbbd312eebdfef678b8e4641ac6687 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 9 Apr 2024 16:30:46 +0200 Subject: [PATCH 41/58] fix(impl): [#199] fix checkstyle warning (InterfaceIsType) --- .../irs/policystore/services/PolicyStoreService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index fe62a2eb9f..95e7ab71c2 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -73,16 +73,16 @@ public class PolicyStoreService implements AcceptedPoliciesProvider { /** * Constants for the configured default policy. */ - private interface ConfiguredDefaultPolicy { + private final class ConfiguredDefaultPolicy { /** * ID for default policy (see TRI-1594) */ - String DEFAULT_POLICY_ID = "default-policy"; + public static final String DEFAULT_POLICY_ID = "default-policy"; /** * Lifetime for default policy in years (see TRI-1594) */ - int DEFAULT_POLICY_LIFETIME_YEARS = 5; + public static final int DEFAULT_POLICY_LIFETIME_YEARS = 5; } private final List allowedPoliciesFromConfig; From 7efea9d32982d2cd63263a71bd417df89b24c1cb Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 9 Apr 2024 17:28:42 +0200 Subject: [PATCH 42/58] fix(impl): [#199] fix IDE warning --- .../tractusx/irs/policystore/services/PolicyStoreService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index 95e7ab71c2..fcd9fbe288 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -73,7 +73,7 @@ public class PolicyStoreService implements AcceptedPoliciesProvider { /** * Constants for the configured default policy. */ - private final class ConfiguredDefaultPolicy { + private static final class ConfiguredDefaultPolicy { /** * ID for default policy (see TRI-1594) */ From d8957ad6558af8a37ae5f20b28c0c5cf7755c7d1 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 9 Apr 2024 19:08:49 +0200 Subject: [PATCH 43/58] fix(impl): [#199] fix API doc --- .../controllers/PolicyStoreController.java | 16 +++-- .../policystore/models/PolicyResponse.java | 64 ++++++++++++++++++- 2 files changed, 71 insertions(+), 9 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index 8cad644c21..aac16c6448 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -34,7 +34,6 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.media.ArraySchema; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.media.Schema; @@ -141,10 +140,13 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr summary = "Lists the registered policies that should be accepted in EDC negotiation.", security = @SecurityRequirement(name = "api_key"), tags = { "Item Relationship Service" }, description = "Lists the registered policies that should be accepted in EDC negotiation.") - @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Returns the policies.", - content = { @Content(mediaType = APPLICATION_JSON_VALUE, array = @ArraySchema( - schema = @Schema(implementation = Policy.class))) - // TODO #199 OpenApi does not describe returned map correctly + @ApiResponses(value = { @ApiResponse(responseCode = "200", + description = "Returns the policies as map of BPN to list of policies.", + content = { @Content(mediaType = APPLICATION_JSON_VALUE, + examples = @ExampleObject( + value = PolicyResponse.BPN_TO_POLICY_MAP_EXAMPLE), + schema = @Schema( + description = "Map of BPN to list of policies")) }), @ApiResponse(responseCode = "401", description = UNAUTHORIZED_DESC, content = { @Content(mediaType = APPLICATION_JSON_VALUE, @@ -165,7 +167,9 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr public Map> getPolicies(// @RequestParam(required = false) // @ValidListOfBusinessPartnerNumbers // - @Parameter(description = "List of business partner numbers.") final List businessPartnerNumbers) { + @Parameter(description = "List of business partner numbers.") // + final List businessPartnerNumbers // + ) { final Map parameterMap = this.httpServletRequest.getParameterMap(); if (CollectionUtils.containsAny(parameterMap.keySet(), List.of("bpn", "bpns", "bpnls"))) { diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/PolicyResponse.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/PolicyResponse.java index f48f1775ef..b4c583a91a 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/PolicyResponse.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/PolicyResponse.java @@ -26,12 +26,58 @@ import org.eclipse.tractusx.irs.edc.client.policy.Policy; /** - * Policy representation for get all policies response + * Policy representation for policies response */ @Builder @Schema(example = PolicyResponse.EXAMPLE_PAYLOAD) public record PolicyResponse(OffsetDateTime validUntil, Payload payload) { + public static final String BPN_TO_POLICY_MAP_EXAMPLE = """ + { + "BPNL1234567890AB": [ + { + "validUntil": "2025-12-12T23:59:59.999Z", + "payload": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@id": "policy-id3", + "policy": { + "policyId": "p3", + "createdOn": "2024-03-28T03:34:42.9454448Z", + "validUntil": "2025-12-12T23:59:59.999Z", + "permissions": [ + { + "action": "USE", + "constraint": { + "and": [ + { + "leftOperand": "Membership", + "operator": { + "@id": "eq" + }, + "odrl:rightOperand": "active" + }, + { + "leftOperand": "PURPOSE", + "operator": { + "@id": "eq" + }, + "odrl:rightOperand": "ID 3.1 Trace" + } + ], + "or": null + } + } + ] + } + } + } + ], + "BPNA1234567890DF": [] + } + """; + @SuppressWarnings({ "FileTabCharacter", "java:S2479" }) @@ -44,7 +90,7 @@ public record PolicyResponse(OffsetDateTime validUntil, Payload payload) { "@context": { "odrl": "http://www.w3.org/ns/odrl/2/" }, - "@id": "policy-id", + "@id": "policy-id1", "policy": { "odrl:permission": [ { @@ -71,9 +117,21 @@ public record PolicyResponse(OffsetDateTime validUntil, Payload payload) { ] } } + }, + { + "validUntil": "2025-12-31T23:59:59.999Z", + "payload": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@id": "policy-id2", + "policy": { + ... + } + } } ] - """; + """; public static PolicyResponse fromPolicy(final Policy policy) { return PolicyResponse.builder() From 7b1b3a3401b20d806fca7a10eda486aa64d7001c Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 9 Apr 2024 20:01:10 +0200 Subject: [PATCH 44/58] fix(impl): [#199] corrections in irs-api.yaml --- docs/src/api/irs-api.yaml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index 22283d578d..67f90e2399 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -809,10 +809,9 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Policy' - description: Returns the policies. + description: Map of BPN to list of policies + type: string + description: Returns the policies as map of BPN to list of policies. "401": content: application/json: @@ -1807,11 +1806,8 @@ components: validUntil: type: string format: date-time - description: Timestamp after which the policy will no longer be accepted in negotiations - businessPartnerNumbers: - type: array - items: - type: string + description: Timestamp after which the policy will no longer be accepted in negotiations. + example: '2025-12-12T23:59:59.999Z' required: - payload - validUntil From 77fb94aea548aea3c5cdb89dfb6471b8608e209d Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 02:00:11 +0200 Subject: [PATCH 45/58] fix(impl): [#199] update irs-api.yaml --- docs/src/api/irs-api.yaml | 1821 ++++++++++++++++--------------------- 1 file changed, 799 insertions(+), 1022 deletions(-) diff --git a/docs/src/api/irs-api.yaml b/docs/src/api/irs-api.yaml index 67f90e2399..0e2af21a7a 100644 --- a/docs/src/api/irs-api.yaml +++ b/docs/src/api/irs-api.yaml @@ -5,9 +5,9 @@ info: title: IRS API version: 4.9.0 servers: - - url: http://localhost:8080 +- url: http://localhost:8080 security: - - api_key: [] +- api_key: [] paths: /ess/bpn/investigations: post: @@ -58,24 +58,24 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Authorization refused by server. security: - - api_key: [] + - api_key: [] summary: Registers an IRS job to start an investigation if a given bpn is contained in a part chain of a given globalAssetId. tags: - - Environmental and Social Standards + - Environmental and Social Standards /ess/bpn/investigations/{id}: get: description: Return job with additional supplyChainImpacted information. operationId: getBPNInvestigation parameters: - - description: Id of the job. - example: 6c311d29-5753-46d4-b32c-19b918ea93b0 - in: path - name: id - required: true - schema: - type: string - format: uuid + - description: Id of the job. + example: 6c311d29-5753-46d4-b32c-19b918ea93b0 + in: path + name: id + required: true + schema: + type: string + format: uuid responses: "200": content: @@ -123,10 +123,10 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Job with the requested jobId not found. security: - - api_key: [] + - api_key: [] summary: Return job with additional supplyChainImpacted information. tags: - - Environmental and Social Standards + - Environmental and Social Standards /ess/notification/receive: post: description: Accepts notifications via EDC. Notifications are filtered by their @@ -152,11 +152,48 @@ paths: description: Notification malformed. summary: Accepts notifications sent via EDC. tags: - - Environmental and Social Standards + - Environmental and Social Standards + /irs/aspectmodels: + get: + description: Get all available aspect models from semantic hub or local models. + operationId: getAllAspectModels + responses: + "200": + content: + application/json: + examples: + complete: + $ref: '#/components/examples/aspect-models-list' + schema: + $ref: '#/components/schemas/AspectModels' + description: Returns all available aspect models. + "401": + content: + application/json: + examples: + error: + $ref: '#/components/examples/error-response-401' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: No valid authentication credentials. + "403": + content: + application/json: + examples: + error: + $ref: '#/components/examples/error-response-403' + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Authorization refused by server. + security: + - api_key: [] + summary: Get all available aspect models from semantic hub or local models. + tags: + - Aspect Models /irs/ess/orders: post: - description: "Registers an order for an ESS investigation with an array of - {globalAssetIds}. Each globalAssetId will be processed in an separate job, grouped in batches." + description: "Registers an order for an ESS investigation with an array of {globalAssetIds}.\ + \ Each globalAssetId will be processed in an separate job, grouped in batches." operationId: registerESSInvestigationOrder requestBody: content: @@ -202,57 +239,57 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Authorization refused by server. security: - - api_key: [] - summary: "Registers an order for an ESS investigation with an array of {globalAssetIds}. - Each globalAssetId will be processed in an separate job, grouped in batches." + - api_key: [] + summary: "Registers an order for an ESS investigation with an array of {globalAssetIds}.\ + \ Each globalAssetId will be processed in an separate job, grouped in batches." tags: - - Environmental and Social Standards + - Environmental and Social Standards /irs/jobs: get: description: Returns paginated jobs with state and execution times. operationId: getJobsByJobStates parameters: - - description: Requested job states. - explode: false - in: query - name: states - required: false - schema: - type: array - items: - type: string - enum: - - UNSAVED - - INITIAL - - RUNNING - - TRANSFERS_FINISHED - - COMPLETED - - CANCELED - - ERROR - maxItems: 2147483647 - - description: Zero-based page index (0..N) - in: query - name: page - required: false - schema: - type: integer - default: 0 - - description: The size of the page to be returned - in: query - name: size - required: false - schema: - type: integer - default: 20 - - description: "Sorting criteria in the format: property,(asc|desc). Default\ + - description: Requested job states. + explode: false + in: query + name: states + required: false + schema: + type: array + items: + type: string + enum: + - UNSAVED + - INITIAL + - RUNNING + - TRANSFERS_FINISHED + - COMPLETED + - CANCELED + - ERROR + maxItems: 2147483647 + - description: Zero-based page index (0..N) + in: query + name: page + required: false + schema: + type: integer + default: 0 + - description: The size of the page to be returned + in: query + name: size + required: false + schema: + type: integer + default: 20 + - description: "Sorting criteria in the format: property,(asc|desc). Default\ \ sort order is ascending. Multiple sort criteria are supported." - in: query - name: sort - required: false - schema: - type: array - items: - type: string + in: query + name: sort + required: false + schema: + type: array + items: + type: string responses: "200": content: @@ -289,10 +326,10 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Authorization refused by server. security: - - api_key: [] + - api_key: [] summary: Returns paginated jobs with state and execution times. tags: - - Item Relationship Service + - Item Relationship Service post: description: "Register an IRS job to retrieve an item graph for given {globalAssetId}." operationId: registerJobForGlobalAssetId @@ -340,33 +377,34 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Authorization refused by server. security: - - api_key: [] + - api_key: [] summary: "Register an IRS job to retrieve an item graph for given {globalAssetId}." tags: - - Item Relationship Service + - Item Relationship Service /irs/jobs/{id}: get: description: Return job with optional item graph result for requested id. operationId: getJobForJobId parameters: - - description: Id of the job. - example: 6c311d29-5753-46d4-b32c-19b918ea93b0 - in: path - name: id - required: true - schema: - type: string - format: uuid - maxLength: 36 - minLength: 36 - - description: "\\ Return job with current processed item graph. \\ - Return job with item graph if job is in state COMPLETED, otherwise job." - in: query - name: returnUncompletedJob - required: false - schema: - type: boolean - default: true + - description: Id of the job. + example: 6c311d29-5753-46d4-b32c-19b918ea93b0 + in: path + name: id + required: true + schema: + type: string + format: uuid + maxLength: 36 + minLength: 36 + - description: "\\ Return job with current processed item graph. \\\ + Return job with item graph if job is in state COMPLETED, otherwise\ + \ job." + in: query + name: returnUncompletedJob + required: false + schema: + type: boolean + default: true responses: "200": content: @@ -424,24 +462,24 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Job with the requested jobId not found. security: - - api_key: [] + - api_key: [] summary: Return job with optional item graph result for requested id. tags: - - Item Relationship Service + - Item Relationship Service put: description: Cancel job for requested jobId. operationId: cancelJobByJobId parameters: - - description: Id of the job. - example: 6c311d29-5753-46d4-b32c-19b918ea93b0 - in: path - name: id - required: true - schema: - type: string - format: uuid - maxLength: 36 - minLength: 36 + - description: Id of the job. + example: 6c311d29-5753-46d4-b32c-19b918ea93b0 + in: path + name: id + required: true + schema: + type: string + format: uuid + maxLength: 36 + minLength: 36 responses: "200": content: @@ -489,51 +527,14 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Job for requested jobId not found. security: - - api_key: [] + - api_key: [] summary: Cancel job for requested jobId. tags: - - Item Relationship Service - /irs/aspectmodels: - get: - description: Get all available aspect models from semantic hub or local models. - operationId: getAllAspectModels - responses: - "200": - content: - application/json: - examples: - complete: - $ref: "#/components/examples/aspect-models-list" - schema: - $ref: "#/components/schemas/AspectModels" - description: Returns all available aspect models. - "401": - content: - application/json: - examples: - error: - $ref: "#/components/examples/error-response-401" - schema: - $ref: "#/components/schemas/ErrorResponse" - description: No valid authentication credentials. - "403": - content: - application/json: - examples: - error: - $ref: "#/components/examples/error-response-403" - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Authorization refused by server. - security: - - api_key: [] - summary: Get all available aspect models from semantic hub or local models. - tags: - - Aspect Models + - Item Relationship Service /irs/orders: post: - description: "Registers an IRS order with an array of {globalAssetIds}.\ - \ Each globalAssetId will be processed in an IRS Job, grouped in batches." + description: "Registers an IRS order with an array of {globalAssetIds}. Each\ + \ globalAssetId will be processed in an IRS Job, grouped in batches." operationId: registerOrder requestBody: content: @@ -579,26 +580,26 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Authorization refused by server. security: - - api_key: [] - summary: "Registers an IRS order with an array of {globalAssetIds}.\ - \ Each globalAssetId will be processed in an IRS Job, grouped in batches." + - api_key: [] + summary: "Registers an IRS order with an array of {globalAssetIds}. Each globalAssetId\ + \ will be processed in an IRS Job, grouped in batches." tags: - - Item Relationship Service + - Item Relationship Service /irs/orders/{orderId}: get: description: Get a batch order for a given orderId. operationId: getBatchOrder parameters: - - description: Id of the order. - example: 6c311d29-5753-46d4-b32c-19b918ea93b0 - in: path - name: orderId - required: true - schema: - type: string - format: uuid - maxLength: 36 - minLength: 36 + - description: Id of the order. + example: 6c311d29-5753-46d4-b32c-19b918ea93b0 + in: path + name: orderId + required: true + schema: + type: string + format: uuid + maxLength: 36 + minLength: 36 responses: "200": content: @@ -646,24 +647,24 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Batch Order with the requested orderId not found. security: - - api_key: [] + - api_key: [] summary: Get a batch order for a given orderId. tags: - - Item Relationship Service + - Item Relationship Service put: description: Cancel a batch order for a given orderId. operationId: cancelBatchOrder parameters: - - description: Id of the order. - example: 6c311d29-5753-46d4-b32c-19b918ea93b0 - in: path - name: orderId - required: true - schema: - type: string - format: uuid - maxLength: 36 - minLength: 36 + - description: Id of the order. + example: 6c311d29-5753-46d4-b32c-19b918ea93b0 + in: path + name: orderId + required: true + schema: + type: string + format: uuid + maxLength: 36 + minLength: 36 responses: "200": content: @@ -711,35 +712,35 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Batch Order with the requested orderId not found. security: - - api_key: [] + - api_key: [] summary: Cancel a batch order for a given orderId. tags: - - Item Relationship Service + - Item Relationship Service /irs/orders/{orderId}/batches/{batchId}: get: description: Get a batch with a given batchId for a given orderId. operationId: getBatch parameters: - - description: Id of the order. - example: 6c311d29-5753-46d4-b32c-19b918ea93b0 - in: path - name: orderId - required: true - schema: - type: string - format: uuid - maxLength: 36 - minLength: 36 - - description: Id of the batch. - example: 4bce40b8-64c7-41bf-9ca3-e9432c7fef98 - in: path - name: batchId - required: true - schema: - type: string - format: uuid - maxLength: 36 - minLength: 36 + - description: Id of the order. + example: 6c311d29-5753-46d4-b32c-19b918ea93b0 + in: path + name: orderId + required: true + schema: + type: string + format: uuid + maxLength: 36 + minLength: 36 + - description: Id of the batch. + example: 4bce40b8-64c7-41bf-9ca3-e9432c7fef98 + in: path + name: batchId + required: true + schema: + type: string + format: uuid + maxLength: 36 + minLength: 36 responses: "200": content: @@ -787,30 +788,55 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Batch with the requested orderId and batchId not found. security: - - api_key: [] + - api_key: [] summary: Get a batch with a given batchId for a given orderId. tags: - - Item Relationship Service + - Item Relationship Service /irs/policies: get: description: Lists the registered policies that should be accepted in EDC negotiation. operationId: getAllowedPoliciesByBpn parameters: - - name: businessPartnerNumbers - description: List of business partner numbers. + - description: List of business partner numbers. in: query + name: businessPartnerNumbers required: false schema: - type: array - items: - type: string + type: array + items: + type: string responses: "200": content: application/json: + example: + BPNL1234567890AB: + - validUntil: 2025-12-12T23:59:59.999Z + payload: + '@context': + odrl: http://www.w3.org/ns/odrl/2/ + '@id': policy-id3 + policy: + policyId: p3 + createdOn: 2024-03-28T03:34:42.9454448Z + validUntil: 2025-12-12T23:59:59.999Z + permissions: + - action: USE + constraint: + and: + - leftOperand: Membership + operator: + '@id': eq + odrl:rightOperand: active + - leftOperand: PURPOSE + operator: + '@id': eq + odrl:rightOperand: ID 3.1 Trace + or: null + BPNA1234567890DF: [] schema: - description: Map of BPN to list of policies type: string + description: Map of BPN to list of policies description: Returns the policies as map of BPN to list of policies. "401": content: @@ -831,10 +857,10 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Authorization refused by server. security: - - api_key: [ ] + - api_key: [] summary: Lists the registered policies that should be accepted in EDC negotiation. tags: - - Item Relationship Service + - Item Relationship Service post: description: Register a policy that should be accepted in EDC negotiation. operationId: registerAllowedPolicy @@ -888,10 +914,10 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Policy registration failed due to an internal error. security: - - api_key: [] + - api_key: [] summary: Register a policy that should be accepted in EDC negotiation. tags: - - Item Relationship Service + - Item Relationship Service put: description: Updates existing policies. operationId: updateAllowedPolicy @@ -941,20 +967,20 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Updating policies failed due to an internal error. security: - - api_key: [ ] + - api_key: [] summary: Updates existing policies. tags: - - Item Relationship Service + - Item Relationship Service /irs/policies/{policyId}: delete: description: Removes a policy that should no longer be accepted in EDC negotiation. operationId: deleteAllowedPolicy parameters: - - in: path - name: policyId - required: true - schema: - type: string + - in: path + name: policyId + required: true + schema: + type: string responses: "200": description: OK @@ -986,12 +1012,26 @@ paths: $ref: '#/components/schemas/ErrorResponse' description: Authorization refused by server. security: - - api_key: [] + - api_key: [] summary: Removes a policy that should no longer be accepted in EDC negotiation. tags: - - Item Relationship Service + - Item Relationship Service components: examples: + aspect-models-list: + value: + lastUpdated: 2023-02-13T08:18:11.990659500Z + models: + - name: SingleLevelBomAsBuilt + status: RELEASED + type: BAMM + urn: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt + version: 2.0.0 + - name: SerialPart + status: RELEASED + type: BAMM + urn: urn:bamm:io.catenax.serial_part:1.0.1#SerialPart + version: 1.0.1 canceled-job-response: value: completedOn: 2022-02-03T14:48:54.709Z @@ -1041,10 +1081,10 @@ components: batchTotal: 1 completedOn: 2022-02-03T14:48:54.709Z jobs: - - completedOn: 2022-02-03T14:48:54.709Z - id: 6c311d29-5753-46d4-b32c-19b918ea93b0 - startedOn: 2022-02-03T14:48:54.709Z - state: COMPLETED + - completedOn: 2022-02-03T14:48:54.709Z + id: 6c311d29-5753-46d4-b32c-19b918ea93b0 + startedOn: 2022-02-03T14:48:54.709Z + state: COMPLETED jobsInBatchChecksum: 1 orderId: f253718e-a270-4367-901b-9d50d9bd8462 startedOn: 2022-02-03T14:48:54.709Z @@ -1052,8 +1092,8 @@ components: complete-ess-job-result: value: bpns: - - manufacturerId: BPNL00000003AAXX - manufacturerName: AB CD + - manufacturerId: BPNL00000003AAXX + manufacturerName: AB CD job: completedOn: 2022-02-03T14:48:54.709Z createdOn: 2022-02-03T14:48:54.709Z @@ -1085,92 +1125,92 @@ components: completed: 3 failed: 0 relationships: - - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 - linkedItem: - assembledOn: 2022-02-03T14:48:54.709Z - childCatenaXId: urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9 - hasAlternatives: false - lastModifiedOn: 2022-02-03T14:48:54.709Z - lifecycleContext: asBuilt - quantity: - measurementUnit: - datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece - lexicalValue: piece - quantityNumber: 1.0 + - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 + linkedItem: + assembledOn: 2022-02-03T14:48:54.709Z + childCatenaXId: urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9 + hasAlternatives: false + lastModifiedOn: 2022-02-03T14:48:54.709Z + lifecycleContext: asBuilt + quantity: + measurementUnit: + datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece + lexicalValue: piece + quantityNumber: 1.0 shells: - contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 payload: description: - - language: en - text: The shell for a vehicle + - language: en + text: The shell for a vehicle globalAssetId: urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9 id: urn:uuid:882fc530-b69b-4707-95f6-5dbc5e9baaa8 idShort: future concept x specificAssetIds: - - name: engineserialid - value: "12309481209312" + - name: engineserialid + value: "12309481209312" submodelDescriptors: - - description: - - language: en - text: Provides base vehicle information - endpoints: - - interface: HTTP - protocolInformation: - endpointProtocol: HTTPS - endpointProtocolVersion: - - "1.0" - href: https://catena-x.net/vehicle/basedetails/ - subprotocol: DSP - subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net - subprotocolBodyEncoding: plain - id: urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d - idShort: SingleLevelBomAsPlanned - semanticId: - keys: - - type: ExternalReference - value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned - type: ModelReference - - description: - - language: en - text: Provides base vehicle information - endpoints: - - interface: HTTP - protocolInformation: - endpointProtocol: HTTPS - endpointProtocolVersion: - - "1.0" - href: https://catena-x.net/vehicle/partdetails/ - subprotocol: DSP - subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net - subprotocolBodyEncoding: plain - id: urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90 - idShort: vehicle part details - semanticId: - keys: - - type: Submodel - value: urn:bamm:io.catenax.vehicle:0.1.1#PartDetails - type: ModelReference + - description: + - language: en + text: Provides base vehicle information + endpoints: + - interface: HTTP + protocolInformation: + endpointProtocol: HTTPS + endpointProtocolVersion: + - "1.0" + href: https://catena-x.net/vehicle/basedetails/ + subprotocol: DSP + subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net + subprotocolBodyEncoding: plain + id: urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d + idShort: SingleLevelBomAsPlanned + semanticId: + keys: + - type: ExternalReference + value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned + type: ModelReference + - description: + - language: en + text: Provides base vehicle information + endpoints: + - interface: HTTP + protocolInformation: + endpointProtocol: HTTPS + endpointProtocolVersion: + - "1.0" + href: https://catena-x.net/vehicle/partdetails/ + subprotocol: DSP + subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net + subprotocolBodyEncoding: plain + id: urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90 + idShort: vehicle part details + semanticId: + keys: + - type: Submodel + value: urn:bamm:io.catenax.vehicle:0.1.1#PartDetails + type: ModelReference submodels: - - aspectType: supply_chain_impacted - contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 - identification: urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff - payload: - supplyChainImpacted: "YES" + - aspectType: supply_chain_impacted + contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 + identification: urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff + payload: + supplyChainImpacted: "YES" tombstones: - - catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 - endpointURL: https://catena-x.net/vehicle/partdetails/ - processingError: - errorDetail: Details to reason of failure - lastAttempt: 2022-02-03T14:48:54.709Z - processStep: SchemaValidation - retryCounter: 0 + - catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 + endpointURL: https://catena-x.net/vehicle/partdetails/ + processingError: + errorDetail: Details to reason of failure + lastAttempt: 2022-02-03T14:48:54.709Z + processStep: SchemaValidation + retryCounter: 0 complete-job-list-processing-state: value: content: - - completedOn: 2022-02-03T14:48:54.709Z - id: 6c311d29-5753-46d4-b32c-19b918ea93b0 - startedOn: 2022-02-03T14:48:54.709Z - state: COMPLETED + - completedOn: 2022-02-03T14:48:54.709Z + id: 6c311d29-5753-46d4-b32c-19b918ea93b0 + startedOn: 2022-02-03T14:48:54.709Z + state: COMPLETED pageCount: 1 pageNumber: 0 pageSize: 10 @@ -1178,8 +1218,8 @@ components: complete-job-result: value: bpns: - - manufacturerId: BPNL00000003AYRE - manufacturerName: OEM A + - manufacturerId: BPNL00000003AYRE + manufacturerName: OEM A job: completedOn: 2022-02-03T14:48:54.709Z createdOn: 2022-02-03T14:48:54.709Z @@ -1208,18 +1248,18 @@ components: failed: 0 running: 0 relationships: - - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 - linkedItem: - assembledOn: 2022-02-03T14:48:54.709Z - childCatenaXId: urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9 - hasAlternatives: false - lastModifiedOn: 2022-02-03T14:48:54.709Z - lifecycleContext: asBuilt - quantity: - measurementUnit: - datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece - lexicalValue: piece - quantityNumber: 1.0 + - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 + linkedItem: + assembledOn: 2022-02-03T14:48:54.709Z + childCatenaXId: urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9 + hasAlternatives: false + lastModifiedOn: 2022-02-03T14:48:54.709Z + lifecycleContext: asBuilt + quantity: + measurementUnit: + datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece + lexicalValue: piece + quantityNumber: 1.0 shells: - contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 payload: @@ -1230,107 +1270,107 @@ components: id: urn:uuid:882fc530-b69b-4707-95f6-5dbc5e9baaa8 idShort: future concept x specificAssetIds: - - name: engineserialid - value: "12309481209312" + - name: engineserialid + value: "12309481209312" submodelDescriptors: - - description: - - language: en - text: Provides base vehicle information - endpoints: - - interface: HTTP - protocolInformation: - endpointProtocol: HTTPS - endpointProtocolVersion: - - "1.0" - href: https://catena-x.net/vehicle/basedetails/ - subprotocol: DSP - subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net - subprotocolBodyEncoding: plain - idShort: SingleLevelBomAsPlanned - id: urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d - semanticId: - type: ModelReference - keys: - - type: ExternalReference - value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned - - description: - - language: en - text: Provides base vehicle information - endpoints: - - interface: HTTP - protocolInformation: - href: https://catena-x.net/vehicle/partdetails/ - endpointProtocol: HTTPS - endpointProtocolVersion: - - "1.0" - subprotocol: DSP - subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net - subprotocolBodyEncoding: plain - id: urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90 - idShort: vehicle part details - semanticId: - keys: - - type: Submodel - value: urn:bamm:io.catenax.vehicle:0.1.1#PartDetails - type: ModelReference + - description: + - language: en + text: Provides base vehicle information + endpoints: + - interface: HTTP + protocolInformation: + endpointProtocol: HTTPS + endpointProtocolVersion: + - "1.0" + href: https://catena-x.net/vehicle/basedetails/ + subprotocol: DSP + subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net + subprotocolBodyEncoding: plain + id: urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d + idShort: SingleLevelBomAsPlanned + semanticId: + keys: + - type: ExternalReference + value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned + type: ModelReference + - description: + - language: en + text: Provides base vehicle information + endpoints: + - interface: HTTP + protocolInformation: + endpointProtocol: HTTPS + endpointProtocolVersion: + - "1.0" + href: https://catena-x.net/vehicle/partdetails/ + subprotocol: DSP + subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net + subprotocolBodyEncoding: plain + id: urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90 + idShort: vehicle part details + semanticId: + keys: + - type: Submodel + value: urn:bamm:io.catenax.vehicle:0.1.1#PartDetails + type: ModelReference submodels: - - aspectType: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 - identification: urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff - payload: - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 - childItems: - - createdOn: 2022-02-03T14:48:54.709Z - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 - lastModifiedOn: 2022-02-03T14:48:54.709Z - lifecycleContext: AsBuilt - quantity: - measurementUnit: - datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece - lexicalValue: piece - quantityNumber: 1 + - aspectType: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt + contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 + identification: urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff + payload: + catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 + childItems: + - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 + createdOn: 2022-02-03T14:48:54.709Z + lastModifiedOn: 2022-02-03T14:48:54.709Z + lifecycleContext: AsBuilt + quantity: + measurementUnit: + datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece + lexicalValue: piece + quantityNumber: 1 tombstones: - - catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 - endpointURL: https://catena-x.net/vehicle/partdetails/ - processingError: - errorDetail: Details to reason of failure - lastAttempt: 2022-02-03T14:48:54.709Z - processStep: SchemaValidation - retryCounter: 0 + - catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 + endpointURL: https://catena-x.net/vehicle/partdetails/ + processingError: + errorDetail: Details to reason of failure + lastAttempt: 2022-02-03T14:48:54.709Z + processStep: SchemaValidation + retryCounter: 0 complete-order-result: value: batchChecksum: 1 batches: - - batchId: f253718e-a270-4367-901b-9d50d9bd8462 - batchNumber: 1 - batchProcessingState: PARTIAL - batchUrl: https://../irs/orders/f253718e-a270-4367-901b-9d50d9bd8462/batches/f253718e-a270-4367-901b-9d50d9bd8462 - jobsInBatchChecksum: 1 + - batchId: f253718e-a270-4367-901b-9d50d9bd8462 + batchNumber: 1 + batchProcessingState: PARTIAL + batchUrl: https://../irs/orders/f253718e-a270-4367-901b-9d50d9bd8462/batches/f253718e-a270-4367-901b-9d50d9bd8462 + jobsInBatchChecksum: 1 orderId: f253718e-a270-4367-901b-9d50d9bd8462 state: COMPLETED error-response-400: value: error: Bad request messages: - - BadRequestException + - BadRequestException statusCode: 400 BAD_REQUEST error-response-401: value: error: Unauthorized messages: - - UnauthorizedException + - UnauthorizedException statusCode: 401 UNAUTHORIZED error-response-403: value: error: Forbidden messages: - - ForbiddenException + - ForbiddenException statusCode: 403 FORBIDDEN error-response-404: value: error: Not found messages: - - NotFoundException + - NotFoundException statusCode: 404 NOT_FOUND error-response-500: value: @@ -1376,8 +1416,8 @@ components: job-result-without-uncompleted-result-tree: value: bpns: - - manufacturerId: BPNL00000003AYRE - manufacturerName: OEM A + - manufacturerId: BPNL00000003AYRE + manufacturerName: OEM A job: completedOn: 2022-02-03T14:48:54.709Z createdOn: 2022-02-03T14:48:54.709Z @@ -1406,18 +1446,18 @@ components: failed: 0 running: 0 relationships: - - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 - linkedItem: - assembledOn: 2022-02-03T14:48:54.709Z - childCatenaXId: urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9 - hasAlternatives: false - lastModifiedOn: 2022-02-03T14:48:54.709Z - lifecycleContext: asBuilt - quantity: - measurementUnit: - datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece - lexicalValue: piece - quantityNumber: 1.0 + - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 + linkedItem: + assembledOn: 2022-02-03T14:48:54.709Z + childCatenaXId: urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9 + hasAlternatives: false + lastModifiedOn: 2022-02-03T14:48:54.709Z + lifecycleContext: asBuilt + quantity: + measurementUnit: + datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece + lexicalValue: piece + quantityNumber: 1.0 shells: - contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 payload: @@ -1428,71 +1468,73 @@ components: id: urn:uuid:882fc530-b69b-4707-95f6-5dbc5e9baaa8 idShort: future concept x specificAssetIds: - - name: engineserialid - value: "12309481209312" + - name: engineserialid + value: "12309481209312" submodelDescriptors: - - description: - - language: en - text: Provides base vehicle information - endpoints: - - interface: HTTP - protocolInformation: - endpointProtocol: HTTPS - endpointProtocolVersion: ["1.0"] - href: https://catena-x.net/vehicle/basedetails/ - subprotocol: DSP - subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net - subprotocolBodyEncoding: plain - id: urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d - idShort: SingleLevelBomAsPlanned - semanticId: - type: ModelReference - keys: - - type: ExternalReference - value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned - - description: - - language: en - text: Provides base vehicle information - endpoints: - - interface: HTTP - protocolInformation: - href: https://catena-x.net/vehicle/partdetails/ - endpointProtocol: HTTPS - endpointProtocolVersion: ["1.0"] - subprotocol: DSP - subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net - subprotocolBodyEncoding: plain - id: urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90 - idShort: vehicle part details - semanticId: - type: ModelReference - keys: - - type: Submodel - value: urn:bamm:io.catenax.vehicle:0.1.1#PartDetails + - description: + - language: en + text: Provides base vehicle information + endpoints: + - interface: HTTP + protocolInformation: + endpointProtocol: HTTPS + endpointProtocolVersion: + - "1.0" + href: https://catena-x.net/vehicle/basedetails/ + subprotocol: DSP + subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net + subprotocolBodyEncoding: plain + id: urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d + idShort: SingleLevelBomAsPlanned + semanticId: + keys: + - type: ExternalReference + value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned + type: ModelReference + - description: + - language: en + text: Provides base vehicle information + endpoints: + - interface: HTTP + protocolInformation: + endpointProtocol: HTTPS + endpointProtocolVersion: + - "1.0" + href: https://catena-x.net/vehicle/partdetails/ + subprotocol: DSP + subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net + subprotocolBodyEncoding: plain + id: urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90 + idShort: vehicle part details + semanticId: + keys: + - type: Submodel + value: urn:bamm:io.catenax.vehicle:0.1.1#PartDetails + type: ModelReference submodels: - - aspectType: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 - identification: urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff - payload: - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 - childItems: - - createdOn: 2022-02-03T14:48:54.709Z - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 - lastModifiedOn: 2022-02-03T14:48:54.709Z - lifecycleContext: AsBuilt - quantity: - measurementUnit: - datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece - lexicalValue: piece - quantityNumber: 1 + - aspectType: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt + contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 + identification: urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff + payload: + catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 + childItems: + - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 + createdOn: 2022-02-03T14:48:54.709Z + lastModifiedOn: 2022-02-03T14:48:54.709Z + lifecycleContext: AsBuilt + quantity: + measurementUnit: + datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece + lexicalValue: piece + quantityNumber: 1 tombstones: - - catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 - endpointURL: https://catena-x.net/vehicle/partdetails/ - processingError: - errorDetail: Details to reason of failure - lastAttempt: 2022-02-03T14:48:54.709Z - processStep: SchemaValidation - retryCounter: 0 + - catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 + endpointURL: https://catena-x.net/vehicle/partdetails/ + processingError: + errorDetail: Details to reason of failure + lastAttempt: 2022-02-03T14:48:54.709Z + processStep: SchemaValidation + retryCounter: 0 partial-job-result: value: bpns: [] @@ -1526,20 +1568,6 @@ components: relationships: [] submodels: [] tombstones: [] - aspect-models-list: - value: - lastUpdated: 2023-02-13T08:18:11.990659500Z - models: - - urn: urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt - name: SingleLevelBomAsBuilt - status: RELEASED - type: BAMM - version: 2.0.0 - - urn: urn:bamm:io.catenax.serial_part:1.0.1#SerialPart - name: SerialPart - status: RELEASED - type: BAMM - version: 1.0.1 schemas: AdministrativeInformation: type: object @@ -1549,6 +1577,33 @@ components: type: string version: type: string + AspectModel: + type: object + additionalProperties: false + properties: + name: + type: string + status: + type: string + type: + type: string + urn: + type: string + version: + type: string + AspectModels: + type: object + additionalProperties: false + example: |- + {"lastUpdated"="2023-02-13T08:18:11.990659500Z", "models"=[{"name"="SingleLevelBomAsBuilt", "status"="RELEASED", "type"="BAMM", "urn"="urn:bamm:io.catenax.single_level_bom_as_built:1.0.0#SingleLevelBomAsBuilt", "version"="1.0.0"}, + {"name"="SerialPart", "status"="RELEASED", "type"="BAMM", "urn"="urn:bamm:io.catenax.serial_part:1.0.0#SerialPart", "version"="1.0.0"}]} + properties: + lastUpdated: + type: string + models: + type: array + items: + $ref: '#/components/schemas/AspectModel' AssetAdministrationShellDescriptor: type: object additionalProperties: false @@ -1617,6 +1672,11 @@ components: type: object additionalProperties: false description: BatchOrderAck Payload Response. + example: "{\"batchChecksum\"=1, \"batches\"=[{\"batchId\"=\"f253718e-a270-4367-901b-9d50d9bd8462\"\ + , \"batchNumber\"=1, \"batchProcessingState\"=\"PARTIAL\", \"batchUrl\"=\"\ + https://../irs/orders/f253718e-a270-4367-901b-9d50d9bd8462/batches/f253718e-a270-4367-901b-9d50d9bd8462\"\ + , \"jobsInBatchChecksum\"=1}], \"orderId\"=\"f253718e-a270-4367-901b-9d50d9bd8462\"\ + , \"state\"=\"COMPLETED\"}" properties: batchChecksum: type: integer @@ -1639,25 +1699,21 @@ components: type: string description: The state of the order. enum: - - INITIALIZED - - COMPLETED - - PROCESSING - - PARTIAL - - ERROR - example: - batchChecksum: 1 - batches: - - batchId: f253718e-a270-4367-901b-9d50d9bd8462 - batchNumber: 1 - batchProcessingState: PARTIAL - batchUrl: https://../irs/orders/f253718e-a270-4367-901b-9d50d9bd8462/batches/f253718e-a270-4367-901b-9d50d9bd8462 - jobsInBatchChecksum: 1 - orderId: f253718e-a270-4367-901b-9d50d9bd8462 - state: COMPLETED + - INITIALIZED + - COMPLETED + - PROCESSING + - PARTIAL + - ERROR BatchResponse: type: object additionalProperties: false description: Batch model. + example: "{\"batchId\"=\"f253718e-a270-4367-901b-9d50d9bd8462\", \"batchNumber\"\ + =1, \"batchProcessingState\"=\"COMPLETED\", \"batchTotal\"=1, \"completedOn\"\ + =\"2022-02-03T14:48:54.709Z\", \"jobs\"=[{\"completedOn\"=\"2022-02-03T14:48:54.709Z\"\ + , \"id\"=\"6c311d29-5753-46d4-b32c-19b918ea93b0\", \"startedOn\"=\"2022-02-03T14:48:54.709Z\"\ + , \"state\"=\"COMPLETED\"}], \"jobsInBatchChecksum\"=1, \"orderId\"=\"f253718e-a270-4367-901b-9d50d9bd8462\"\ + , \"startedOn\"=\"2022-02-03T14:48:54.709Z\", \"totalJobs\"=1}" properties: batchId: type: string @@ -1674,11 +1730,11 @@ components: type: string description: The state of the batch. enum: - - INITIALIZED - - COMPLETED - - PROCESSING - - PARTIAL - - ERROR + - INITIALIZED + - COMPLETED + - PROCESSING + - PARTIAL + - ERROR batchTotal: type: integer format: int32 @@ -1710,21 +1766,6 @@ components: type: integer format: int32 description: Total amount of jobs inside the order. - example: - batchId: f253718e-a270-4367-901b-9d50d9bd8462 - batchNumber: 1 - batchProcessingState: COMPLETED - batchTotal: 1 - completedOn: '2022-02-03T14:48:54.709Z' - jobs: - - completedOn: '2022-02-03T14:48:54.709Z' - id: 6c311d29-5753-46d4-b32c-19b918ea93b0 - startedOn: '2022-02-03T14:48:54.709Z' - state: COMPLETED - jobsInBatchChecksum: 1 - orderId: f253718e-a270-4367-901b-9d50d9bd8462 - startedOn: '2022-02-03T14:48:54.709Z' - totalJobs: 1 Bpn: type: object additionalProperties: false @@ -1736,30 +1777,6 @@ components: manufacturerName: type: string example: OEM A - Constraint: - type: object - additionalProperties: false - properties: - leftOperand: - type: string - example: string - 'odrl:rightOperand': - type: string - example: string - operator: - $ref: '#/components/schemas/Operator' - Constraints: - type: object - additionalProperties: false - properties: - and: - type: array - items: - $ref: '#/components/schemas/Constraint' - or: - type: array - items: - $ref: '#/components/schemas/Constraint' CreatePoliciesResponse: type: object additionalProperties: false @@ -1781,47 +1798,51 @@ components: example: BPNL1234567890AB pattern: "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}" payload: - type: array - items: - $ref: '#/components/schemas/JsonObject' + type: object + additionalProperties: + $ref: '#/components/schemas/JsonValue' + description: The policy payload. example: - payload: - '@context': - odrl: http://www.w3.org/ns/odrl/2/ - '@id': policy-id - policy: - 'odrl:permission': - - 'odrl:action': USE - 'odrl:constraint': - 'odrl:and': - - 'odrl:leftOperand': Membership - 'odrl:operator': - '@id': 'odrl:eq' - 'odrl:rightOperand': active - - 'odrl:leftOperand': PURPOSE - 'odrl:operator': - '@id': 'odrl:eq' - 'odrl:rightOperand': ID 3.1 Trace - validUntil: '2025-12-12T23:59:59.999Z' + '@context': + odrl: http://www.w3.org/ns/odrl/2/ + '@id': policy-id + '@type': PolicyDefinitionRequestDto + policy: + '@type': Policy + odrl:permission: + - odrl:action: USE + odrl:constraint: + odrl:and: + - odrl:leftOperand: Membership + odrl:operator: + '@id': odrl:eq + odrl:rightOperand: active + - odrl:leftOperand: PURPOSE + odrl:operator: + '@id': odrl:eq + odrl:rightOperand: ID 3.1 Trace + properties: + empty: + type: boolean + valueType: + type: string + enum: + - ARRAY + - OBJECT + - STRING + - NUMBER + - "TRUE" + - "FALSE" + - "NULL" validUntil: type: string format: date-time - description: Timestamp after which the policy will no longer be accepted in negotiations. - example: '2025-12-12T23:59:59.999Z' - required: - - payload - - validUntil - EdcNotificationResponseNotificationContent: - type: object - additionalProperties: false - properties: - content: - $ref: '#/components/schemas/ResponseNotificationContent' - header: - $ref: '#/components/schemas/EdcNotificationHeader' + description: Timestamp after which the policy will no longer be accepted + in negotiations. + example: 2025-12-12T23:59:59.999Z required: - - content - - header + - payload + - validUntil EdcNotificationHeader: type: object additionalProperties: false @@ -1844,10 +1865,21 @@ components: senderEdc: type: string required: - - notificationId - - notificationType - - recipientBpn - - senderBpn + - notificationId + - notificationType + - recipientBpn + - senderBpn + EdcNotificationResponseNotificationContent: + type: object + additionalProperties: false + properties: + content: + $ref: '#/components/schemas/ResponseNotificationContent' + header: + $ref: '#/components/schemas/EdcNotificationHeader' + required: + - content + - header Endpoint: type: object additionalProperties: false @@ -1875,79 +1907,81 @@ components: type: string description: Error code. enum: - - 100 CONTINUE - - 101 SWITCHING_PROTOCOLS - - 102 PROCESSING - - 103 EARLY_HINTS - - 103 CHECKPOINT - - 200 OK - - 201 CREATED - - 202 ACCEPTED - - 203 NON_AUTHORITATIVE_INFORMATION - - 204 NO_CONTENT - - 205 RESET_CONTENT - - 206 PARTIAL_CONTENT - - 207 MULTI_STATUS - - 208 ALREADY_REPORTED - - 226 IM_USED - - 300 MULTIPLE_CHOICES - - 301 MOVED_PERMANENTLY - - 302 FOUND - - 302 MOVED_TEMPORARILY - - 303 SEE_OTHER - - 304 NOT_MODIFIED - - 305 USE_PROXY - - 307 TEMPORARY_REDIRECT - - 308 PERMANENT_REDIRECT - - 400 BAD_REQUEST - - 401 UNAUTHORIZED - - 402 PAYMENT_REQUIRED - - 403 FORBIDDEN - - 404 NOT_FOUND - - 405 METHOD_NOT_ALLOWED - - 406 NOT_ACCEPTABLE - - 407 PROXY_AUTHENTICATION_REQUIRED - - 408 REQUEST_TIMEOUT - - 409 CONFLICT - - 410 GONE - - 411 LENGTH_REQUIRED - - 412 PRECONDITION_FAILED - - 413 PAYLOAD_TOO_LARGE - - 413 REQUEST_ENTITY_TOO_LARGE - - 414 URI_TOO_LONG - - 414 REQUEST_URI_TOO_LONG - - 415 UNSUPPORTED_MEDIA_TYPE - - 416 REQUESTED_RANGE_NOT_SATISFIABLE - - 417 EXPECTATION_FAILED - - 418 I_AM_A_TEAPOT - - 419 INSUFFICIENT_SPACE_ON_RESOURCE - - 420 METHOD_FAILURE - - 421 DESTINATION_LOCKED - - 422 UNPROCESSABLE_ENTITY - - 423 LOCKED - - 424 FAILED_DEPENDENCY - - 425 TOO_EARLY - - 426 UPGRADE_REQUIRED - - 428 PRECONDITION_REQUIRED - - 429 TOO_MANY_REQUESTS - - 431 REQUEST_HEADER_FIELDS_TOO_LARGE - - 451 UNAVAILABLE_FOR_LEGAL_REASONS - - 500 INTERNAL_SERVER_ERROR - - 501 NOT_IMPLEMENTED - - 502 BAD_GATEWAY - - 503 SERVICE_UNAVAILABLE - - 504 GATEWAY_TIMEOUT - - 505 HTTP_VERSION_NOT_SUPPORTED - - 506 VARIANT_ALSO_NEGOTIATES - - 507 INSUFFICIENT_STORAGE - - 508 LOOP_DETECTED - - 509 BANDWIDTH_LIMIT_EXCEEDED - - 510 NOT_EXTENDED - - 511 NETWORK_AUTHENTICATION_REQUIRED + - 100 CONTINUE + - 101 SWITCHING_PROTOCOLS + - 102 PROCESSING + - 103 EARLY_HINTS + - 103 CHECKPOINT + - 200 OK + - 201 CREATED + - 202 ACCEPTED + - 203 NON_AUTHORITATIVE_INFORMATION + - 204 NO_CONTENT + - 205 RESET_CONTENT + - 206 PARTIAL_CONTENT + - 207 MULTI_STATUS + - 208 ALREADY_REPORTED + - 226 IM_USED + - 300 MULTIPLE_CHOICES + - 301 MOVED_PERMANENTLY + - 302 FOUND + - 302 MOVED_TEMPORARILY + - 303 SEE_OTHER + - 304 NOT_MODIFIED + - 305 USE_PROXY + - 307 TEMPORARY_REDIRECT + - 308 PERMANENT_REDIRECT + - 400 BAD_REQUEST + - 401 UNAUTHORIZED + - 402 PAYMENT_REQUIRED + - 403 FORBIDDEN + - 404 NOT_FOUND + - 405 METHOD_NOT_ALLOWED + - 406 NOT_ACCEPTABLE + - 407 PROXY_AUTHENTICATION_REQUIRED + - 408 REQUEST_TIMEOUT + - 409 CONFLICT + - 410 GONE + - 411 LENGTH_REQUIRED + - 412 PRECONDITION_FAILED + - 413 PAYLOAD_TOO_LARGE + - 413 REQUEST_ENTITY_TOO_LARGE + - 414 URI_TOO_LONG + - 414 REQUEST_URI_TOO_LONG + - 415 UNSUPPORTED_MEDIA_TYPE + - 416 REQUESTED_RANGE_NOT_SATISFIABLE + - 417 EXPECTATION_FAILED + - 418 I_AM_A_TEAPOT + - 419 INSUFFICIENT_SPACE_ON_RESOURCE + - 420 METHOD_FAILURE + - 421 DESTINATION_LOCKED + - 422 UNPROCESSABLE_ENTITY + - 423 LOCKED + - 424 FAILED_DEPENDENCY + - 425 TOO_EARLY + - 426 UPGRADE_REQUIRED + - 428 PRECONDITION_REQUIRED + - 429 TOO_MANY_REQUESTS + - 431 REQUEST_HEADER_FIELDS_TOO_LARGE + - 451 UNAVAILABLE_FOR_LEGAL_REASONS + - 500 INTERNAL_SERVER_ERROR + - 501 NOT_IMPLEMENTED + - 502 BAD_GATEWAY + - 503 SERVICE_UNAVAILABLE + - 504 GATEWAY_TIMEOUT + - 505 HTTP_VERSION_NOT_SUPPORTED + - 506 VARIANT_ALSO_NEGOTIATES + - 507 INSUFFICIENT_STORAGE + - 508 LOOP_DETECTED + - 509 BANDWIDTH_LIMIT_EXCEEDED + - 510 NOT_EXTENDED + - 511 NETWORK_AUTHENTICATION_REQUIRED IdentifierKeyValuePair: type: object additionalProperties: false properties: + externalSubjectId: + $ref: '#/components/schemas/Reference' name: type: string example: engineserialid @@ -1955,8 +1989,6 @@ components: $ref: '#/components/schemas/Reference' subjectId: $ref: '#/components/schemas/Reference' - externalSubjectId: - $ref: '#/components/schemas/Reference' value: type: string example: "12309481209312" @@ -1985,8 +2017,8 @@ components: id: type: string format: uuid - example: e5347c88-a921-11ec-b909-0242ac120002 description: Id of the job. + example: e5347c88-a921-11ec-b909-0242ac120002 maxLength: 36 minLength: 36 pattern: "/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i" @@ -2002,21 +2034,21 @@ components: example: 2022-02-03T14:48:54.709Z state: type: string - example: COMPLETED enum: - - UNSAVED - - INITIAL - - RUNNING - - TRANSFERS_FINISHED - - COMPLETED - - CANCELED - - ERROR + - UNSAVED + - INITIAL + - RUNNING + - TRANSFERS_FINISHED + - COMPLETED + - CANCELED + - ERROR + example: COMPLETED summary: $ref: '#/components/schemas/Summary' required: - - globalAssetId - - id - - state + - globalAssetId + - id + - state JobErrorDetails: type: object additionalProperties: false @@ -2024,8 +2056,8 @@ components: properties: errorDetail: type: string - example: Timeout while requesting Digital Registry description: Detailed exception information. + example: Timeout while requesting Digital Registry maxLength: 4000 exception: type: string @@ -2062,19 +2094,19 @@ components: example: false bomLifecycle: type: string - example: asBuilt description: The lifecycle context in which the child part was assembled into the parent part. enum: - - asBuilt - - asPlanned - - asSpecified + - asBuilt + - asPlanned + - asSpecified + example: asBuilt bpn: type: string example: BPNL00000003AYRE callbackUrl: type: string - example: https://hostname.com/callback?id={id}&state={state} + example: "https://hostname.com/callback?id={id}&state={state}" collectAspects: type: boolean example: false @@ -2086,11 +2118,11 @@ components: minimum: 0 direction: type: string - example: upward description: Item graph traversal direction. enum: - - upward - - downward + - upward + - downward + example: upward lookupBPNs: type: boolean example: false @@ -2110,131 +2142,20 @@ components: state: type: string enum: - - UNSAVED - - INITIAL - - RUNNING - - TRANSFERS_FINISHED - - COMPLETED - - CANCELED - - ERROR + - UNSAVED + - INITIAL + - RUNNING + - TRANSFERS_FINISHED + - COMPLETED + - CANCELED + - ERROR Jobs: type: object additionalProperties: false description: Container for a job with item graph. - example: - bpns: - - manufacturerId: BPNL00000003AAXX - manufacturerName: AB CD - job: - completedOn: '2022-02-03T14:48:54.709Z' - createdOn: '2022-02-03T14:48:54.709Z' - exception: - errorDetail: Timeout while requesting Digital Registry - exception: IrsTimeoutException - exceptionDate: '2022-02-03T14:48:54.709Z' - globalAssetId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 - id: e5347c88-a921-11ec-b909-0242ac120002 - lastModifiedOn: '2022-02-03T14:48:54.709Z' - parameter: - aspects: - - SerialPart - - AddressAspect - auditContractNegotiation: false - bomLifecycle: asBuilt - collectAspects: false - depth: 1 - direction: downward - lookupBPNs: false - startedOn: '2022-02-03T14:48:54.709Z' - state: COMPLETED - summary: - asyncFetchedItems: - completed: 3 - failed: 0 - running: 0 - bpnLookups: - completed: 3 - failed: 0 - relationships: - - catenaXId: urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447 - linkedItem: - assembledOn: '2022-02-03T14:48:54.709Z' - childCatenaXId: urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9 - hasAlternatives: false - lastModifiedOn: '2022-02-03T14:48:54.709Z' - lifecycleContext: asBuilt - quantity: - measurementUnit: - datatypeURI: urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece - lexicalValue: piece - quantityNumber: 1 - shells: - - contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 - payload: - description: - - language: en - text: The shell for a vehicle - globalAssetId: urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9 - id: urn:uuid:882fc530-b69b-4707-95f6-5dbc5e9baaa8 - idShort: future concept x - specificAssetIds: - - name: engineserialid - value: '12309481209312' - submodelDescriptors: - - description: - - language: en - text: Provides base vehicle information - endpoints: - - interface: HTTP - protocolInformation: - endpointProtocol: HTTPS - endpointProtocolVersion: - - '1.0' - href: https://catena-x.net/vehicle/basedetails/ - subprotocol: DSP - subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net - subprotocolBodyEncoding: plain - id: urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d - idShort: SingleLevelBomAsPlanned - semanticId: - keys: - - type: ExternalReference - value: urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned - type: ModelReference - - description: - - language: en - text: Provides base vehicle information - endpoints: - - interface: HTTP - protocolInformation: - endpointProtocol: HTTPS - endpointProtocolVersion: - - '1.0' - href: https://catena-x.net/vehicle/partdetails/ - subprotocol: DSP - subprotocolBody: id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net - subprotocolBodyEncoding: plain - id: urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90 - idShort: vehicle part details - semanticId: - keys: - - type: Submodel - value: urn:bamm:com.catenax.vehicle:0.1.1#PartDetails - type: ModelReference - submodels: - - aspectType: supply_chain_impacted - contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462 - identification: urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff - payload: - supplyChainImpacted: 'YES' - tombstones: - - catenaXId: urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0 - endpointURL: https://catena-x.net/vehicle/partdetails/ - processingError: - errorDetail: Details to reason of failure - lastAttempt: '2022-02-03T14:48:54.709Z' - processStep: SchemaValidation - retryCounter: 0 + example: |- + {"bpns"=[{"manufacturerId"="BPNL00000003AAXX", "manufacturerName"="AB CD"}], "job"={"completedOn"="2022-02-03T14:48:54.709Z", "createdOn"="2022-02-03T14:48:54.709Z", "exception"={"errorDetail"="Timeout while requesting Digital Registry", "exception"="IrsTimeoutException", "exceptionDate"="2022-02-03T14:48:54.709Z"}, "globalAssetId"="urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0", "id"="e5347c88-a921-11ec-b909-0242ac120002", "lastModifiedOn"="2022-02-03T14:48:54.709Z", "parameter"={"aspects"=["SerialPart", "AddressAspect"], "auditContractNegotiation"=false, "bomLifecycle"="asBuilt", "collectAspects"=false, "depth"=1, "direction"="downward", "lookupBPNs"=false}, "startedOn"="2022-02-03T14:48:54.709Z", "state"="COMPLETED", "summary"={"asyncFetchedItems"={"completed"=3, "failed"=0, "running"=0}, "bpnLookups"={"completed"=3, "failed"=0}}}, "relationships"=[{"catenaXId"="urn:uuid:d9bec1c6-e47c-4d18-ba41-0a5fe8b7f447", "linkedItem"={"assembledOn"="2022-02-03T14:48:54.709Z", "childCatenaXId"="urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9", "hasAlternatives"=false, "lastModifiedOn"="2022-02-03T14:48:54.709Z", "lifecycleContext"="asBuilt", "quantity"={"measurementUnit"={"datatypeURI"="urn:bamm:io.openmanufacturing:meta-model:1.0.0#piece", "lexicalValue"="piece"}, "quantityNumber"=1}}}], "shells"=[{"contractAgreementId"="f253718e-a270-4367-901b-9d50d9bd8462", "payload"={"description"=[{"language"="en", "text"="The shell for a vehicle"}], "globalAssetId"="urn:uuid:a45a2246-f6e1-42da-b47d-5c3b58ed62e9", "id"="urn:uuid:882fc530-b69b-4707-95f6-5dbc5e9baaa8", "idShort"="future concept x", "specificAssetIds"=[{"name"="engineserialid", "value"="12309481209312"}], "submodelDescriptors"=[{"description"=[{"language"="en", "text"="Provides base vehicle information"}], "endpoints"=[{"interface"="HTTP", "protocolInformation"={"endpointProtocol"="HTTPS", "endpointProtocolVersion"=["1.0"], "href"="https://catena-x.net/vehicle/basedetails/", "subprotocol"="DSP", "subprotocolBody"="id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net", "subprotocolBodyEncoding"="plain"}}], "id"="urn:uuid:5d25a897-6571-4800-b98c-a3352fbf996d", "idShort"="SingleLevelBomAsPlanned", "semanticId"={"keys"=[{"type"="ExternalReference", "value"="urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned"}], "type"="ModelReference"}}, + {"description"=[{"language"="en", "text"="Provides base vehicle information"}], "endpoints"=[{"interface"="HTTP", "protocolInformation"={"endpointProtocol"="HTTPS", "endpointProtocolVersion"=["1.0"], "href"="https://catena-x.net/vehicle/partdetails/", "subprotocol"="DSP", "subprotocolBody"="id=urn:uuid:c8159379-4613-48b8-ad52-6baed7afe923;dspEndpoint=https://irs-provider-controlplane3.dev.demo.catena-x.net", "subprotocolBodyEncoding"="plain"}}], "id"="urn:uuid:dae4d249-6d66-4818-b576-bf52f3b9ae90", "idShort"="vehicle part details", "semanticId"={"keys"=[{"type"="Submodel", "value"="urn:bamm:com.catenax.vehicle:0.1.1#PartDetails"}], "type"="ModelReference"}}]}}], "submodels"=[{"aspectType"="supply_chain_impacted", "contractAgreementId"="f253718e-a270-4367-901b-9d50d9bd8462", "identification"="urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff", "payload"={"supplyChainImpacted"="YES"}}], "tombstones"=[{"catenaXId"="urn:uuid:6c311d29-5753-46d4-b32c-19b918ea93b0", "endpointURL"="https://catena-x.net/vehicle/partdetails/", "processingError"={"errorDetail"="Details to reason of failure", "lastAttempt"="2022-02-03T14:48:54.709Z", "processStep"="SchemaValidation", "retryCounter"=0}}]} properties: bpns: type: array @@ -2270,74 +2191,40 @@ components: items: $ref: '#/components/schemas/Tombstone' maxItems: 2147483647 - JsonObject: - type: object - additionalProperties: false - properties: - valueType: - type: string - enum: - - 'ARRAY' - - 'OBJECT' - - 'STRING' - - 'NUMBER' - - 'TRUE' - - 'FALSE' - - 'NULL' - empty: - type: boolean - example: - payload: - '@context': - odrl: http://www.w3.org/ns/odrl/2/ - '@id': policy-id - policy: - 'odrl:permission': - - 'odrl:action': USE - 'odrl:constraint': - 'odrl:and': - - 'odrl:leftOperand': Membership - 'odrl:operator': - '@id': 'odrl:eq' - 'odrl:rightOperand': active - - 'odrl:leftOperand': PURPOSE - 'odrl:operator': - '@id': 'odrl:eq' - 'odrl:rightOperand': ID 3.1 Trace - validUntil: '2025-12-12T23:59:59.999Z' JsonValue: type: object additionalProperties: false + description: The policy payload. + example: + '@context': + odrl: http://www.w3.org/ns/odrl/2/ + '@id': policy-id + '@type': PolicyDefinitionRequestDto + policy: + '@type': Policy + odrl:permission: + - odrl:action: USE + odrl:constraint: + odrl:and: + - odrl:leftOperand: Membership + odrl:operator: + '@id': odrl:eq + odrl:rightOperand: active + - odrl:leftOperand: PURPOSE + odrl:operator: + '@id': odrl:eq + odrl:rightOperand: ID 3.1 Trace properties: valueType: type: string enum: - - 'ARRAY' - - 'OBJECT' - - 'STRING' - - 'NUMBER' - - 'TRUE' - - 'FALSE' - - 'NULL' - example: - payload: - '@context': - odrl: http://www.w3.org/ns/odrl/2/ - '@id': policy-id - policy: - 'odrl:permission': - - 'odrl:action': USE - 'odrl:constraint': - 'odrl:and': - - 'odrl:leftOperand': Membership - 'odrl:operator': - '@id': 'odrl:eq' - 'odrl:rightOperand': active - - 'odrl:leftOperand': PURPOSE - 'odrl:operator': - '@id': 'odrl:eq' - 'odrl:rightOperand': ID 3.1 Trace - validUntil: '2025-12-12T23:59:59.999Z' + - ARRAY + - OBJECT + - STRING + - NUMBER + - "TRUE" + - "FALSE" + - "NULL" LangString: type: object additionalProperties: false @@ -2380,9 +2267,9 @@ components: description: The lifecycle context in which the child part was assembled into the parent part. enum: - - asBuilt - - asPlanned - - asSpecified + - asBuilt + - asPlanned + - asSpecified example: asBuilt quantity: $ref: '#/components/schemas/Quantity' @@ -2396,40 +2283,12 @@ components: lexicalValue: type: string example: piece - Operator: - type: object - additionalProperties: false - properties: - '@id': - type: string - example: 'odrl:eq' - enum: - - eq - - neq - - lt - - gt - - in - - lteq - - gteq - - isA - - hasPart - - isPartOf - - isOneOf - - isAllOf - - isNoneOf PageResult: type: object additionalProperties: false - example: - pageCount: 0 - pageNumber: 6 - pageSize: 1 - content: - - completedOn: test - id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 - startedOn: 2000-01-23T04:56:07.000+00:00 - state: UNSAVED - totalElements: 5 + example: "{\"content\"=[{\"completedOn\"=\"test\", \"id\"=\"046b6c7f-0b8a-43b9-b35d-6489e6daee91\"\ + , \"startedOn\"=\"2000-01-23T04:56:07.000+00:00\", \"state\"=\"UNSAVED\"}],\ + \ \"pageCount\"=0, \"pageNumber\"=6, \"pageSize\"=1, \"totalElements\"=5}" properties: content: type: array @@ -2459,7 +2318,6 @@ components: example: BPNL0123456789XX maxLength: 16 minLength: 16 - #pattern: "^(BPN)(L|S|A)(\\d{10})([a-zA-Z0-9]{2})$" globalAssetId: type: string description: Id of global asset. @@ -2468,54 +2326,8 @@ components: minLength: 45 pattern: "^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" required: - - bpn - - globalAssetId - Permission: - type: object - additionalProperties: false - properties: - action: - type: string - example: USE - enum: - - ACCESS - - USE - constraint: - $ref: '#/components/schemas/Constraints' - Policy: - example: - createdOn: '2024-03-08T15:19:41.006Z' - permissions: - - action: USE - constraint: - and: - - leftOperand: string - odrl:rightOperand: string - operator: - "@id": odrl:eq - or: - - leftOperand: string - odrl:rightOperand: string - operator: - "@id": odrl:eq - policyId: f253718e-a270-4367-901b-9d50d9bd8462 - validUntil: '2024-03-08T15:19:41.006Z' - type: object - additionalProperties: false - properties: - createdOn: - type: string - format: date-time - permissions: - type: array - items: - $ref: '#/components/schemas/Permission' - policyId: - type: string - example: f253718e-a270-4367-901b-9d50d9bd8462 - validUntil: - type: string - format: date-time + - bpn + - globalAssetId ProcessingError: type: object additionalProperties: false @@ -2528,14 +2340,14 @@ components: processStep: type: string enum: - - SubmodelRequest - - DigitalTwinRequest - - SchemaValidation - - SchemaRequest - - BpdmRequest - - BpdmValidation - - UsagePolicyValidation - - EssValidation + - SubmodelRequest + - DigitalTwinRequest + - SchemaValidation + - SchemaRequest + - BpdmRequest + - BpdmValidation + - UsagePolicyValidation + - EssValidation retryCounter: type: integer format: int32 @@ -2545,28 +2357,29 @@ components: type: object additionalProperties: false properties: - href: - example: https://edc.data.plane/{path}/submodel - type: string endpointProtocol: - example: HTTPS type: string + example: HTTPS endpointProtocolVersion: type: array - example: ["1.0"] + example: + - "1.0" items: type: string - subprotocol: - type: string - subprotocolBody: - type: string - subprotocolBodyEncoding: + href: type: string + example: "https://edc.data.plane/{path}/submodel" securityAttributes: type: array items: $ref: '#/components/schemas/SecurityAttribute' maxItems: 2147483647 + subprotocol: + type: string + subprotocolBody: + type: string + subprotocolBodyEncoding: + type: string Quantity: type: object additionalProperties: false @@ -2576,21 +2389,21 @@ components: $ref: '#/components/schemas/MeasurementUnit' quantityNumber: type: number - example: 1.0 format: double + example: 1.0 maximum: 2147483647 minimum: 0 Reference: type: object additionalProperties: false properties: - type: - type: string keys: type: array items: $ref: '#/components/schemas/SemanticId' maxItems: 2147483647 + type: + type: string RegisterBatchOrder: type: object additionalProperties: false @@ -2604,9 +2417,9 @@ components: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt items: type: string - pattern: ^(urn:[bs]amm:.*\d\.\d\.\d)?(#)?(\w+)?$ + pattern: "^(urn:[bs]amm:.*\\d\\.\\d\\.\\d)?(#)?(\\w+)?$" maxItems: 2147483647 - pattern: ^(urn:[bs]amm:.*\d\.\d\.\d)?(#)?(\w+)?$ + pattern: "^(urn:[bs]amm:.*\\d\\.\\d\\.\\d)?(#)?(\\w+)?$" batchSize: type: integer format: int32 @@ -2618,17 +2431,17 @@ components: type: string description: The strategy how the batch is processed internally in IRS. enum: - - PRESERVE_BATCH_JOB_ORDER - - PRESERVE_JOB_ORDER - - PRESERVE_BATCH_ORDER + - PRESERVE_BATCH_JOB_ORDER + - PRESERVE_JOB_ORDER + - PRESERVE_BATCH_ORDER bomLifecycle: type: string description: The lifecycle context in which the child part was assembled into the parent part. enum: - - asBuilt - - asPlanned - - asSpecified + - asBuilt + - asPlanned + - asSpecified callbackUrl: type: string description: "Callback url to notify requestor when job processing is finished.\ @@ -2651,8 +2464,8 @@ components: default: downward description: Item graph traversal direction. enum: - - upward - - downward + - upward + - downward jobTimeout: type: integer format: int32 @@ -2678,7 +2491,7 @@ components: maximum: 86400 minimum: 60 required: - - keys + - keys RegisterBpnInvestigationBatchOrder: type: object additionalProperties: false @@ -2696,22 +2509,22 @@ components: type: string description: The strategy how the batch is processed internally in IRS. enum: - - PRESERVE_BATCH_JOB_ORDER - - PRESERVE_JOB_ORDER - - PRESERVE_BATCH_ORDER + - PRESERVE_BATCH_JOB_ORDER + - PRESERVE_JOB_ORDER + - PRESERVE_BATCH_ORDER bomLifecycle: type: string description: The lifecycle context in which the child part was assembled into the parent part. enum: - - asBuilt - - asPlanned - - asSpecified + - asBuilt + - asPlanned + - asSpecified callbackUrl: type: string description: "Callback url to notify requestor when job processing is finished.\ - \ There are four uri variable placeholders that can be used: orderId,\ - \ batchId, orderState and batchState." + \ There are four uri variable placeholders that can be used: orderId,\ + \ batchId, orderState and batchState." example: "https://hostname.com/callback?orderId={orderId}&batchId={batchId}&orderState={orderState}&batchState={batchState}" incidentBPNSs: type: array @@ -2740,8 +2553,8 @@ components: maximum: 86400 minimum: 60 required: - - incidentBPNSs - - keys + - incidentBPNSs + - keys RegisterBpnInvestigationJob: type: object additionalProperties: false @@ -2752,9 +2565,9 @@ components: description: The lifecycle context in which the child part was assembled into the parent part. enum: - - asBuilt - - asPlanned - - asSpecified + - asBuilt + - asPlanned + - asSpecified example: asPlanned callbackUrl: type: string @@ -2762,8 +2575,6 @@ components: \ There are two uri variable placeholders that can be used: jobId and\ \ jobState." example: "https://hostname.com/callback?jobId={jobId}&jobState={jobState}" - key: - $ref: '#/components/schemas/PartChainIdentificationKey' incidentBPNSs: type: array description: Array of BPNS numbers. @@ -2774,9 +2585,11 @@ components: pattern: "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}" maxItems: 2147483647 pattern: "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}" + key: + $ref: '#/components/schemas/PartChainIdentificationKey' required: - - incidentBPNSs - - key + - incidentBPNSs + - key RegisterJob: type: object additionalProperties: false @@ -2790,21 +2603,22 @@ components: - urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt items: type: string - pattern: ^(urn:[bs]amm:.*\d\.\d\.\d)?(#)?(\w+)?$ + pattern: "^(urn:[bs]amm:.*\\d\\.\\d\\.\\d)?(#)?(\\w+)?$" maxItems: 2147483647 - pattern: ^(urn:[bs]amm:.*\d\.\d\.\d)?(#)?(\w+)?$ + pattern: "^(urn:[bs]amm:.*\\d\\.\\d\\.\\d)?(#)?(\\w+)?$" auditContractNegotiation: type: boolean - description: Flag enables and disables auditing, including provisioning - of ContractAgreementId inside submodels and shells objects. Default is true. + description: "Flag enables and disables auditing, including provisioning\ + \ of ContractAgreementId inside submodels and shells objects. Default\ + \ is true." bomLifecycle: type: string description: The lifecycle context in which the child part was assembled into the parent part. enum: - - asBuilt - - asPlanned - - asSpecified + - asBuilt + - asPlanned + - asSpecified callbackUrl: type: string description: "Callback url to notify requestor when job processing is finished.\ @@ -2826,8 +2640,8 @@ components: default: downward description: Item graph traversal direction. enum: - - upward - - downward + - upward + - downward key: $ref: '#/components/schemas/PartChainIdentificationKey' lookupBPNs: @@ -2835,7 +2649,7 @@ components: description: Flag to specify whether BPNs should be collected and resolved via the configured BPDM URL. Default is false. required: - - key + - key Relationship: type: object additionalProperties: false @@ -2860,33 +2674,33 @@ components: type: object additionalProperties: false properties: + bpn: + type: string hops: type: integer format: int32 - bpn: - type: string result: type: string - SemanticId: + SecurityAttribute: type: object additionalProperties: false properties: + key: + type: string type: type: string - example: urn:bamm:com.catenax.vehicle:0.1.1 value: type: string - example: Submodel - SecurityAttribute: + SemanticId: type: object additionalProperties: false properties: type: type: string - key: - type: string + example: urn:bamm:com.catenax.vehicle:0.1.1 value: type: string + example: Submodel Shell: type: object additionalProperties: false @@ -2964,43 +2778,6 @@ components: type: object processingError: $ref: '#/components/schemas/ProcessingError' - AspectModel: - type: object - additionalProperties: false - properties: - name: - type: string - status: - type: string - type: - type: string - urn: - type: string - version: - type: string - AspectModels: - type: object - additionalProperties: false - example: - lastUpdated: 2023-02-13T08:18:11.990659500Z - models: - - urn: urn:bamm:io.catenax.single_level_bom_as_built:1.0.0#SingleLevelBomAsBuilt - name: SingleLevelBomAsBuilt - type: BAMM - version: 1.0.0 - status: RELEASED - - urn: urn:bamm:io.catenax.serial_part:1.0.0#SerialPart - name: SerialPart - type: BAMM - version: 1.0.0 - status: RELEASED - properties: - lastUpdated: - type: string - models: - type: array - items: - $ref: '#/components/schemas/AspectModel' UpdatePolicyRequest: type: object additionalProperties: false @@ -3024,8 +2801,8 @@ components: description: Timestamp after which the policy will no longer be accepted in negotiations. required: - - policyIds - - validUntil + - policyIds + - validUntil securitySchemes: api_key: description: Api Key access From da16713c67343e47d62d24d06a94f1a0159ecd5e Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 02:04:20 +0200 Subject: [PATCH 46/58] fix(impl): [#199] code formatting --- .../tractusx/irs/IrsApplicationTests.java | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java index c3b0e50fc1..da34d33cc1 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/IrsApplicationTests.java @@ -56,7 +56,9 @@ import org.springframework.test.context.ActiveProfiles; @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { "digitalTwinRegistry.type=central" }) -@ActiveProfiles(profiles = { "local", "test" }) +@ActiveProfiles(profiles = { "local", + "test" +}) @Import(TestConfig.class) class IrsApplicationTests { @@ -77,6 +79,7 @@ class IrsApplicationTests { @Test void generatedOpenApiMatchesContract() throws Exception { + final String generatedYaml = this.restTemplate.getForObject("http://localhost:" + port + "/api/api-docs.yaml", String.class); final InputStream definedYaml = Files.newInputStream(Path.of("../docs/src/api/irs-api.yaml")); @@ -87,14 +90,18 @@ void generatedOpenApiMatchesContract() throws Exception { // To correctly display both documentations examples - manual and generated by annotations - // we need to remove verification for some "examples", otherwise one or another won't display correctly - assertThat(generatedYamlMap).usingRecursiveComparison() - .ignoringFields("components.schemas.PageResult.example") - .ignoringFields("components.schemas.AspectModels.example") - .ignoringFields("components.schemas.BatchOrderResponse.example") - .ignoringFields("components.schemas.Jobs.example") - .ignoringFields("components.schemas.Policy") - .ignoringFields("components.schemas.BatchResponse.example") - .isEqualTo(definedYamlMap); + assertThat(generatedYamlMap) + + .usingRecursiveComparison() + + .ignoringFields("components.schemas.PageResult.example") + .ignoringFields("components.schemas.AspectModels.example") + .ignoringFields("components.schemas.BatchOrderResponse.example") + .ignoringFields("components.schemas.Jobs.example") + .ignoringFields("components.schemas.Policy") + .ignoringFields("components.schemas.BatchResponse.example") + + .isEqualTo(definedYamlMap); } @@ -109,7 +116,6 @@ void shouldStoreBlobResultWhenRunningJob() throws Exception { final JobInitiateResponse response = jobOrchestrator.startJob("rootitemid", jobParameter, null); - assertThat(response.getStatus()).isEqualTo(ResponseStatus.OK); Awaitility.await() From 3ba862f18cbd53ed86787224f7ec795a4ee326c6 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 02:48:21 +0200 Subject: [PATCH 47/58] fix(impl): [#199] fix PMD errors --- .../controllers/PolicyStoreController.java | 2 +- .../services/PolicyStoreService.java | 26 +++++++++---------- .../BusinessPartnerNumberListValidator.java | 2 +- .../services/PolicyStoreServiceTest.java | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java index aac16c6448..470f714830 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/controllers/PolicyStoreController.java @@ -144,7 +144,7 @@ public CreatePoliciesResponse registerAllowedPolicy(@Valid @RequestBody final Cr description = "Returns the policies as map of BPN to list of policies.", content = { @Content(mediaType = APPLICATION_JSON_VALUE, examples = @ExampleObject( - value = PolicyResponse.BPN_TO_POLICY_MAP_EXAMPLE), + PolicyResponse.BPN_TO_POLICY_MAP_EXAMPLE), schema = @Schema( description = "Map of BPN to list of policies")) }), diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java index fcd9fbe288..7b9eb684dc 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreService.java @@ -70,6 +70,19 @@ }) public class PolicyStoreService implements AcceptedPoliciesProvider { + private final List allowedPoliciesFromConfig; + + private final PolicyPersistence persistence; + + private final EdcTransformer edcTransformer; + + private final Clock clock; + + private static final String MISSING_REQUEST_FIELD_MESSAGE = + "Request does not contain all required fields. " + "Missing: %s"; + + private static final String DEFAULT = "default"; + /** * Constants for the configured default policy. */ @@ -85,19 +98,6 @@ private static final class ConfiguredDefaultPolicy { public static final int DEFAULT_POLICY_LIFETIME_YEARS = 5; } - private final List allowedPoliciesFromConfig; - - private final PolicyPersistence persistence; - - private final EdcTransformer edcTransformer; - - private final Clock clock; - - private static final String MISSING_REQUEST_FIELD_MESSAGE = - "Request does not contain all required fields. " + "Missing: %s"; - - static final String DEFAULT = "default"; - public PolicyStoreService(final DefaultAcceptedPoliciesConfig defaultAcceptedPoliciesConfig, final PolicyPersistence persistence, final EdcTransformer edcTransformer, final Clock clock) { this.allowedPoliciesFromConfig = createDefaultPolicyFromConfig(defaultAcceptedPoliciesConfig); diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java index ef9a5f4a1d..e143126d07 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/validators/BusinessPartnerNumberListValidator.java @@ -39,7 +39,7 @@ public class BusinessPartnerNumberListValidator private static final Pattern PATTERN = Pattern.compile(BPN_REGEX); @Override - public boolean isValid(List value, ConstraintValidatorContext context) { + public boolean isValid(final List value, final ConstraintValidatorContext context) { // allow null and empty here (in order to allow flexible combination with @NotNull and @NotEmpty) if (value == null || value.isEmpty()) { diff --git a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java index 40bbcf386e..7508a276b9 100644 --- a/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java +++ b/irs-policy-store/src/test/java/org/eclipse/tractusx/irs/policystore/services/PolicyStoreServiceTest.java @@ -317,7 +317,7 @@ void getAcceptedPolicies_whenNoPoliciesAssociatedWithTheGivenBpn_shouldReturnThe // this overrides the configured default policy (see the previous test above) final String defaultPolicyId1 = "registered-default-policy-1"; final String defaultPolicyId2 = "registered-default-policy-2"; - when(persistenceMock.readAll(PolicyStoreService.DEFAULT)).thenReturn(List.of( + when(persistenceMock.readAll("default")).thenReturn(List.of( // default policy 1 createPolicy(defaultPolicyId1), // default policy 2 From 2360dea9c2151f6a2226ce8cf3185a592b2905bd Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 08:56:18 +0200 Subject: [PATCH 48/58] Update irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java --- .../tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java index fccd653888..e78a394b29 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/AbstractDelegate.java @@ -94,7 +94,7 @@ protected SubmodelDescriptor requestSubmodel(final EdcSubmodelFacade submodelFac final Optional dspEndpoint = extractDspEndpoint(subprotocolBody); if (dspEndpoint.isPresent()) { - log.debug("Using dspEndpoint of subprotocolBody '{}' to get submodel policies", subprotocolBody); + log.debug("Using dspEndpoint of subprotocolBody '{}' to get submodel payload", subprotocolBody); return submodelFacade.getSubmodelPayload(dspEndpoint.get(), digitalTwinRegistryEndpoint.getProtocolInformation().getHref(), extractAssetId(subprotocolBody), bpn); From d4077c974277c9379710d95467dc0bd87e9ef3c8 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 08:56:53 +0200 Subject: [PATCH 49/58] Update irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java --- .../irs/aaswrapper/job/delegate/RelationshipDelegate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java index 9f10710756..c3f15222ea 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/RelationshipDelegate.java @@ -127,7 +127,7 @@ private void processEndpoint(final Endpoint endpoint, final RelationshipAspect r Tombstone.from(itemId.getGlobalAssetId(), endpoint.getProtocolInformation().getHref(), e, 0, ProcessStep.SUBMODEL_REQUEST)); } catch (final JsonParseException e) { - log.info("Submodel policies did not match the expected AspectType. Creating Tombstone."); + log.info("Submodel payload did not match the expected AspectType. Creating Tombstone."); itemContainerBuilder.tombstone( Tombstone.from(itemId.getGlobalAssetId(), endpoint.getProtocolInformation().getHref(), e, 0, ProcessStep.SUBMODEL_REQUEST)); From 6520bf93153a7f1cd33cff63636a888c6a3cfcce Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 08:57:39 +0200 Subject: [PATCH 50/58] Update irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java --- .../tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java index 9e9764cadb..594a0252da 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java @@ -134,7 +134,7 @@ private List getSubmodels(final SubmodelDescriptor submodelDescriptor, } else { final String errors = String.join(", ", validationResult.getValidationErrors()); itemContainerBuilder.tombstone(Tombstone.from(itemId, endpoint.getProtocolInformation().getHref(), - new IllegalArgumentException("Submodel policies validation failed. " + errors), 0, + new IllegalArgumentException("Submodel payload validation failed. " + errors), 0, ProcessStep.SCHEMA_VALIDATION)); } } catch (final JsonParseException e) { From 7f96e04dfed16e610baeacc3c65ee6e7d9221f30 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 08:58:14 +0200 Subject: [PATCH 51/58] Update irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java --- .../tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java index 594a0252da..8505e2df2f 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/aaswrapper/job/delegate/SubmodelDelegate.java @@ -140,7 +140,7 @@ private List getSubmodels(final SubmodelDescriptor submodelDescriptor, } catch (final JsonParseException e) { itemContainerBuilder.tombstone(Tombstone.from(itemId, endpoint.getProtocolInformation().getHref(), e, RetryRegistry.ofDefaults().getDefaultConfig().getMaxAttempts(), ProcessStep.SCHEMA_VALIDATION)); - log.info("Submodel policies did not match the expected AspectType. Creating Tombstone."); + log.info("Submodel payload did not match the expected AspectType. Creating Tombstone."); } catch (final SchemaNotFoundException | InvalidSchemaException | RestClientException e) { itemContainerBuilder.tombstone(Tombstone.from(itemId, endpoint.getProtocolInformation().getHref(), e, 0, ProcessStep.SCHEMA_REQUEST)); From dec6f5be2b46decee9dec3a2d7d5935b6374299e Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 08:59:21 +0200 Subject: [PATCH 52/58] Update irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java --- .../tractusx/irs/services/validation/JsonValidatorService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java index 756f49fa63..1649354231 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java @@ -74,7 +74,7 @@ public ValidationResult validate(final String jsonSchema, final String jsonPaylo return createValidationResult(errors); } catch (final IllegalStateException | JsonParseException e) { - log.warn("Unable to validate JSON policies ({})", jsonPayload, e); + log.warn("Unable to validate JSON payload ({})", jsonPayload, e); return ValidationResult.builder() .valid(false) .validationError("Illegal JSON policies, cannot be validated") From d376a7bee96865867bb0facec66db71f4debce4f Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 09:00:58 +0200 Subject: [PATCH 53/58] Update irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java --- .../tractusx/irs/services/validation/JsonValidatorService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java index 1649354231..3b09ae01ee 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java @@ -54,7 +54,7 @@ public JsonValidatorService(final JsonUtil parser) { } /** - * Validate the policies against the schema. + * Validate the payload against the schema. * * @param jsonSchema the JSON schema * @param jsonPayload the JSON policies to validate From a0d3ea6ba7a1fbc66744ae8b3ef639a30ddd878a Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 09:01:24 +0200 Subject: [PATCH 54/58] Update irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java --- .../tractusx/irs/services/validation/JsonValidatorService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java index 3b09ae01ee..c5a3e6cdf8 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java @@ -57,7 +57,7 @@ public JsonValidatorService(final JsonUtil parser) { * Validate the payload against the schema. * * @param jsonSchema the JSON schema - * @param jsonPayload the JSON policies to validate + * @param jsonPayload the JSON payload to validate * @return the validation result, containing the validation errors if applicable */ public ValidationResult validate(final String jsonSchema, final String jsonPayload) throws InvalidSchemaException { From 7cac10260e858159db81338455ce822854e45956 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 09:01:57 +0200 Subject: [PATCH 55/58] Update irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java --- .../tractusx/irs/services/validation/JsonValidatorService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java index c5a3e6cdf8..9d95eefe23 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/validation/JsonValidatorService.java @@ -77,7 +77,7 @@ public ValidationResult validate(final String jsonSchema, final String jsonPaylo log.warn("Unable to validate JSON payload ({})", jsonPayload, e); return ValidationResult.builder() .valid(false) - .validationError("Illegal JSON policies, cannot be validated") + .validationError("Illegal JSON payload, cannot be validated") .build(); } } From e23ff9e8d4c8db047b9127bedcb72802f1ca869f Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 09:03:08 +0200 Subject: [PATCH 56/58] Update irs-api/src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java --- .../src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java index e3d2edd65c..eb30ba208f 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/util/JsonUtil.java @@ -79,7 +79,7 @@ public String asString(final Object input) { try { return MAPPER.writeValueAsString(input); } catch (JsonProcessingException e) { - log.error("Error serializing policies", e); + log.error("Error serializing payload", e); throw new JsonParseException(e); } } From 7773020fdde50ddd90215be348609050fa87927c Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 09:05:32 +0200 Subject: [PATCH 57/58] Update irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java --- .../tractusx/irs/policystore/models/CreatePolicyRequest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java index a3e3054150..59624d8d47 100644 --- a/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java +++ b/irs-policy-store/src/main/java/org/eclipse/tractusx/irs/policystore/models/CreatePolicyRequest.java @@ -59,7 +59,7 @@ The business partner number (BPN) for which the policy should be registered. JsonObject payload) { @SuppressWarnings("java:S2479") - // this value is used by open-api to show example policies + // this value is used by open-api to show example payload // \u0009 character is required for this value to be correctly shown in open-api public static final String EXAMPLE_PAYLOAD = """ { From db75d10ff43a24c2603aeda913e60b0dd675d1e2 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 10 Apr 2024 10:25:20 +0200 Subject: [PATCH 58/58] fix(impl): [#199] fix insomnia collection --- .../IRS_Request_Collection.json | 7257 +++++++++-------- 1 file changed, 3661 insertions(+), 3596 deletions(-) diff --git a/local/testing/request-collection/IRS_Request_Collection.json b/local/testing/request-collection/IRS_Request_Collection.json index 7f3f7a0d53..941366d437 100644 --- a/local/testing/request-collection/IRS_Request_Collection.json +++ b/local/testing/request-collection/IRS_Request_Collection.json @@ -1,3600 +1,3665 @@ { - "_type": "export", - "__export_format": 4, - "__export_date": "2024-04-04T09:16:52.974Z", - "__export_source": "insomnia.desktop.app:v2023.5.8", - "resources": [ - { - "_id": "req_2d5a4fb5ec0845059533cb9904910156", - "parentId": "fld_c751e5e73d5248a3ae22a44bafae7906", - "modified": 1705006817408, - "created": 1705005887617, - "url": "{{IRS_HOST}}/irs/policies", - "name": "Get all policies", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.ADMIN_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1705005887617, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_3982c8bdad534c0ea601f61bdb785816", - "parentId": "fld_c751e5e73d5248a3ae22a44bafae7906", - "modified": 1711596830125, - "created": 1711449523700, - "url": "{{IRS_HOST}}/irs/policies", - "name": "Get policies for BPN", + "_type": "export", + "__export_format": 4, + "__export_date": "2024-04-10T08:18:24.322Z", + "__export_source": "insomnia.desktop.app:v8.6.1", + "resources": [ + { + "_id": "req_ddeaf33f8aba4e7caa89d257bb8adbdf", + "parentId": "fld_f8e0a855a2e24de09b6fb5a9f6df545d", + "modified": 1705006817408, + "created": 1705005887617, + "url": "{{IRS_HOST}}/irs/policies", + "name": "Get all policies", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.ADMIN_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1705005887617, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_f8e0a855a2e24de09b6fb5a9f6df545d", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1687243055015, + "created": 1687243055015, + "name": "Policy Store", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1687243055015, + "_type": "request_group" + }, + { + "_id": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "parentId": "wrk_53254e8de24e4d6e8325f803463490e8", + "modified": 1691572726194, + "created": 1680682418636, + "name": "IRS DEMO Collection", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418636, + "_type": "request_group" + }, + { + "_id": "wrk_53254e8de24e4d6e8325f803463490e8", + "parentId": null, + "modified": 1701227455138, + "created": 1701227455138, + "name": "IRS", + "description": "", + "scope": "collection", + "_type": "workspace" + }, + { + "_id": "req_209e12e564484bacbcdee19f862c4ffe", + "parentId": "fld_f8e0a855a2e24de09b6fb5a9f6df545d", + "modified": 1712736856772, + "created": 1711449523700, + "url": "{{IRS_HOST}}/irs/policies", + "name": "Get policies for BPN", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "id": "pair_8482da576c10480b9f7edf7a4aa752c6", + "name": "businessPartnerNumbers", + "value": "BPNL1234567890AB", + "description": "", + "disabled": false + }, + { + "id": "pair_ec0ce8fad21144aaa531cbbcb941f522", + "name": "businessPartnerNumbers", + "value": "BPNL1234567890XX", + "description": "", + "disabled": false + } + ], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.ADMIN_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1703116992024, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_b9950550995c4f888e5ded6c6c275035", + "parentId": "fld_f8e0a855a2e24de09b6fb5a9f6df545d", + "modified": 1702990529632, + "created": 1687243204155, + "url": "{{IRS_HOST}}/irs/policies/{% prompt 'policyId', '', 'traceability-test', '', false, true %}", + "name": "Delete policy", + "description": "", + "method": "DELETE", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.ADMIN_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1685602897140.75, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_2c425451945e4aec953f2a319fed6353", + "parentId": "fld_f8e0a855a2e24de09b6fb5a9f6df545d", + "modified": 1712736811711, + "created": 1693576003390, + "url": "{{IRS_HOST}}/irs/policies", + "name": "Update policies", + "description": "", + "method": "PUT", + "body": { + "mimeType": "application/json", + "text": "{\n \"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumbers\": [\n\t\t\"BPNL00000001CRHK\"\n\t],\n\t\"policyIds\": [\n\t\t\"policy-id12\"\n\t]\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.ADMIN_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1684874704117.875, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_0145ca9fad0a4322b1fe4f9999fb568c", + "parentId": "fld_f8e0a855a2e24de09b6fb5a9f6df545d", + "modified": 1712736780844, + "created": 1687243182397, + "url": "{{IRS_HOST}}/irs/policies", + "name": "Register policy", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumber\": \"BPNL1234567890AB\",\n\t\"payload\":\n\t\t{\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"mf-policy-4\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.ADMIN_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1683962737633.5, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_07bf6fac04c7463484434f109bd87a23", + "parentId": "fld_c6e3c0e5fc504a15975467f151974fa5", + "modified": 1706003275081, + "created": 1680682418619, + "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/shell-descriptors/{% prompt 'aasIdentifier', '', _.GLOBAL_ASSET_ID, '', false, true %}", + "name": "Get Shell by aasIdentifier", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "id": "pair_7877c58fd3ae46758cabf9f6cb397818", + "name": "Edc-Bpn", + "value": "BPNL00000001CRHK", + "description": "", + "disabled": false + } + ], + "authentication": {}, + "metaSortKey": -1680682418619, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_c6e3c0e5fc504a15975467f151974fa5", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1691504187689, + "created": 1680682418630, + "name": "Digital Twin Registry", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418630, + "_type": "request_group" + }, + { + "_id": "req_d671d2da0dd348509317de89de928e8a", + "parentId": "fld_c6e3c0e5fc504a15975467f151974fa5", + "modified": 1706002920212, + "created": 1690529035794, + "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/shell-descriptors", + "name": "Get Shells", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "id": "pair_7877c58fd3ae46758cabf9f6cb397818", + "name": "Edc-Bpn", + "value": "BPNL00000001CRHK", + "description": "", + "disabled": false + } + ], + "authentication": {}, + "metaSortKey": -1680682418614, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_bf3345a1de634cf282ce419e0de0b1fc", + "parentId": "fld_c6e3c0e5fc504a15975467f151974fa5", + "modified": 1706003278149, + "created": 1680682418609, + "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells", + "name": "Query Registry By BPN", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "assetIds", + "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003AYRE\"}],", + "disabled": true, + "id": "pair_c8a20aa6fd7647a98da9b91abfe0cfa8" + }, + { + "name": "assetIds", + "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003AVTH\"}],", + "disabled": true, + "id": "pair_cc48c08e3b834497a2d88bd4201c3867" + }, + { + "name": "assetIds", + "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003AZQP\"}]", + "disabled": false, + "id": "pair_4187c8b0b8894410a17eb0ff2cf1523a" + }, + { + "name": "assetIds", + "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003B2OM\"}],", + "disabled": true, + "id": "pair_706e6930cc874343941b744a054ef388" + }, + { + "name": "assetIds", + "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003B3NX\"}],", + "disabled": true, + "id": "pair_45c6bcf3266a475891ebbbba6cde0798" + }, + { + "name": "assetIds", + "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003B5MJ\"}],", + "disabled": true, + "id": "pair_89445c9795e54bbfa1e26dae0fe4756a" + }, + { + "name": "assetIds", + "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003B0Q0\"}],", + "disabled": true, + "id": "pair_d72f55c7bf714c7c9aae58456c778443" + }, + { + "name": "assetIds", + "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003AXS3\"}],", + "disabled": true, + "id": "pair_406c9da4dc014fb297f70bb3da7128c1" + } + ], + "headers": [ + { + "id": "pair_72e0b43ab2ba4417bbc72bf08182edd0", + "name": "Edc-Bpn", + "value": "BPNL00000001CRHK", + "description": "" + } + ], + "authentication": {}, + "metaSortKey": -1680682418609, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_9d96d6cf4d06400c9cf9f9c0cabcaeed", + "parentId": "fld_c6e3c0e5fc504a15975467f151974fa5", + "modified": 1706003280850, + "created": 1680682418595, + "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells", + "name": "Query Registry By VAN", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "assetIds", + "value": "[{\"name\":\"van\",\"value\": \"OMBSWNHVABEWMQTAV\"}]", + "disabled": false, + "id": "pair_50d86e928e9f448d97da8ada0390e12f" + } + ], + "headers": [ + { + "id": "pair_ed11c2a6df9248e292914df944e8ba93", + "name": "Edc-Bpn", + "value": "BPNL00000001CRHK", + "description": "" + } + ], + "authentication": {}, + "metaSortKey": -1680682418595, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_64ab7bb5a4224fb7a467c9614a5bd34e", + "parentId": "fld_c6e3c0e5fc504a15975467f151974fa5", + "modified": 1706003354109, + "created": 1680682418581, + "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells", + "name": "Query Registry By globalAssetId", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "assetIds", + "value": "[{\"name\":\"globalAssetId\",\"value\":\"{% prompt 'id', '', '', '', false, true %}\"}]", + "disabled": false, + "id": "pair_f5f3d12fb2224c1d9e577c42128aa3d9" + } + ], + "headers": [ + { + "id": "pair_71ae5e562e9c414a82e84220f3c00343", + "name": "Edc-Bpn", + "value": "BPNL00000001CRHK", + "description": "" + } + ], + "authentication": {}, + "metaSortKey": -1680682418581, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_b297ba4421144beba4c295260f78b66d", + "parentId": "fld_c6e3c0e5fc504a15975467f151974fa5", + "modified": 1706003284715, + "created": 1680682418570, + "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells/query", + "name": "Query Registry By VAN", + "description": "", + "method": "POST", + "body": { + "mimeType": "", + "text": "{\n \"query\": {\n \"assetIds\": [\n {\n \"value\" : \"OMCOFCRMXMBASAFZY\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMCNAXRMATEMEDENV\",\n \"name\" : \"van\"\n }\n ,\n {\n \"value\" : \"OMCODXGPGLPLKEAIQ\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMBGHXHATHICIEYOU\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMAGCJCBDQGPYRQCS\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMBIBCLBMGCJNUKUW\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMCRHSMILXFLDSPTT\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMCLNVPYKUQCNIBOW\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMCXYXGFMJIBYQLBL\",\n \"name\" : \"van\"\n }\n ]\n }\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json", + "id": "pair_2f4c445074514f92a4dee92554053d0a" + }, + { + "id": "pair_35fe7a71647f4aea91ba03bfc87f0cd0", + "name": "Edc-Bpn", + "value": "BPNL00000001CRHK", + "description": "" + } + ], + "authentication": {}, + "metaSortKey": -1680682418570, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_24bd3fe717c14549a17a41ec75bdd6c3", + "parentId": "fld_c6e3c0e5fc504a15975467f151974fa5", + "modified": 1706003286642, + "created": 1691408320970, + "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells/query", + "name": "Query Registry By globalAssetId", + "description": "", + "method": "POST", + "body": { + "mimeType": "", + "text": "{\n\t\"query\": {\n\t\t\"assetIds\": [\n\t\t\t{\n\t\t\t\t\"value\": \"urn:uuid:da53d429-5770-410e-a13e-424e77952d8a\",\n\t\t\t\t\"name\": \"globalAssetId\"\n\t\t\t}\n\t\t]\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json", + "id": "pair_c1f8de03ff8f4f92aeeeef63510f755e" + }, + { + "id": "pair_5dc1d703196747318faff9a8dd96be0c", + "name": "Edc-Bpn", + "value": "BPNL00000001CRHK", + "description": "" + } + ], + "authentication": {}, + "metaSortKey": -1680682418560.5, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_fb7c0fc211f44397a850a2bc562b96c0", + "parentId": "fld_c6e3c0e5fc504a15975467f151974fa5", + "modified": 1706003289343, + "created": 1689167429413, + "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/shell-descriptors/{% prompt 'id', '', '', '', false, true %}", + "name": "Delete Shell by aasIdentifier", + "description": "", + "method": "DELETE", + "body": {}, + "parameters": [ + { + "id": "pair_6266690c04fd466fa1617082f5b8ec76", + "name": "pageSize", + "value": "50", "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "id": "pair_8482da576c10480b9f7edf7a4aa752c6", - "name": "businessPartnerNumbers", - "value": "BPNL1234567890AB", - "description": "", - "disabled": false - }, - { - "id": "pair_ec0ce8fad21144aaa531cbbcb941f522", - "name": "businessPartnerNumbers", - "value": "BPNL123456789012", - "description": "", - "disabled": false - } + "disabled": true + } + ], + "headers": [ + { + "id": "pair_7877c58fd3ae46758cabf9f6cb397818", + "name": "Edc-Bpn", + "value": "BPNL00000001CRHK", + "description": "", + "disabled": false + } + ], + "authentication": {}, + "metaSortKey": -1680682418470, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_6a734310d9794711895a7412e4a489bb", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991054859, + "created": 1680682418551, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.0.0 [Register Job]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418551, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_57f291f4f2184a68a104dc0706e73962", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1680682418562, + "created": 1680682418562, + "name": "IRS Test Collection", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418562, + "_type": "request_group" + }, + { + "_id": "req_b598213913a841fc93bebd37ccc2fe1c", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991058493, + "created": 1680682418539, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.1.0 [Register Job globalAssetId ]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:00000000-0000-0000-0000-000000000000\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418539, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_1faa38ab41ec44058e569885a1b83a53", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991063641, + "created": 1680682418524, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.1.1 [Register Job globalAssetId ]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:6c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418524, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_c463e6aa998c4305b8e24013bfe3df79", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991067797, + "created": 1680682418514, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.2.0 [Register Job with depth and bomLifecycle asBuilt]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"depth\": 2,\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418514, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_9d7b7729c3c747e685d0ae781d7a9e9a", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991071709, + "created": 1680682418504, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.2.1 [Register Job with depth and bomLifecycle asPlanned]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"bomLifecycle\": \"asPlanned\",\n\t\"depth\": 2\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418504, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_e0fcb6d8e38146718d518ada1afad4b2", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991076696, + "created": 1695042901876, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.2.2 [Register Job with depth and bomLifecycle asSpecified]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"bomLifecycle\": \"asSpecified\",\n\t\"depth\": 2\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418496, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_97693e7c910944ddb12bd6715ece0634", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076144872, + "created": 1680682418488, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.3.0 [Register Job with aspect SerialPart]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418488, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_a6532b996ee24749a7deedfc497871b2", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076455844, + "created": 1680682418479, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.3.1 [Register Job with aspect SerialPart and SingleLevelBomAsBuilt]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418479, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_93c58e5d9eac441b946e3c91eafc5e55", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1712222178406, + "created": 1680682418469, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.3.2 [Register Job with aspect MaterialForRecycling and BatteryPass]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.battery.battery_pass:3.0.1#BatteryPass\",\n\t\t\"urn:samm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418469, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_bd90c4ae330143b681d3e40e28b08678", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076741632, + "created": 1680682418442, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.3.3 [Register Job with aspect PartAsPlanned]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"bomLifecycle\": \"asPlanned\",\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418442, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_6bfba7dfa13340ef82af70bfe3ceb888", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076751758, + "created": 1680682418432, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.3.4 [Register Job with upward direction]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:3402b29d-07a6-42ad-80ff-272b50fbe24a\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t},\n\t\"direction\": \"upward\"\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418432, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_38df9b91319444298e0cb7e4c12db6c2", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1712222124387, + "created": 1695192937155, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.3.5 [Register Job with aspect JustInSequencePart]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.just_in_sequence_part:3.0.0#JustInSequencePart\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418428, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_6e8167a35b75481b8e06fd6ce11ecb0e", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1712222106070, + "created": 1695192971825, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.3.6 [Register Job with aspect TractionBatteryCode]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418426, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_3a497f19d7984482a4ec2a0b5fa046e5", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076214310, + "created": 1680682418424, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.4.0 [Register Job with invalid or not exisiting aspect type]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:bamm:io.catenax.part_serial_typization:1.0.1#PartSerialTypization\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418424, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_bdb5f2b5b99647a99cab15ab4c1cec82", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991130711, + "created": 1680682418414, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.4.1 [Register Job with invalid or not exisiting aspect type]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418414, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_43b5831ce81b4221a223667cbe141160", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076937249, + "created": 1680682418401, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.5.0 [Register Job with all aspect type]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\",\n\t\t\"urn:samm:io.catenax.batch:3.0.0#Batch\",\n\t\t\"urn:bamm:io.catenax.battery.product_description:1.0.1#ProductDescription\",\n\t\t\"urn:bamm:io.catenax.market_place_offer:1.4.0#MarketPlaceOffer\",\n\t\t\"urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling\",\n\t\t\"urn:bamm:io.catenax.physical_dimension:1.0.0#PhysicalDimension\",\n\t\t\"urn:bamm:io.catenax.return_request:1.0.1#ReturnRequest\",\n\t\t\"urn:bamm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode\",\n\t\t\"urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418401, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_155a7e4b96624743b599ed75c83aedf8", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076677384, + "created": 1680682418392, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.6.0 [Register Job with BPN lookup]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.batch:3.0.0#Batch\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"lookupBPNs\": false\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418392, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_d915c524b71c43018f58e7151b40687c", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076237949, + "created": 1683184048412, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.7.0 [Register Job with invalid policy]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:da53d429-5770-410e-a13e-424e77952d8a\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true,\n\t\"lookupBPNs\": false\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418386.5, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_8cf09f0176df4010ad033de0a19f9a07", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076397373, + "created": 1693493383337, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.8.0 [Register Job with data integrity success]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n \"integrityCheck\": true,\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:a1fa0f85-697d-4c9d-982f-2501af8e8636\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418382.375, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_5a31fda0c5d14ad7ab4d8de1a7355836", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076245754, + "created": 1693493584873, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.8.1 [Register Job with data integrity wrong hash]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n \"integrityCheck\": true,\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:05abf6ff-8c78-4b72-948b-40e08e9b83f3\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418381.6875, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_87e0551ccbbb474a99e8b91869af39d5", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076391502, + "created": 1693493594373, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.8.2 [Register Job with data integrity wrong signature]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n \"integrityCheck\": true,\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:17e11d67-0315-4504-82cd-8e70a8c33a6a\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418381.3438, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_3a13072096c84c98a5d4ba66df3088ce", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1710076385497, + "created": 1693493604521, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "1.8.3 [Register Job with data integrity integrity aspect missing]", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n \"integrityCheck\": true,\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:5672e8ff-8a73-425e-b2a5-5561b5b21d7a\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418381.1719, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_d6aea3d1645a49438def9a9f8fbfacfd", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991173689, + "created": 1680682418381, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "2.0.0 [Search for completed Jobs]", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "states", + "value": "COMPLETED", + "disabled": false + } + ], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418381, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_53d5f4fe6b464127a302b1a7dc6c76b9", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991177973, + "created": 1680682418372, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "2.0.1 [Search for Jobs in error state]", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "states", + "value": "ERROR", + "disabled": false + } + ], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418372, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_58a136c047034eb7a688048cbdf108fb", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991182139, + "created": 1680682418358, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "2.0.2 [Search for Jobs in initial state]", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "states", + "value": "INITIAL", + "disabled": false + } + ], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418358, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_f570a88240804513aa54f57660cd13a9", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991186114, + "created": 1680682418348, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "2.0.3 [Search for all Jobs in JobStore]", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418348, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_98c5e996682446a1a23faae569a5a13e", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991190326, + "created": 1680682418339, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "2.1.0 [Search for running Jobs]", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "states", + "value": "RUNNING", + "disabled": false + } + ], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418339, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_90e45ff9e06c4e179677db5e8f41aae6", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991196283, + "created": 1680682418325, + "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", + "name": "3.0.0 [Search for given jobId with uncomplete]", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "returnUncompletedJob", + "value": "true", + "disabled": false + } + ], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418325, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_072ae3b46a564fd78f37ab686cbc7270", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991200399, + "created": 1680682418316, + "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", + "name": "3.1.0 [Search for given jobId]", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418316, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_e15a23d43cae40c783dd6d2ebb90cea0", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991205447, + "created": 1680682418307, + "url": "{{IRS_HOST}}/irs/jobs/test", + "name": "3.1.1 [Search for invalid jobId]", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418307, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_c97b48a91163423aaaeeb77abd78a4a4", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991214202, + "created": 1680682418297, + "url": "{{IRS_HOST}}/irs/jobs/00000000-0000-0000-0000-000000000000", + "name": "3.1.2 [Search for unknown jobId]", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418297, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_909b3f2338a04498b737ec6fc16189bd", + "parentId": "fld_57f291f4f2184a68a104dc0706e73962", + "modified": 1702991218362, + "created": 1680682418280, + "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", + "name": "6.0.0 [Cancel Job for given jobId]", + "description": "", + "method": "PUT", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418280, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_b587b3cc5fe64d4086856c228a1a0d52", + "parentId": "fld_18778b59b43a433caf173c19db608803", + "modified": 1705942015684, + "created": 1682672699249, + "url": "{{ _.BPN_DISCOVERY }}/api/administration/connectors/bpnDiscovery/search", + "name": "Find BPN endpoints for manufacturer numbers", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n \"searchFilter\": [\n {\n \"type\": \"oen\",\n \"keys\": [\n \"oen-1243\",\n \"oen-11\"\n ]\n },\n {\n \"type\": \"bpid\",\n \"keys\": [\n \"bpid-1243\",\n \"bpid-11\"\n ]\n }\n ]\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "oauth2", + "grantType": "client_credentials", + "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", + "clientId": "{{ _.DISCOVERY_CLIENT_ID }}", + "clientSecret": "{{ _.DISCOVERY_CLIENT_SECRET }}", + "disabled": false + }, + "metaSortKey": -1683630902023, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_18778b59b43a433caf173c19db608803", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1683630931664, + "created": 1683630887514, + "name": "Discovery", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418417.5, + "_type": "request_group" + }, + { + "_id": "req_813c337498d44a0698850adb60b259cf", + "parentId": "fld_18778b59b43a433caf173c19db608803", + "modified": 1705942027574, + "created": 1683031718699, + "url": "{{ _.DISCOVERY_FINDER }}/api/administration/connectors/discovery/search", + "name": "Find BPN Discovery Endpoints of type BPN", + "description": "", + "method": "POST", + "body": { + "mimeType": "", + "text": "{\n \"types\": [\n \"bpn\"\n ]\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "oauth2", + "grantType": "client_credentials", + "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", + "clientId": "{{ _.DISCOVERY_CLIENT_ID }}", + "clientSecret": "{{ _.DISCOVERY_CLIENT_SECRET }}", + "disabled": false + }, + "metaSortKey": -1683630901923, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_5d03557be4d54ec4871d2f5bffdb0993", + "parentId": "fld_18778b59b43a433caf173c19db608803", + "modified": 1705942036978, + "created": 1683560906453, + "url": "{{ _.EDC_DISCOVERY }}/api/administration/connectors/discovery", + "name": "Find EDC endpoints for BPNs", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "[\n\t\"BPNL00000001CRHK\"\n]" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "oauth2", + "grantType": "client_credentials", + "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", + "clientId": "{{ _.DISCOVERY_CLIENT_ID }}", + "clientSecret": "{{ _.DISCOVERY_CLIENT_SECRET }}", + "disabled": false + }, + "metaSortKey": -1683630901873, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_cb31a166ccd64ab5bf20099ebc205d93", + "parentId": "fld_02b6868263c048c8ac135574159fbb4d", + "modified": 1710076352238, + "created": 1680682418265, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "Register Job", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\",\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.batch:3.0.0#Batch\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"lookupBPNs\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'Business Partner Number', '', _.BPN, '', false, true %}\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418265, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_02b6868263c048c8ac135574159fbb4d", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1680682418273, + "created": 1680682418273, + "name": "IRS Basic API Calls", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418273, + "_type": "request_group" + }, + { + "_id": "req_dcb90264a2d54f9ab00bfb3f6282f287", + "parentId": "fld_02b6868263c048c8ac135574159fbb4d", + "modified": 1705942154792, + "created": 1680682418238, + "url": "{{IRS_HOST}}/irs/jobs/{% response 'body', 'req_b02ac0bfc4704c83a5c5f8b24175d61a', 'b64::JC5pZA==::46b', 'never', 60 %} ", + "name": "Get registered Job", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "returnUncompletedJob", + "value": "true", + "disabled": false + } + ], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418261, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_4584dacb86d84733a7a5db8a5c59c92d", + "parentId": "fld_02b6868263c048c8ac135574159fbb4d", + "modified": 1702991288793, + "created": 1680682418257, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "Search for all Jobs in JobStore", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418257, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_9d8c59f193db4066ab035ec6817343cc", + "parentId": "fld_02b6868263c048c8ac135574159fbb4d", + "modified": 1702991284435, + "created": 1680682418247, + "url": "{{IRS_HOST}}/irs/jobs", + "name": "Search for Jobs for given state", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "states", + "value": "ERROR", + "disabled": true, + "id": "pair_c694b66f41e649db837f801b5699859e" + }, + { + "name": "states", + "value": "CANCELED,COMPLETED", + "disabled": false, + "id": "pair_ab346623e5394504b7232cc40ae75bed" + }, + { + "id": "pair_ddbccd5219944e8cac3d99249ba881e5", + "name": "states", + "value": "RUNNING", + "description": "", + "disabled": true + } + ], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418247, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_42436010753b49d7b2bd3b6fba68aeb0", + "parentId": "fld_02b6868263c048c8ac135574159fbb4d", + "modified": 1703236659047, + "created": 1690384427379, + "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", + "name": "Get Job for jobId", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "returnUncompletedJob", + "value": "true", + "disabled": false + } + ], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418238, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_51bcc80f9f8441f891a7aecd43099ffd", + "parentId": "fld_02b6868263c048c8ac135574159fbb4d", + "modified": 1702991276045, + "created": 1680682418229, + "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", + "name": "Cancel Job for jobId", + "description": "", + "method": "PUT", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418229, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_58577c766064460daa0b53230ded33df", + "parentId": "fld_02b6868263c048c8ac135574159fbb4d", + "modified": 1702991272198, + "created": 1682498338739, + "url": "{{IRS_HOST}}/irs/aspectmodels", + "name": "Get all available Aspect Models", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418179, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_0443d99781bd42589da0f47adc43b647", + "parentId": "fld_1c510cd576c047e183e89c7247376950", + "modified": 1705942066941, + "created": 1680682418213, + "url": "{{ _.SEMANTIC_HUB_URL }}/hub/api/v1/models", + "name": "Get all models", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "pageSize", + "value": "100", + "disabled": false, + "id": "pair_96567b64925d4487bae4c74bfa9e021e" + }, + { + "id": "pair_2dae68db8a564296a5835e66d951331f", + "name": "status", + "value": "RELEASED", + "description": "" + } + ], + "headers": [], + "authentication": { + "type": "oauth2", + "grantType": "client_credentials", + "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", + "clientId": "{{ _.SEMANTIC_HUB_CLIENT_ID }}", + "clientSecret": "{{ _.SEMANTIC_HUB_CLIENT_SECRET }}" + }, + "metaSortKey": -1680682418213, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_1c510cd576c047e183e89c7247376950", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1680682418222, + "created": 1680682418222, + "name": "Semantics Hub", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418222, + "_type": "request_group" + }, + { + "_id": "req_982fbe03f688402eaa3a59864d57c0b9", + "parentId": "fld_1c510cd576c047e183e89c7247376950", + "modified": 1705942077015, + "created": 1680682418204, + "url": "{{ _.SEMANTIC_HUB_URL }}/hub/api/v1/models/urn%3Abamm%3Aio.catenax.serial_part_typization%3A1.0.0%23SerialPartTypization", + "name": "Get SerialPartTypization", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "oauth2", + "grantType": "client_credentials", + "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", + "clientId": "{{ _.SEMANTIC_HUB_CLIENT_ID }}", + "clientSecret": "{{ _.SEMANTIC_HUB_CLIENT_SECRET }}" + }, + "metaSortKey": -1680682418204, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_9e90c9c88cc64b129fd7bbd8dfada97f", + "parentId": "fld_1c510cd576c047e183e89c7247376950", + "modified": 1705942085733, + "created": 1680682418192, + "url": "{{ _.SEMANTIC_HUB_URL }}/hub/api/v1/models/urn%3Abamm%3Aio.catenax.serial_part_typization%3A1.0.0%23SerialPartTypization/json-schema", + "name": "Get SerialPartTypization Json Schema", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "oauth2", + "grantType": "client_credentials", + "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", + "clientId": "{{ _.SEMANTIC_HUB_CLIENT_ID }}", + "clientSecret": "{{ _.SEMANTIC_HUB_CLIENT_SECRET }}" + }, + "metaSortKey": -1680682418192, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_9b5eef1cbd554d529be04f572b8e0cd2", + "parentId": "fld_ff7ba332fb1a4cdfb1c06e621623fa18", + "modified": 1705942100313, + "created": 1680682418174, + "url": "{{ _.BPDM_URL }}/v1/api/catena/business-partner/{% prompt 'BPN', '', '', '', false, true %}", + "name": "Get business partner by id", + "description": "", + "method": "GET", + "body": {}, + "parameters": [ + { + "name": "idType", + "value": "BPN", + "disabled": false + } + ], + "headers": [], + "authentication": { + "type": "oauth2", + "grantType": "client_credentials", + "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", + "clientId": "{{ _.BPDM_CLIENT_ID }}", + "clientSecret": "{{ _.BPDM_CLIENT_SECRET }}" + }, + "metaSortKey": -1680682418174, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_ff7ba332fb1a4cdfb1c06e621623fa18", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1680682418184, + "created": 1680682418184, + "name": "Business partner data management", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418184, + "_type": "request_group" + }, + { + "_id": "req_7f85de9d20cf4ec29a00e45da4ef7476", + "parentId": "fld_fb01fe78b13140f0a6ced1d4e35a8a74", + "modified": 1702991347797, + "created": 1680682418157, + "url": "{{IRS_HOST}}/esr/esr-statistics/{% prompt 'globalAssetId', 'Provide global asset ID or use default', _.GLOBAL_ASSET_ID, '', false, true %}/{% prompt 'BOM Lifecycle', '', '', '', false, true %}/{% prompt 'Certificate', '', '', '', false, true %}/submodel", + "name": "Get Esr Statistics", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418158, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_fb01fe78b13140f0a6ced1d4e35a8a74", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1680682418167, + "created": 1680682418167, + "name": "ESR Spike", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418167, + "_type": "request_group" + }, + { + "_id": "req_edabe6732540481fa4388624c858d3c1", + "parentId": "fld_cdd3393410894a898d9e6a94ba0f562e", + "modified": 1702991361578, + "created": 1680682418143, + "url": "{{IRS_HOST}}/ess/bpn/investigations", + "name": "Register Job Investigation", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7\",\n\t\t\"bpn\": \"BPNL00000003CRHK\"\n\t},\n\t\"incidentBPNSs\": [\n\t\t\"BPNL00000003B6LU\"\n\t],\n\t\"bomLifecycle\": \"asPlanned\"\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418143, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_cdd3393410894a898d9e6a94ba0f562e", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1680682418151, + "created": 1680682418151, + "name": "ESS Spike", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418151, + "_type": "request_group" + }, + { + "_id": "req_7f672ad9256948198de016c9c9d68147", + "parentId": "fld_cdd3393410894a898d9e6a94ba0f562e", + "modified": 1705942138125, + "created": 1680682418134, + "url": "{{IRS_HOST}}/ess/bpn/investigations/{% response 'body', 'req_ec674952c1114bce8fb71ea1ed6d9ef7', 'b64::JC5pZA==::46b', 'never', 60 %}", + "name": "Get registered investigation", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418138.5, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_269a3f979e7e45718f632d302b621cd8", + "parentId": "fld_cdd3393410894a898d9e6a94ba0f562e", + "modified": 1702991370481, + "created": 1680682418134, + "url": "{{IRS_HOST}}/ess/bpn/investigations/{% prompt 'Job ID', '', '', '', false, true %}", + "name": "Search for investigation by jobId", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418134, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_f449a89c593f4c2f8718c066a48424e6", + "parentId": "fld_53c3f5206dad45fabe3a27e01245d9a2", + "modified": 1710076303275, + "created": 1680682418118, + "url": "{{IRS_HOST}}/irs/orders", + "name": "Register Batch Order", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"collectAspects\": true,\n\t\"lookupBPNs\": true,\n\t\"direction\": \"downward\",\n\t\"batchSize\": 10,\n\t\"batchStrategy\": \"PRESERVE_BATCH_JOB_ORDER\",\n\t\"keys\": [\n\t\t{\n\t\t\t\"globalAssetId\": \"urn:uuid:ed333e9a-5afa-40b2-99da-bae2fd211122\",\n\t\t\t\"bpn\": \"BPNL00000003AAXX\"\n\t\t},\n\t\t{\n\t\t\t\"globalAssetId\": \"urn:uuid:771d2ccc-a081-4d3a-bcb2-46c6a0a32211\",\n\t\t\t\"bpn\": \"BPNL00000003AAXX\"\n\t\t}\n\t]\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418118, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_53c3f5206dad45fabe3a27e01245d9a2", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1680682418128, + "created": 1680682418128, + "name": "Batch Processing", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418128, + "_type": "request_group" + }, + { + "_id": "req_8c2b07404f0443deac9794df5f6b8351", + "parentId": "fld_53c3f5206dad45fabe3a27e01245d9a2", + "modified": 1702991390349, + "created": 1696342619602, + "url": "{{IRS_HOST}}/irs/ess/orders", + "name": "Register ESS Batch Order", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"batchSize\": 10,\n\t\"batchStrategy\": \"PRESERVE_BATCH_JOB_ORDER\",\n\t\"incidentBPNSs\": [\"BPNL00000003B6LU\"],\n\t\"keys\": [\n\t\t{\n\t\t\t\"globalAssetId\": \"urn:uuid:ed333e9a-5afa-40b2-99da-bae2fd211122\",\n\t\t\t\"bpn\": \"BPNL00000003AAXX\"\n\t\t},\n\t\t{\n\t\t\t\"globalAssetId\": \"urn:uuid:771d2ccc-a081-4d3a-bcb2-46c6a0a32211\",\n\t\t\t\"bpn\": \"BPNL00000003AAXX\"\n\t\t}\n\t]\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418113.5, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_8a9bb9cec5094d85beec4418eb22caeb", + "parentId": "fld_53c3f5206dad45fabe3a27e01245d9a2", + "modified": 1705006936944, + "created": 1705006139836, + "url": "{{IRS_HOST}}/irs/orders/{% prompt 'Order ID', '', '', '', false, true %}", + "name": "Cancel order job for given orderId", + "description": "", + "method": "PUT", + "body": { + "mimeType": "application/json", + "text": "{}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json", + "id": "pair_88db8badf4ea4a0d9968c769167407c8" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418111.25, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_5716aae510fb40a3a2f83223cd358619", + "parentId": "fld_53c3f5206dad45fabe3a27e01245d9a2", + "modified": 1702991398473, + "created": 1680682418109, + "url": "{{IRS_HOST}}/irs/orders/{% prompt 'Order ID', '', '', '', false, true %}", + "name": "Search for given orderId", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418109, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_2a685edc7b7e4d5f9f6375ee30379a9f", + "parentId": "fld_53c3f5206dad45fabe3a27e01245d9a2", + "modified": 1702991409664, + "created": 1680682418099, + "url": "{{IRS_HOST}}/irs/orders/{% prompt 'Order ID', '', '', '', false, true %}/batches/{% prompt 'Batch ID', '', '', '', false, true %}", + "name": "Search for given orderId and batchId", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-API-KEY", + "value": "{{ _.REGULAR_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1680682418099, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_5e843735001340b8bf5baa8caf297438", + "parentId": "fld_3c583f5a50a9410d8f6f96ca51eea3c0", + "modified": 1690472186478, + "created": 1678358655308, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/catalog/request", + "name": "Get catalog", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t},\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:providerUrl\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\"\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1686195722939.1875, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_3c583f5a50a9410d8f6f96ca51eea3c0", + "parentId": "fld_480bc634dc164f10969a0e0610b09446", + "modified": 1690362660167, + "created": 1690362660167, + "name": "Catalog", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1690362660167, + "_type": "request_group" + }, + { + "_id": "fld_480bc634dc164f10969a0e0610b09446", + "parentId": "fld_9e206e8fd3ae41ae92bea5e9436d626b", + "modified": 1690363778601, + "created": 1675675609576, + "name": "EDC-Requests", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1680682418078, + "_type": "request_group" + }, + { + "_id": "req_a10b377a98bb4c23b58eef57897e69c8", + "parentId": "fld_3c583f5a50a9410d8f6f96ca51eea3c0", + "modified": 1691500654267, + "created": 1685521485278, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/catalog/request", + "name": "Get catalog with registry filter", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t},\n\t\"edc:providerUrl\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\",\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:querySpec\": {\n\t\t\"edc:filterExpression\": {\n\t\t\t\"edc:operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/type\",\n\t\t\t\"edc:operator\": \"=\",\n\t\t\t\"edc:operandRight\": \"data.core.digitalTwinRegistry\"\n\t\t}\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1686195722889.1875, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_06d2a55e47414327b9cff7bf9c366d10", + "parentId": "fld_3c583f5a50a9410d8f6f96ca51eea3c0", + "modified": 1705940987109, + "created": 1691654388376, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/catalog/request", + "name": "Get catalog with asset filter", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t},\n\t\"edc:providerUrl\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\",\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:querySpec\": {\n\t\t\"edc:filterExpression\": {\n\t\t\t\"edc:operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/id\",\n\t\t\t\"edc:operator\": \"=\",\n\t\t\t\"edc:operandRight\": \"{% prompt 'assetId', '', '', '', false, true %}\"\n\t\t}\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1686195722789.1875, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_94c1a50d71fb44c9b4e6b5364bfd9291", + "parentId": "fld_33e5f085b9464adfaa9dfc54f917c0a3", + "modified": 1691578280640, + "created": 1675675609557, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/contractnegotiations", + "name": "Start contract negotiation", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"edc:connectorAddress\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\",\n\t\"edc:connectorId\": \"BPNL00000001CRHK\",\n\t\"edc:offer\": {\n\t\t\"@type\": \"edc:ContractOfferDescription\",\n\t\t\"edc:offerId\": \"ZGR0ci1jeG1lbWJlcnMtY29udHJhY3Q=:ZGlnaXRhbC10d2luLXJlZ2lzdHJ5:OGQ0ZTNkODYtOTIxOC00MjljLWI1N2EtNWZlZTZkODIzMmEx\",\n\t\t\"edc:assetId\": \"digital-twin-registry\",\n\t\t\"edc:policy\": {\n\t\t\t\"@type\": \"odrl:Set\",\n\t\t\t\"odrl:permission\": {\n\t\t\t\t\"odrl:target\": \"digital-twin-registry\",\n\t\t\t\t\"odrl:action\": {\n\t\t\t\t\t\"odrl:type\": \"USE\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"odrl:prohibition\": [],\n\t\t\t\"odrl:obligation\": [],\n\t\t\t\"odrl:target\": \"digital-twin-registry\"\n\t\t}\n\t},\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:callbackAddresses\": [],\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1684146511095, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_33e5f085b9464adfaa9dfc54f917c0a3", + "parentId": "fld_480bc634dc164f10969a0e0610b09446", + "modified": 1684146626847, + "created": 1684146519491, + "name": "Negotiation", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1679911060327.75, + "_type": "request_group" + }, + { + "_id": "req_cca5eeb9c9e04258a5052704f68fb53b", + "parentId": "fld_33e5f085b9464adfaa9dfc54f917c0a3", + "modified": 1690362123962, + "created": 1675675609549, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/contractnegotiations/{% prompt 'id', '', '', '', false, true %}", + "name": "Get contract negotiation", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1684146511045, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_6ebf18b651e54a80b06077dd8f477a4c", + "parentId": "fld_33e5f085b9464adfaa9dfc54f917c0a3", + "modified": 1690362117725, + "created": 1685444139708, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/contractnegotiations/{% prompt 'id', '', '', '', false, true %}/cancel", + "name": "Cancel contract negotation", + "description": "", + "method": "POST", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1684146511020, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_97c60db796524e13a60d7396045f48b1", + "parentId": "fld_33e5f085b9464adfaa9dfc54f917c0a3", + "modified": 1690361721223, + "created": 1681911985730, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/contractnegotiations/request", + "name": "Get contract negotiations", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1684146510995, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_ceafbae9dd434a9e87ad3a1b94c6895a", + "parentId": "fld_33e5f085b9464adfaa9dfc54f917c0a3", + "modified": 1691578311420, + "created": 1675675609541, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/transferprocesses", + "name": "Start transferprocess", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"edc:assetId\": \"digital-twin-registry\",\n\t\"edc:connectorAddress\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\",\n\t\"edc:contractId\": \"ZGR0ci1jeG1lbWJlcnMtY29udHJhY3Q=:ZGlnaXRhbC10d2luLXJlZ2lzdHJ5:NGNlMDk0ODgtOTMzYy00ZDk3LThiNTAtNDMyZWRjMzIwM2Fm\",\n\t\"edc:dataDestination\": {\n\t\t\"edc:type\": \"HttpProxy\"\n\t},\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:managedResources\": false,\n\t\"edc:connectorId\": \"BPNL00000001CRHK\",\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1684146510945, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_725be1435d9a4a81acff7851fa7c292e", + "parentId": "fld_33e5f085b9464adfaa9dfc54f917c0a3", + "modified": 1691503370103, + "created": 1679993996270, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/transferprocesses/{% prompt 'id', '', '', '', false, true %}", + "name": "Get transferprocess by id", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1684146510895, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_9bf082344f1f4c9da9e9ae7d970fae6d", + "parentId": "fld_33e5f085b9464adfaa9dfc54f917c0a3", + "modified": 1690361795179, + "created": 1675675609525, + "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/transferprocesses/request", + "name": "Get transferprocesses", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1684146510845, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_f22279e6764548bbb72961d3f036d069", + "parentId": "fld_33e5f085b9464adfaa9dfc54f917c0a3", + "modified": 1690361763512, + "created": 1681910653593, + "url": "{{CONSUMER_CONTROLPLANE}}/management/v2/contractagreements/request", + "name": "Get contract agreements", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1684146510795, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_29134bc0c5924329812e12a1bd1851e7", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690362947546, + "created": 1681907482278, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/assets", + "name": "Create Asset", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"@context\": {},\n\t\"asset\": {\n\t\t\"@id\": \"asset-id\",\n\t\t\"properties\": {\n\t\t\t\"description\": \"IRS EDC Demo Asset\"\n\t\t}\n\t},\n\t\"dataAddress\": {\n\t\t\"@type\": \"DataAddress\",\n\t\t\"type\": \"HttpData\",\n\t\t\"baseUrl\": \"http://backend-url/data/asset-id\",\n\t\t\"contentType\": \"application-json\",\n\t\t\"proxyPath\": \"false\",\n\t\t\"proxyBody\": \"false\",\n\t\t\"proxyMethod\": \"false\",\n\t\t\"proxyQueryParams\": \"false\"\n\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033461.75, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "parentId": "fld_480bc634dc164f10969a0e0610b09446", + "modified": 1705940929752, + "created": 1684146457388, + "name": "Provider", + "description": "", + "environment": {}, + "environmentPropertyOrder": null, + "metaSortKey": -1678852197613.5625, + "_type": "request_group" + }, + { + "_id": "req_8ced6c1761be4c60b36a9f6b3e5394b8", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690362407763, + "created": 1685444139630, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/assets/{% prompt 'id', '', '', '', false, true %}", + "name": "Get Asset by ID", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033452.375, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_6effcc7552d74be2a2ed322443176d57", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690362438115, + "created": 1685444139625, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/assets/request", + "name": "Get all Assets", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033447.6875, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_fcee54d2cded47d4859ed8f3e1bed573", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690362400081, + "created": 1685444139636, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/assets/{% prompt 'id', '', '', '', false, true %}", + "name": "Delete Asset", + "description": "", + "method": "DELETE", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033433.625, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_916d09dca1c94d64b79261d7cb19a76b", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690362581978, + "created": 1685444139641, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/policydefinitions", + "name": "Create Policy", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n\t\"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumber\": \"BPNL00000000BJTL\",\n\t\"payload\": {\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"policy-id12\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033403.9375, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_476634e2ecb6474ea50d6244963e4504", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690362549290, + "created": 1685444139647, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/policydefinitions/{% prompt 'id', '', '', '', false, true %}", + "name": "Get Policy by ID", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033364.0938, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_55df3c43719445d4862e8854da509e3d", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690362591799, + "created": 1685444139653, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/policydefinitions/request", + "name": "Get all Policies", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033344.1719, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_d7d1ac6276fd4b74a8b6b965051e2a44", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690362559324, + "created": 1685444139659, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/policydefinitions/{% prompt 'id', '', '', '', false, true %}", + "name": "Delte Policy by ID", + "description": "", + "method": "DELETE", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033299.25, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_0d05f6bdbd2d4050ae6c7b09b837fd80", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690363080444, + "created": 1685444139665, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/contractdefinitions", + "name": "Create Contract Definitinion", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "{\n \"@context\": {\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\n },\n \"@type\": \"ContractDefinition\",\n \"accessPolicyId\": \"policy-id\",\n \"contractPolicyId\": \"policy-id\",\n \"assetsSelector\": {\n \"operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/id\",\n \"operator\": \"=\",\n \"operandRight\": \"asset-id\"\n }\n}" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033261.75, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_19c9156fc063408bba57c8f6ed5fd217", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690362691392, + "created": 1685444139672, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/contractdefinitions/{% prompt 'id', '', '', '', false, true %}", + "name": "Get Contract Definition by ID", + "description": "", + "method": "GET", + "body": {}, + "parameters": [], + "headers": [], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033199.25, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_4f56442d3d614af3ba7c668ab9da99c4", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690363126919, + "created": 1685444139678, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/contractdefinitions/request", + "name": "Get all Contract Definitinions", + "description": "", + "method": "POST", + "body": { + "mimeType": "application/json", + "text": "" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033174.25, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "req_14caa7ed15cc427dbf1b01d2aa96860a", + "parentId": "fld_8aa6ae77b4b34814b4d56fb58d99452c", + "modified": 1690363136216, + "created": 1685444139684, + "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/contractdefinitions/{% prompt 'id', '', '', '', false, true %}", + "name": "Delte Contract Definition", + "description": "", + "method": "DELETE", + "body": { + "mimeType": "application/json", + "text": "" + }, + "parameters": [], + "headers": [ + { + "name": "Content-Type", + "value": "application/json" + } + ], + "authentication": { + "type": "apikey", + "disabled": false, + "key": "X-Api-Key", + "value": "{{ _.EDC_API_KEY }}", + "addTo": "header" + }, + "metaSortKey": -1679911033149.25, + "isPrivate": false, + "pathParameters": [], + "settingStoreCookies": true, + "settingSendCookies": true, + "settingDisableRenderRequestBody": false, + "settingEncodeUrl": true, + "settingRebuildPath": true, + "settingFollowRedirects": "global", + "_type": "request" + }, + { + "_id": "env_cd08041ce8f97848d5dcccbfd57dd79d914d5272", + "parentId": "wrk_53254e8de24e4d6e8325f803463490e8", + "modified": 1701227605781, + "created": 1701227455152, + "name": "Base Environment", + "data": {}, + "dataPropertyOrder": {}, + "color": null, + "isPrivate": false, + "metaSortKey": 1701227455152, + "_type": "environment" + }, + { + "_id": "jar_cd08041ce8f97848d5dcccbfd57dd79d914d5272", + "parentId": "wrk_53254e8de24e4d6e8325f803463490e8", + "modified": 1701424442877, + "created": 1701227455156, + "name": "Default Jar", + "cookies": [ + { + "key": "KC_RESTART", + "expires": "1970-01-01T00:00:10.000Z", + "maxAge": 0, + "domain": "centralidp.int.demo.catena-x.net", + "path": "/auth/realms/CX-Central/", + "httpOnly": true, + "extensions": [ + "Version=1" ], - "headers": [], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.ADMIN_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1703116992024, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - } - , - { - "_id": "fld_7b07eaf7d8124d3385d12ef2dfd8c5f1", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1687243055015, - "created": 1687243055015, - "name": "Policy Store", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1687243055015, - "_type": "request_group" - }, - { - "_id": "fld_d5990860fbf2447ea5458e20134a1479", - "parentId": "wrk_565df8abe30f4da29d8bffcde97927d7", - "modified": 1691572726194, - "created": 1680682418636, - "name": "IRS DEMO Collection", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418636, - "_type": "request_group" - }, - { - "_id": "wrk_565df8abe30f4da29d8bffcde97927d7", - "parentId": null, - "modified": 1680682438221, - "created": 1680682419747, - "name": "IRS", - "description": "", - "scope": "collection", - "_type": "workspace" - }, - { - "_id": "req_362e65d57ebd44abbd763389316bd595", - "parentId": "fld_7b07eaf7d8124d3385d12ef2dfd8c5f1", - "modified": 1702990529632, - "created": 1687243204155, - "url": "{{IRS_HOST}}/irs/policies/{% prompt 'policyId', '', 'traceability-test', '', false, true %}", - "name": "Delete policy", - "description": "", - "method": "DELETE", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.ADMIN_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1685602897140.75, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_cbd1ae216b704ca9b1bd19a373f15e8b", - "parentId": "fld_7b07eaf7d8124d3385d12ef2dfd8c5f1", - "modified": 1711099840007, - "created": 1693576003390, - "url": "{{IRS_HOST}}/irs/policies", - "name": "Update policies", - "description": "", - "method": "PUT", - "body": { - "mimeType": "application/json", - "text": "{\n \"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumbers\": [\n\t\t\"BPNL00000001CRHK\"\n\t],\n\t\"policyIds\": [\n\t\t\"policyId\"\n\t]\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.ADMIN_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1684874704117.875, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_95aa08cefddc4743afc85fcabf40e4ee", - "parentId": "fld_c751e5e73d5248a3ae22a44bafae7906", - "modified": 1711573295984, - "created": 1687243182397, - "url": "{{IRS_HOST}}/irs/policies", - "name": "Register policy", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumber\": \"x\",\n\t\"payload\":\n\t\t{\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"mf-policy-4\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.ADMIN_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1683962737633.5, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_baa19798f4c1492583e75c56e1580fbd", - "parentId": "fld_399334c817994e2189624ff7b3431877", - "modified": 1706003275081, - "created": 1680682418619, - "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/shell-descriptors/{% prompt 'aasIdentifier', '', _.GLOBAL_ASSET_ID, '', false, true %}", - "name": "Get Shell by aasIdentifier", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_7877c58fd3ae46758cabf9f6cb397818", - "name": "Edc-Bpn", - "value": "BPNL00000001CRHK", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1680682418619, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_399334c817994e2189624ff7b3431877", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1691504187689, - "created": 1680682418630, - "name": "Digital Twin Registry", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418630, - "_type": "request_group" - }, - { - "_id": "req_f6c0d00f22fe4bd8bedd9baa0b9fcb8e", - "parentId": "fld_399334c817994e2189624ff7b3431877", - "modified": 1706002920212, - "created": 1690529035794, - "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/shell-descriptors", - "name": "Get Shells", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_7877c58fd3ae46758cabf9f6cb397818", - "name": "Edc-Bpn", - "value": "BPNL00000001CRHK", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1680682418614, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_c223e093de1b4ecfaee2a0fac88f6f76", - "parentId": "fld_399334c817994e2189624ff7b3431877", - "modified": 1706003278149, - "created": 1680682418609, - "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells", - "name": "Query Registry By BPN", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "assetIds", - "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003AYRE\"}],", - "disabled": true, - "id": "pair_c8a20aa6fd7647a98da9b91abfe0cfa8" - }, - { - "name": "assetIds", - "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003AVTH\"}],", - "disabled": true, - "id": "pair_cc48c08e3b834497a2d88bd4201c3867" - }, - { - "name": "assetIds", - "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003AZQP\"}]", - "disabled": false, - "id": "pair_4187c8b0b8894410a17eb0ff2cf1523a" - }, - { - "name": "assetIds", - "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003B2OM\"}],", - "disabled": true, - "id": "pair_706e6930cc874343941b744a054ef388" - }, - { - "name": "assetIds", - "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003B3NX\"}],", - "disabled": true, - "id": "pair_45c6bcf3266a475891ebbbba6cde0798" - }, - { - "name": "assetIds", - "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003B5MJ\"}],", - "disabled": true, - "id": "pair_89445c9795e54bbfa1e26dae0fe4756a" - }, - { - "name": "assetIds", - "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003B0Q0\"}],", - "disabled": true, - "id": "pair_d72f55c7bf714c7c9aae58456c778443" - }, - { - "name": "assetIds", - "value": "[{\"name\": \"manufacturerId\",\"value\":\"BPNL00000003AXS3\"}],", - "disabled": true, - "id": "pair_406c9da4dc014fb297f70bb3da7128c1" - } - ], - "headers": [ - { - "id": "pair_72e0b43ab2ba4417bbc72bf08182edd0", - "name": "Edc-Bpn", - "value": "BPNL00000001CRHK", - "description": "" - } - ], - "authentication": {}, - "metaSortKey": -1680682418609, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_bfcd07c68515497285b3bf626780d908", - "parentId": "fld_399334c817994e2189624ff7b3431877", - "modified": 1706003280850, - "created": 1680682418595, - "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells", - "name": "Query Registry By VAN", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "assetIds", - "value": "[{\"name\":\"van\",\"value\": \"OMBSWNHVABEWMQTAV\"}]", - "disabled": false, - "id": "pair_50d86e928e9f448d97da8ada0390e12f" - } - ], - "headers": [ - { - "id": "pair_ed11c2a6df9248e292914df944e8ba93", - "name": "Edc-Bpn", - "value": "BPNL00000001CRHK", - "description": "" - } - ], - "authentication": {}, - "metaSortKey": -1680682418595, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_601086420b144c3889a2c102ca323032", - "parentId": "fld_399334c817994e2189624ff7b3431877", - "modified": 1706003354109, - "created": 1680682418581, - "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells", - "name": "Query Registry By globalAssetId", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "assetIds", - "value": "[{\"name\":\"globalAssetId\",\"value\":\"{% prompt 'id', '', '', '', false, true %}\"}]", - "disabled": false, - "id": "pair_f5f3d12fb2224c1d9e577c42128aa3d9" - } - ], - "headers": [ - { - "id": "pair_71ae5e562e9c414a82e84220f3c00343", - "name": "Edc-Bpn", - "value": "BPNL00000001CRHK", - "description": "" - } - ], - "authentication": {}, - "metaSortKey": -1680682418581, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_38005604efd443a98525d9fd78eb7b21", - "parentId": "fld_399334c817994e2189624ff7b3431877", - "modified": 1706003284715, - "created": 1680682418570, - "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells/query", - "name": "Query Registry By VAN", - "description": "", - "method": "POST", - "body": { - "mimeType": "", - "text": "{\n \"query\": {\n \"assetIds\": [\n {\n \"value\" : \"OMCOFCRMXMBASAFZY\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMCNAXRMATEMEDENV\",\n \"name\" : \"van\"\n }\n ,\n {\n \"value\" : \"OMCODXGPGLPLKEAIQ\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMBGHXHATHICIEYOU\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMAGCJCBDQGPYRQCS\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMBIBCLBMGCJNUKUW\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMCRHSMILXFLDSPTT\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMCLNVPYKUQCNIBOW\",\n \"name\" : \"van\"\n },\n {\n \"value\" : \"OMCXYXGFMJIBYQLBL\",\n \"name\" : \"van\"\n }\n ]\n }\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_2f4c445074514f92a4dee92554053d0a" - }, - { - "id": "pair_35fe7a71647f4aea91ba03bfc87f0cd0", - "name": "Edc-Bpn", - "value": "BPNL00000001CRHK", - "description": "" - } - ], - "authentication": {}, - "metaSortKey": -1680682418570, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_447ae23a0b274b8aa03dc6d30d2a5424", - "parentId": "fld_399334c817994e2189624ff7b3431877", - "modified": 1706003286642, - "created": 1691408320970, - "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/lookup/shells/query", - "name": "Query Registry By globalAssetId", - "description": "", - "method": "POST", - "body": { - "mimeType": "", - "text": "{\n\t\"query\": {\n\t\t\"assetIds\": [\n\t\t\t{\n\t\t\t\t\"value\": \"urn:uuid:da53d429-5770-410e-a13e-424e77952d8a\",\n\t\t\t\t\"name\": \"globalAssetId\"\n\t\t\t}\n\t\t]\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_c1f8de03ff8f4f92aeeeef63510f755e" - }, - { - "id": "pair_5dc1d703196747318faff9a8dd96be0c", - "name": "Edc-Bpn", - "value": "BPNL00000001CRHK", - "description": "" - } - ], - "authentication": {}, - "metaSortKey": -1680682418560.5, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_9d6b2234852a47a3935db24ca44034d8", - "parentId": "fld_399334c817994e2189624ff7b3431877", - "modified": 1706003289343, - "created": 1689167429413, - "url": "{{DIGITAL_TWIN_REGISTRY}}/api/v3.0/shell-descriptors/{% prompt 'id', '', '', '', false, true %}", - "name": "Delete Shell by aasIdentifier", - "description": "", - "method": "DELETE", - "body": {}, - "parameters": [ - { - "id": "pair_6266690c04fd466fa1617082f5b8ec76", - "name": "pageSize", - "value": "50", - "description": "", - "disabled": true - } - ], - "headers": [ - { - "id": "pair_7877c58fd3ae46758cabf9f6cb397818", - "name": "Edc-Bpn", - "value": "BPNL00000001CRHK", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1680682418470, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_2251872027064b61b357c75f64d0c57b", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991054859, - "created": 1680682418551, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.0.0 [Register Job]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418551, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_a3ad61910c48475e8359adbb967b744e", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1680682418562, - "created": 1680682418562, - "name": "IRS Test Collection", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418562, - "_type": "request_group" - }, - { - "_id": "req_9227c04bec9241d3a324914f94a361e6", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991058493, - "created": 1680682418539, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.1.0 [Register Job globalAssetId ]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:00000000-0000-0000-0000-000000000000\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418539, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_46b2274eef02402aaf0c9a6c11d261c8", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991063641, - "created": 1680682418524, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.1.1 [Register Job globalAssetId ]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:6c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b918ea936c311d29-5753-46d4-b32c-19b\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418524, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_8b9cc8edfec14f92a94386c11fc4ec10", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991067797, - "created": 1680682418514, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.2.0 [Register Job with depth and bomLifecycle asBuilt]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"depth\": 2,\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418514, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_fd649852aee8412496d292c376a9cc0f", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991071709, - "created": 1680682418504, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.2.1 [Register Job with depth and bomLifecycle asPlanned]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"bomLifecycle\": \"asPlanned\",\n\t\"depth\": 2\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418504, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_c8f2d6cbef4443e08e02aefbc34d3f6d", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991076696, - "created": 1695042901876, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.2.2 [Register Job with depth and bomLifecycle asSpecified]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"bomLifecycle\": \"asSpecified\",\n\t\"depth\": 2\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418496, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_ae6b02b0d78341949a208629e4af18a4", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076144872, - "created": 1680682418488, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.3.0 [Register Job with aspect SerialPart]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418488, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_f6789fe83c084260811a9ae0822f9d7b", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076455844, - "created": 1680682418479, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.3.1 [Register Job with aspect SerialPart and SingleLevelBomAsBuilt]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418479, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_666d98e3c1264a5791be8687ed3c2d65", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1712222178406, - "created": 1680682418469, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.3.2 [Register Job with aspect MaterialForRecycling and BatteryPass]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.battery.battery_pass:3.0.1#BatteryPass\",\n\t\t\"urn:samm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418469, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_204f07b952914f9ebf1e5fc161fb32c1", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076741632, - "created": 1680682418442, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.3.3 [Register Job with aspect PartAsPlanned]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"bomLifecycle\": \"asPlanned\",\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418442, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_9086d9055fd843d3a2be98f06a42a9ee", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076751758, - "created": 1680682418432, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.3.4 [Register Job with upward direction]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:3402b29d-07a6-42ad-80ff-272b50fbe24a\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t},\n\t\"direction\": \"upward\"\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418432, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_bf93a6e78af645df8484ac723f41ecae", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1712222124387, - "created": 1695192937155, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.3.5 [Register Job with aspect JustInSequencePart]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.just_in_sequence_part:3.0.0#JustInSequencePart\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418428, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_b44deeb9e5dc499da92d37150a915739", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1712222106070, - "created": 1695192971825, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.3.6 [Register Job with aspect TractionBatteryCode]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418426, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_e42c551ee48e4181886d6934a5e26de1", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076214310, - "created": 1680682418424, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.4.0 [Register Job with invalid or not exisiting aspect type]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:bamm:io.catenax.part_serial_typization:1.0.1#PartSerialTypization\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418424, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_57e97fb6ec854c54a4f1acef82aa53e3", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991130711, - "created": 1680682418414, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.4.1 [Register Job with invalid or not exisiting aspect type]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418414, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_e0c5b388d9384bd68844477b78d2073c", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076937249, - "created": 1680682418401, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.5.0 [Register Job with all aspect type]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\",\n\t\t\"urn:samm:io.catenax.batch:3.0.0#Batch\",\n\t\t\"urn:bamm:io.catenax.battery.product_description:1.0.1#ProductDescription\",\n\t\t\"urn:bamm:io.catenax.market_place_offer:1.4.0#MarketPlaceOffer\",\n\t\t\"urn:bamm:io.catenax.material_for_recycling:1.1.0#MaterialForRecycling\",\n\t\t\"urn:bamm:io.catenax.physical_dimension:1.0.0#PhysicalDimension\",\n\t\t\"urn:bamm:io.catenax.return_request:1.0.1#ReturnRequest\",\n\t\t\"urn:bamm:io.catenax.traction_battery_code:1.0.0#TractionBatteryCode\",\n\t\t\"urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418401, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_1454ecaa280e41c19cf9a783f266cf28", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076677384, - "created": 1680682418392, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.6.0 [Register Job with BPN lookup]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.batch:3.0.0#Batch\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"lookupBPNs\": false\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418392, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_b38ed15c25444cc9b3b4945ef37bf759", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076237949, - "created": 1683184048412, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.7.0 [Register Job with invalid policy]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\"\n\t],\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:da53d429-5770-410e-a13e-424e77952d8a\",\n\t\t\"bpn\": \"{% prompt 'bpn', '', _.BPN, '', false, true %}\"\n\t},\n\t\"collectAspects\": true,\n\t\"lookupBPNs\": false\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418386.5, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_64aa3921e4d9417a8bda809395fedfd0", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076397373, - "created": 1693493383337, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.8.0 [Register Job with data integrity success]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n \"integrityCheck\": true,\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:a1fa0f85-697d-4c9d-982f-2501af8e8636\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418382.375, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_0d14d7d30aeb47ce96a378a108c29a24", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076245754, - "created": 1693493584873, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.8.1 [Register Job with data integrity wrong hash]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n \"integrityCheck\": true,\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:05abf6ff-8c78-4b72-948b-40e08e9b83f3\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418381.6875, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_a0fff747c70a4e7cb804ab04a27ba558", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076391502, - "created": 1693493594373, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.8.2 [Register Job with data integrity wrong signature]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n \"integrityCheck\": true,\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:17e11d67-0315-4504-82cd-8e70a8c33a6a\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418381.3438, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_5058f9f4db8b4fb296ac2151fe2970f6", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1710076385497, - "created": 1693493604521, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "1.8.3 [Register Job with data integrity integrity aspect missing]", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n \"integrityCheck\": true,\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:5672e8ff-8a73-425e-b2a5-5561b5b21d7a\",\n\t\t\"bpn\": \"BPNL00000003AZQP\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418381.1719, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_fcde9edb3d4e4a84a92dc35de39b7db6", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991173689, - "created": 1680682418381, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "2.0.0 [Search for completed Jobs]", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "states", - "value": "COMPLETED", - "disabled": false - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418381, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_d10135309f1440f386e48c4b7a927cdd", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991177973, - "created": 1680682418372, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "2.0.1 [Search for Jobs in error state]", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "states", - "value": "ERROR", - "disabled": false - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418372, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_0467f5042d984b59a82697c255e4ce44", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991182139, - "created": 1680682418358, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "2.0.2 [Search for Jobs in initial state]", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "states", - "value": "INITIAL", - "disabled": false - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418358, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_04d347707fd44505a301f848fb4600d7", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991186114, - "created": 1680682418348, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "2.0.3 [Search for all Jobs in JobStore]", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418348, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_9b4c3432d85c4c1a8e9294855f985079", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991190326, - "created": 1680682418339, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "2.1.0 [Search for running Jobs]", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "states", - "value": "RUNNING", - "disabled": false - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418339, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_e1ef23e1ac694b9391c9122b6467e6d7", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991196283, - "created": 1680682418325, - "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", - "name": "3.0.0 [Search for given jobId with uncomplete]", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "returnUncompletedJob", - "value": "true", - "disabled": false - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418325, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_49e81c6751334d65a09800b6c10a9f0b", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991200399, - "created": 1680682418316, - "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", - "name": "3.1.0 [Search for given jobId]", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418316, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_95a1fbb7f2794f45b474453b821747e2", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991205447, - "created": 1680682418307, - "url": "{{IRS_HOST}}/irs/jobs/test", - "name": "3.1.1 [Search for invalid jobId]", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418307, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_820a52e3034b47ce826340abda18a209", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991214202, - "created": 1680682418297, - "url": "{{IRS_HOST}}/irs/jobs/00000000-0000-0000-0000-000000000000", - "name": "3.1.2 [Search for unknown jobId]", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418297, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_870747b6397a47d8a6d1874003e0c440", - "parentId": "fld_a3ad61910c48475e8359adbb967b744e", - "modified": 1702991218362, - "created": 1680682418280, - "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", - "name": "6.0.0 [Cancel Job for given jobId]", - "description": "", - "method": "PUT", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418280, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_2389daf68dbb4aa9a21eecf655e1aa03", - "parentId": "fld_744d44cfb4ba47a4ae85fa2c6c06e391", - "modified": 1705942015684, - "created": 1682672699249, - "url": "{{ _.BPN_DISCOVERY }}/api/administration/connectors/bpnDiscovery/search", - "name": "Find BPN endpoints for manufacturer numbers", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n \"searchFilter\": [\n {\n \"type\": \"oen\",\n \"keys\": [\n \"oen-1243\",\n \"oen-11\"\n ]\n },\n {\n \"type\": \"bpid\",\n \"keys\": [\n \"bpid-1243\",\n \"bpid-11\"\n ]\n }\n ]\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "oauth2", - "grantType": "client_credentials", - "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", - "clientId": "{{ _.DISCOVERY_CLIENT_ID }}", - "clientSecret": "{{ _.DISCOVERY_CLIENT_SECRET }}", - "disabled": false - }, - "metaSortKey": -1683630902023, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_744d44cfb4ba47a4ae85fa2c6c06e391", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1683630931664, - "created": 1683630887514, - "name": "Discovery", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418417.5, - "_type": "request_group" - }, - { - "_id": "req_4427567cd7034c76983b1d88aa714a49", - "parentId": "fld_744d44cfb4ba47a4ae85fa2c6c06e391", - "modified": 1705942027574, - "created": 1683031718699, - "url": "{{ _.DISCOVERY_FINDER }}/api/administration/connectors/discovery/search", - "name": "Find BPN Discovery Endpoints of type BPN", - "description": "", - "method": "POST", - "body": { - "mimeType": "", - "text": "{\n \"types\": [\n \"bpn\"\n ]\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "oauth2", - "grantType": "client_credentials", - "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", - "clientId": "{{ _.DISCOVERY_CLIENT_ID }}", - "clientSecret": "{{ _.DISCOVERY_CLIENT_SECRET }}", - "disabled": false - }, - "metaSortKey": -1683630901923, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_de39da8661a34613b763fbe47168bddd", - "parentId": "fld_744d44cfb4ba47a4ae85fa2c6c06e391", - "modified": 1705942036978, - "created": 1683560906453, - "url": "{{ _.EDC_DISCOVERY }}/api/administration/connectors/discovery", - "name": "Find EDC endpoints for BPNs", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "[\n\t\"BPNL00000001CRHK\"\n]" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "oauth2", - "grantType": "client_credentials", - "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", - "clientId": "{{ _.DISCOVERY_CLIENT_ID }}", - "clientSecret": "{{ _.DISCOVERY_CLIENT_SECRET }}", - "disabled": false - }, - "metaSortKey": -1683630901873, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_41cb9f12f54e4fd9aacf948a323e2c05", - "parentId": "fld_405308b190c64bb29cb03c2f3a180b68", - "modified": 1710076352238, - "created": 1680682418265, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "Register Job", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\",\n\t\t\"urn:samm:io.catenax.serial_part:3.0.0#SerialPart\",\n\t\t\"urn:samm:io.catenax.batch:3.0.0#Batch\"\n\t],\n\t\"bomLifecycle\": \"asBuilt\",\n\t\"collectAspects\": true,\n\t\"lookupBPNs\": true,\n\t\"direction\": \"downward\",\n\t\"depth\": 10,\n\t\"key\": {\n\t\t\"globalAssetId\": \"{% prompt 'Global Asset ID', 'Please provide \\'Global-Asset-ID\\' or use default', _.GLOBAL_ASSET_ID, '', false, true %}\",\n\t\t\"bpn\": \"{% prompt 'Business Partner Number', '', _.BPN, '', false, true %}\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418265, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_405308b190c64bb29cb03c2f3a180b68", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1680682418273, - "created": 1680682418273, - "name": "IRS Basic API Calls", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418273, - "_type": "request_group" - }, - { - "_id": "req_a71ca537c9544ab1a5a791cafd39f826", - "parentId": "fld_405308b190c64bb29cb03c2f3a180b68", - "modified": 1705942154792, - "created": 1680682418238, - "url": "{{IRS_HOST}}/irs/jobs/{% response 'body', 'req_b02ac0bfc4704c83a5c5f8b24175d61a', 'b64::JC5pZA==::46b', 'never', 60 %} ", - "name": "Get registered Job", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "returnUncompletedJob", - "value": "true", - "disabled": false - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418261, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_5de53e25a25f44d0933be4b1564ac80a", - "parentId": "fld_405308b190c64bb29cb03c2f3a180b68", - "modified": 1702991288793, - "created": 1680682418257, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "Search for all Jobs in JobStore", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418257, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_6ef501ec2829461a8c507d87625a5cda", - "parentId": "fld_405308b190c64bb29cb03c2f3a180b68", - "modified": 1702991284435, - "created": 1680682418247, - "url": "{{IRS_HOST}}/irs/jobs", - "name": "Search for Jobs for given state", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "states", - "value": "ERROR", - "disabled": true, - "id": "pair_c694b66f41e649db837f801b5699859e" - }, - { - "name": "states", - "value": "CANCELED,COMPLETED", - "disabled": false, - "id": "pair_ab346623e5394504b7232cc40ae75bed" - }, - { - "id": "pair_ddbccd5219944e8cac3d99249ba881e5", - "name": "states", - "value": "RUNNING", - "description": "", - "disabled": true - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418247, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_8b52d17f3bfe456da711757d0d79dcf3", - "parentId": "fld_405308b190c64bb29cb03c2f3a180b68", - "modified": 1703236659047, - "created": 1690384427379, - "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", - "name": "Get Job for jobId", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "returnUncompletedJob", - "value": "true", - "disabled": false - } - ], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418238, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_2e8b481698814a9fa1143db6a9fd6031", - "parentId": "fld_405308b190c64bb29cb03c2f3a180b68", - "modified": 1702991276045, - "created": 1680682418229, - "url": "{{IRS_HOST}}/irs/jobs/{% prompt 'Job ID', '', '', '', false, true %}", - "name": "Cancel Job for jobId", - "description": "", - "method": "PUT", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418229, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_2ec823bafb9d4af09671ce809a37790c", - "parentId": "fld_405308b190c64bb29cb03c2f3a180b68", - "modified": 1702991272198, - "created": 1682498338739, - "url": "{{IRS_HOST}}/irs/aspectmodels", - "name": "Get all available Aspect Models", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418179, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_6eee723fa30e4cb594dab53f2186b99a", - "parentId": "fld_902c811a969e46af8ee1fc32036c218b", - "modified": 1705942066941, - "created": 1680682418213, - "url": "{{ _.SEMANTIC_HUB_URL }}/hub/api/v1/models", - "name": "Get all models", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "pageSize", - "value": "100", - "disabled": false, - "id": "pair_96567b64925d4487bae4c74bfa9e021e" - }, - { - "id": "pair_2dae68db8a564296a5835e66d951331f", - "name": "status", - "value": "RELEASED", - "description": "" - } - ], - "headers": [], - "authentication": { - "type": "oauth2", - "grantType": "client_credentials", - "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", - "clientId": "{{ _.SEMANTIC_HUB_CLIENT_ID }}", - "clientSecret": "{{ _.SEMANTIC_HUB_CLIENT_SECRET }}" - }, - "metaSortKey": -1680682418213, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_902c811a969e46af8ee1fc32036c218b", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1680682418222, - "created": 1680682418222, - "name": "Semantics Hub", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418222, - "_type": "request_group" - }, - { - "_id": "req_a09955677d83406faf69633d93b046a7", - "parentId": "fld_902c811a969e46af8ee1fc32036c218b", - "modified": 1705942077015, - "created": 1680682418204, - "url": "{{ _.SEMANTIC_HUB_URL }}/hub/api/v1/models/urn%3Abamm%3Aio.catenax.serial_part_typization%3A1.0.0%23SerialPartTypization", - "name": "Get SerialPartTypization", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "oauth2", - "grantType": "client_credentials", - "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", - "clientId": "{{ _.SEMANTIC_HUB_CLIENT_ID }}", - "clientSecret": "{{ _.SEMANTIC_HUB_CLIENT_SECRET }}" - }, - "metaSortKey": -1680682418204, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_955379ec931a4d788dbb4853b7a5e59d", - "parentId": "fld_902c811a969e46af8ee1fc32036c218b", - "modified": 1705942085733, - "created": 1680682418192, - "url": "{{ _.SEMANTIC_HUB_URL }}/hub/api/v1/models/urn%3Abamm%3Aio.catenax.serial_part_typization%3A1.0.0%23SerialPartTypization/json-schema", - "name": "Get SerialPartTypization Json Schema", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "oauth2", - "grantType": "client_credentials", - "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", - "clientId": "{{ _.SEMANTIC_HUB_CLIENT_ID }}", - "clientSecret": "{{ _.SEMANTIC_HUB_CLIENT_SECRET }}" - }, - "metaSortKey": -1680682418192, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_fa5d9519b09c416e940dbfaa6d37f3c2", - "parentId": "fld_857f5311c3d44dca98d5df7170f17b66", - "modified": 1705942100313, - "created": 1680682418174, - "url": "{{ _.BPDM_URL }}/v1/api/catena/business-partner/{% prompt 'BPN', '', '', '', false, true %}", - "name": "Get business partner by id", - "description": "", - "method": "GET", - "body": {}, - "parameters": [ - { - "name": "idType", - "value": "BPN", - "disabled": false - } - ], - "headers": [], - "authentication": { - "type": "oauth2", - "grantType": "client_credentials", - "accessTokenUrl": "{{ _.OAUTH2_TOKEN_URL }}", - "clientId": "{{ _.BPDM_CLIENT_ID }}", - "clientSecret": "{{ _.BPDM_CLIENT_SECRET }}" - }, - "metaSortKey": -1680682418174, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_857f5311c3d44dca98d5df7170f17b66", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1680682418184, - "created": 1680682418184, - "name": "Business partner data management", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418184, - "_type": "request_group" - }, - { - "_id": "req_17b898d1c1d94f7aa7f9552cb1bbb6a1", - "parentId": "fld_ddb57b7df61a4c7fbb8dd6e09a55aefb", - "modified": 1702991347797, - "created": 1680682418157, - "url": "{{IRS_HOST}}/esr/esr-statistics/{% prompt 'globalAssetId', 'Provide global asset ID or use default', _.GLOBAL_ASSET_ID, '', false, true %}/{% prompt 'BOM Lifecycle', '', '', '', false, true %}/{% prompt 'Certificate', '', '', '', false, true %}/submodel", - "name": "Get Esr Statistics", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418158, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_ddb57b7df61a4c7fbb8dd6e09a55aefb", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1680682418167, - "created": 1680682418167, - "name": "ESR Spike", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418167, - "_type": "request_group" - }, - { - "_id": "req_1703e4aef5d14fa8b7a1af89386bdbaa", - "parentId": "fld_10ffabbc4736405badac478153d86d5a", - "modified": 1702991361578, - "created": 1680682418143, - "url": "{{IRS_HOST}}/ess/bpn/investigations", - "name": "Register Job Investigation", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"key\": {\n\t\t\"globalAssetId\": \"urn:uuid:2c57b0e9-a653-411d-bdcd-64787e9fd3a7\",\n\t\t\"bpn\": \"BPNL00000003CRHK\"\n\t},\n\t\"incidentBPNSs\": [\n\t\t\"BPNL00000003B6LU\"\n\t],\n\t\"bomLifecycle\": \"asPlanned\"\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418143, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_10ffabbc4736405badac478153d86d5a", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1680682418151, - "created": 1680682418151, - "name": "ESS Spike", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418151, - "_type": "request_group" - }, - { - "_id": "req_b612a296760040e091ffe48a7bba9bb4", - "parentId": "fld_10ffabbc4736405badac478153d86d5a", - "modified": 1705942138125, - "created": 1680682418134, - "url": "{{IRS_HOST}}/ess/bpn/investigations/{% response 'body', 'req_ec674952c1114bce8fb71ea1ed6d9ef7', 'b64::JC5pZA==::46b', 'never', 60 %}", - "name": "Get registered investigation", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418138.5, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_9828dfa817924497b0facd0a4693f0a7", - "parentId": "fld_10ffabbc4736405badac478153d86d5a", - "modified": 1702991370481, - "created": 1680682418134, - "url": "{{IRS_HOST}}/ess/bpn/investigations/{% prompt 'Job ID', '', '', '', false, true %}", - "name": "Search for investigation by jobId", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418134, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_d566c63461864dfb9d77ac70b22733f1", - "parentId": "fld_73e0c8163ecc44e6aa9331273816ae27", - "modified": 1710076303275, - "created": 1680682418118, - "url": "{{IRS_HOST}}/irs/orders", - "name": "Register Batch Order", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"aspects\": [\n\t\t\"urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt\"\n\t],\n\t\"collectAspects\": true,\n\t\"lookupBPNs\": true,\n\t\"direction\": \"downward\",\n\t\"batchSize\": 10,\n\t\"batchStrategy\": \"PRESERVE_BATCH_JOB_ORDER\",\n\t\"keys\": [\n\t\t{\n\t\t\t\"globalAssetId\": \"urn:uuid:ed333e9a-5afa-40b2-99da-bae2fd211122\",\n\t\t\t\"bpn\": \"BPNL00000003AAXX\"\n\t\t},\n\t\t{\n\t\t\t\"globalAssetId\": \"urn:uuid:771d2ccc-a081-4d3a-bcb2-46c6a0a32211\",\n\t\t\t\"bpn\": \"BPNL00000003AAXX\"\n\t\t}\n\t]\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418118, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_73e0c8163ecc44e6aa9331273816ae27", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1680682418128, - "created": 1680682418128, - "name": "Batch Processing", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418128, - "_type": "request_group" - }, - { - "_id": "req_1b2d7e8bd4fe4b328a41122a6dec75a6", - "parentId": "fld_73e0c8163ecc44e6aa9331273816ae27", - "modified": 1702991390349, - "created": 1696342619602, - "url": "{{IRS_HOST}}/irs/ess/orders", - "name": "Register ESS Batch Order", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"batchSize\": 10,\n\t\"batchStrategy\": \"PRESERVE_BATCH_JOB_ORDER\",\n\t\"incidentBPNSs\": [\"BPNL00000003B6LU\"],\n\t\"keys\": [\n\t\t{\n\t\t\t\"globalAssetId\": \"urn:uuid:ed333e9a-5afa-40b2-99da-bae2fd211122\",\n\t\t\t\"bpn\": \"BPNL00000003AAXX\"\n\t\t},\n\t\t{\n\t\t\t\"globalAssetId\": \"urn:uuid:771d2ccc-a081-4d3a-bcb2-46c6a0a32211\",\n\t\t\t\"bpn\": \"BPNL00000003AAXX\"\n\t\t}\n\t]\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418113.5, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_8d4a3c99f116451591f816ffa044979e", - "parentId": "fld_73e0c8163ecc44e6aa9331273816ae27", - "modified": 1705006936944, - "created": 1705006139836, - "url": "{{IRS_HOST}}/irs/orders/{% prompt 'Order ID', '', '', '', false, true %}", - "name": "Cancel order job for given orderId", - "description": "", - "method": "PUT", - "body": { - "mimeType": "application/json", - "text": "{}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_88db8badf4ea4a0d9968c769167407c8" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418111.25, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_ddc8290ec32f4571a2783ab161a495a2", - "parentId": "fld_73e0c8163ecc44e6aa9331273816ae27", - "modified": 1702991398473, - "created": 1680682418109, - "url": "{{IRS_HOST}}/irs/orders/{% prompt 'Order ID', '', '', '', false, true %}", - "name": "Search for given orderId", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418109, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_95e105ca1470437697dc4ae078a2316f", - "parentId": "fld_73e0c8163ecc44e6aa9331273816ae27", - "modified": 1702991409664, - "created": 1680682418099, - "url": "{{IRS_HOST}}/irs/orders/{% prompt 'Order ID', '', '', '', false, true %}/batches/{% prompt 'Batch ID', '', '', '', false, true %}", - "name": "Search for given orderId and batchId", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-API-KEY", - "value": "{{ _.REGULAR_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1680682418099, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_28ef5730f96e4c21892a83bb68020cbb", - "parentId": "fld_5e7596546a69493dae447ea588ac5ba8", - "modified": 1690472186478, - "created": 1678358655308, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/catalog/request", - "name": "Get catalog", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t},\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:providerUrl\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\"\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1686195722939.1875, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_5e7596546a69493dae447ea588ac5ba8", - "parentId": "fld_d51833440f684123a8dd6b0ec9441faa", - "modified": 1690362660167, - "created": 1690362660167, - "name": "Catalog", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1690362660167, - "_type": "request_group" - }, - { - "_id": "fld_d51833440f684123a8dd6b0ec9441faa", - "parentId": "fld_d5990860fbf2447ea5458e20134a1479", - "modified": 1690363778601, - "created": 1675675609576, - "name": "EDC-Requests", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1680682418078, - "_type": "request_group" - }, - { - "_id": "req_0ab0bc3449c2434094dcb6a4d616c8bf", - "parentId": "fld_5e7596546a69493dae447ea588ac5ba8", - "modified": 1691500654267, - "created": 1685521485278, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/catalog/request", - "name": "Get catalog with registry filter", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t},\n\t\"edc:providerUrl\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\",\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:querySpec\": {\n\t\t\"edc:filterExpression\": {\n\t\t\t\"edc:operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/type\",\n\t\t\t\"edc:operator\": \"=\",\n\t\t\t\"edc:operandRight\": \"data.core.digitalTwinRegistry\"\n\t\t}\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1686195722889.1875, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_cb6c22bc69f64adab97a35ddc4118cff", - "parentId": "fld_5e7596546a69493dae447ea588ac5ba8", - "modified": 1705940987109, - "created": 1691654388376, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/catalog/request", - "name": "Get catalog with asset filter", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t},\n\t\"edc:providerUrl\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\",\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:querySpec\": {\n\t\t\"edc:filterExpression\": {\n\t\t\t\"edc:operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/id\",\n\t\t\t\"edc:operator\": \"=\",\n\t\t\t\"edc:operandRight\": \"{% prompt 'assetId', '', '', '', false, true %}\"\n\t\t}\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1686195722789.1875, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_f5a54395820f445e8d9d09ceaa9ea623", - "parentId": "fld_8c763d94d1bb4008af0bc0d512e444ab", - "modified": 1691578280640, - "created": 1675675609557, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/contractnegotiations", - "name": "Start contract negotiation", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"edc:connectorAddress\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\",\n\t\"edc:connectorId\": \"BPNL00000001CRHK\",\n\t\"edc:offer\": {\n\t\t\"@type\": \"edc:ContractOfferDescription\",\n\t\t\"edc:offerId\": \"ZGR0ci1jeG1lbWJlcnMtY29udHJhY3Q=:ZGlnaXRhbC10d2luLXJlZ2lzdHJ5:OGQ0ZTNkODYtOTIxOC00MjljLWI1N2EtNWZlZTZkODIzMmEx\",\n\t\t\"edc:assetId\": \"digital-twin-registry\",\n\t\t\"edc:policy\": {\n\t\t\t\"@type\": \"odrl:Set\",\n\t\t\t\"odrl:permission\": {\n\t\t\t\t\"odrl:target\": \"digital-twin-registry\",\n\t\t\t\t\"odrl:action\": {\n\t\t\t\t\t\"odrl:type\": \"USE\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"odrl:prohibition\": [],\n\t\t\t\"odrl:obligation\": [],\n\t\t\t\"odrl:target\": \"digital-twin-registry\"\n\t\t}\n\t},\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:callbackAddresses\": [],\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1684146511095, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_8c763d94d1bb4008af0bc0d512e444ab", - "parentId": "fld_d51833440f684123a8dd6b0ec9441faa", - "modified": 1684146626847, - "created": 1684146519491, - "name": "Negotiation", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1679911060327.75, - "_type": "request_group" - }, - { - "_id": "req_21c5f20359d547fbad6c4868e054c232", - "parentId": "fld_8c763d94d1bb4008af0bc0d512e444ab", - "modified": 1690362123962, - "created": 1675675609549, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/contractnegotiations/{% prompt 'id', '', '', '', false, true %}", - "name": "Get contract negotiation", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1684146511045, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_f328cb2312344d2484cacf927b3166fb", - "parentId": "fld_8c763d94d1bb4008af0bc0d512e444ab", - "modified": 1690362117725, - "created": 1685444139708, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/contractnegotiations/{% prompt 'id', '', '', '', false, true %}/cancel", - "name": "Cancel contract negotation", - "description": "", - "method": "POST", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1684146511020, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_95f64450aa5c4313adc1ecb31a77f885", - "parentId": "fld_8c763d94d1bb4008af0bc0d512e444ab", - "modified": 1690361721223, - "created": 1681911985730, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/contractnegotiations/request", - "name": "Get contract negotiations", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1684146510995, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_3f34cc3be1224fab9f1a57d46450ff01", - "parentId": "fld_8c763d94d1bb4008af0bc0d512e444ab", - "modified": 1691578311420, - "created": 1675675609541, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/transferprocesses", - "name": "Start transferprocess", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"edc:assetId\": \"digital-twin-registry\",\n\t\"edc:connectorAddress\": \"{{ _.PROVIDER_CONTROLPLANE_1 }}/api/v1/dsp\",\n\t\"edc:contractId\": \"ZGR0ci1jeG1lbWJlcnMtY29udHJhY3Q=:ZGlnaXRhbC10d2luLXJlZ2lzdHJ5:NGNlMDk0ODgtOTMzYy00ZDk3LThiNTAtNDMyZWRjMzIwM2Fm\",\n\t\"edc:dataDestination\": {\n\t\t\"edc:type\": \"HttpProxy\"\n\t},\n\t\"edc:protocol\": \"dataspace-protocol-http\",\n\t\"edc:managedResources\": false,\n\t\"edc:connectorId\": \"BPNL00000001CRHK\",\n\t\"@context\": {\n\t\t\"dct\": \"https://purl.org/dc/terms/\",\n\t\t\"tx\": \"https://w3id.org/tractusx/v0.0.1/ns/\",\n\t\t\"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\",\n\t\t\"dcat\": \"https://www.w3.org/ns/dcat/\",\n\t\t\"dspace\": \"https://w3id.org/dspace/v0.8/\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1684146510945, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_b95afcbf1a804734be5c66416c6519b0", - "parentId": "fld_8c763d94d1bb4008af0bc0d512e444ab", - "modified": 1691503370103, - "created": 1679993996270, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/transferprocesses/{% prompt 'id', '', '', '', false, true %}", - "name": "Get transferprocess by id", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1684146510895, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_a8445e348e604e848bc2d970937b15af", - "parentId": "fld_8c763d94d1bb4008af0bc0d512e444ab", - "modified": 1690361795179, - "created": 1675675609525, - "url": "{{ _.CONSUMER_CONTROLPLANE }}/management/v2/transferprocesses/request", - "name": "Get transferprocesses", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1684146510845, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_43de63a43db448ddae87162ae7100840", - "parentId": "fld_8c763d94d1bb4008af0bc0d512e444ab", - "modified": 1690361763512, - "created": 1681910653593, - "url": "{{CONSUMER_CONTROLPLANE}}/management/v2/contractagreements/request", - "name": "Get contract agreements", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1684146510795, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_553997b9e0454fba9b49f48db256f156", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690362947546, - "created": 1681907482278, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/assets", - "name": "Create Asset", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"@context\": {},\n\t\"asset\": {\n\t\t\"@id\": \"asset-id\",\n\t\t\"properties\": {\n\t\t\t\"description\": \"IRS EDC Demo Asset\"\n\t\t}\n\t},\n\t\"dataAddress\": {\n\t\t\"@type\": \"DataAddress\",\n\t\t\"type\": \"HttpData\",\n\t\t\"baseUrl\": \"http://backend-url/data/asset-id\",\n\t\t\"contentType\": \"application-json\",\n\t\t\"proxyPath\": \"false\",\n\t\t\"proxyBody\": \"false\",\n\t\t\"proxyMethod\": \"false\",\n\t\t\"proxyQueryParams\": \"false\"\n\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033461.75, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "parentId": "fld_d51833440f684123a8dd6b0ec9441faa", - "modified": 1705940929752, - "created": 1684146457388, - "name": "Provider", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1678852197613.5625, - "_type": "request_group" - }, - { - "_id": "req_f67493fa1f8745b68dba040eece7c0ed", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690362407763, - "created": 1685444139630, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/assets/{% prompt 'id', '', '', '', false, true %}", - "name": "Get Asset by ID", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033452.375, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_2ba09ea750c44e1e990ca8cf7e5f5c1c", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690362438115, - "created": 1685444139625, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/assets/request", - "name": "Get all Assets", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033447.6875, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_07817c96c266454caff85e6c8b938b8d", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690362400081, - "created": 1685444139636, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/assets/{% prompt 'id', '', '', '', false, true %}", - "name": "Delete Asset", - "description": "", - "method": "DELETE", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033433.625, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_920c48d7632841d6923f5d15a6d78225", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690362581978, - "created": 1685444139641, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/policydefinitions", - "name": "Create Policy", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n\t\"validUntil\": \"2025-12-12T23:59:59.999Z\",\n\t\"businessPartnerNumber\": \"BPNL00000000BJTL\",\n\t\"payload\": {\n\t\t\t\"@context\": {\n\t\t\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t\t\t},\n\t\t\t\"@id\": \"policy-id12\",\n\t\t\t\"policy\": {\n\t\t\t\t\"odrl:permission\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"odrl:action\": \"USE\",\n\t\t\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\t\t\"odrl:and\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"Membership\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"active\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"odrl:leftOperand\": \"PURPOSE\",\n\t\t\t\t\t\t\t\t\t\"odrl:operator\": {\n\t\t\t\t\t\t\t\t\t\t\"@id\": \"odrl:eq\"\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"odrl:rightOperand\": \"ID 3.1 Trace\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t}\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033403.9375, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_38bfd8f78ece4c8badbf58054f6c632a", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690362549290, - "created": 1685444139647, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/policydefinitions/{% prompt 'id', '', '', '', false, true %}", - "name": "Get Policy by ID", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033364.0937, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_1ebfdc66d2034ea2afb736a7fdb38ad6", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690362591799, - "created": 1685444139653, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/policydefinitions/request", - "name": "Get all Policies", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033344.1719, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_adc928754ae54cf48f37a5d407a4749b", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690362559324, - "created": 1685444139659, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/policydefinitions/{% prompt 'id', '', '', '', false, true %}", - "name": "Delte Policy by ID", - "description": "", - "method": "DELETE", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033299.25, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_3bcdfdd1c2b141f8842cecfe6abef0b7", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690363080444, - "created": 1685444139665, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/contractdefinitions", - "name": "Create Contract Definitinion", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "{\n \"@context\": {\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\n },\n \"@type\": \"ContractDefinition\",\n \"accessPolicyId\": \"policy-id\",\n \"contractPolicyId\": \"policy-id\",\n \"assetsSelector\": {\n \"operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/id\",\n \"operator\": \"=\",\n \"operandRight\": \"asset-id\"\n }\n}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033261.75, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_cc8d29800ba64bf3a60df1c14d1282df", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690362691392, - "created": 1685444139672, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/contractdefinitions/{% prompt 'id', '', '', '', false, true %}", - "name": "Get Contract Definition by ID", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033199.25, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_3a9069ccfff7484e82c232b09329d698", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690363126919, - "created": 1685444139678, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/contractdefinitions/request", - "name": "Get all Contract Definitinions", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/json", - "text": "" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033174.25, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_76be9bdcf51b488d80d75389c47b1680", - "parentId": "fld_b5c045d33ab548bb9b7ac90dae06c0de", - "modified": 1690363136216, - "created": 1685444139684, - "url": "{{ _.PROVIDER_CONTROLPLANE_1 }}/management/v2/contractdefinitions/{% prompt 'id', '', '', '', false, true %}", - "name": "Delte Contract Definition", - "description": "", - "method": "DELETE", - "body": { - "mimeType": "application/json", - "text": "" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "apikey", - "disabled": false, - "key": "X-Api-Key", - "value": "{{ _.EDC_API_KEY }}", - "addTo": "header" - }, - "metaSortKey": -1679911033149.25, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "env_d2b7eb1621841465ea24b73343568b286aa8ac9a", - "parentId": "wrk_565df8abe30f4da29d8bffcde97927d7", - "modified": 1680782486844, - "created": 1680782486844, - "name": "Base Environment", - "data": {}, - "dataPropertyOrder": null, - "color": null, - "isPrivate": false, - "metaSortKey": 1680782486844, - "_type": "environment" - }, - { - "_id": "jar_d2b7eb1621841465ea24b73343568b286aa8ac9a", - "parentId": "wrk_565df8abe30f4da29d8bffcde97927d7", - "modified": 1711542878876, - "created": 1680782486851, - "name": "Default Jar", - "cookies": [ - { - "key": "KC_RESTART", - "expires": "1970-01-01T00:00:10.000Z", - "maxAge": 0, - "domain": "centralidp.int.demo.catena-x.net", - "path": "/auth/realms/CX-Central/", - "httpOnly": true, - "extensions": [ - "Version=1" - ], - "hostOnly": true, - "creation": "2023-04-06T13:30:18.499Z", - "lastAccessed": "2024-03-27T12:34:38.876Z", - "id": "5637144203997095" - }, - { - "key": "KC_RESTART", - "expires": "1970-01-01T00:00:10.000Z", - "maxAge": 0, - "domain": "centralidp-pen.dev.demo.catena-x.net", - "path": "/auth/realms/CX-Central/", - "httpOnly": true, - "extensions": [ - "Version=1" - ], - "hostOnly": true, - "creation": "2024-02-13T11:37:30.975Z", - "lastAccessed": "2024-02-13T11:54:54.713Z", - "id": "0027837016196308184" - } - ], - "_type": "cookie_jar" - }, - { - "_id": "spc_22dfe33611af4731965cc2b08febcfdb", - "parentId": "wrk_565df8abe30f4da29d8bffcde97927d7", - "modified": 1680782484284, - "created": 1680782484284, - "fileName": "IRS", - "contents": "", - "contentType": "yaml", - "_type": "api_spec" - }, - { - "_id": "spc_3a573993100a40b3bc2b0a5bd8e5cc48", - "parentId": "wrk_565df8abe30f4da29d8bffcde97927d7", - "modified": 1681726479575, - "created": 1681726479575, - "fileName": "IRS", - "contents": "", - "contentType": "yaml", - "_type": "api_spec" - } - ] + "hostOnly": true, + "creation": "2023-11-30T14:21:58.431Z", + "lastAccessed": "2023-12-01T09:54:02.877Z", + "id": "4550124559802897" + } + ], + "_type": "cookie_jar" + }, + { + "_id": "spc_a610e869f2384602ac1a9523d58b1ae0", + "parentId": "wrk_53254e8de24e4d6e8325f803463490e8", + "modified": 1701227455141, + "created": 1701227455141, + "fileName": "IRS", + "contents": "", + "contentType": "yaml", + "_type": "api_spec" + } + ] } \ No newline at end of file