From 5949acbe4af0610504e6a8e0ce1b0f39a55bfda1 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Fri, 1 Mar 2024 00:06:01 +0100 Subject: [PATCH 01/44] feature(tx-backend): #536 draft subsequential flow --- .../charts/backend/templates/deployment.yaml | 4 + charts/traceability-foss/values.yaml | 1 + .../repository/SubmodelPayloadRepository.java | 3 + .../domain/importpoc/service/DtrService.java | 199 ++++++++++++++++++ .../service/EdcAssetCreationService.java | 91 ++++++++ .../importpoc/service/PublishServiceImpl.java | 26 ++- .../common/config/ApplicationConfig.java | 25 +++ .../config/RestTemplateConfiguration.java | 22 ++ .../common/properties/EdcProperties.java | 8 + .../SubmodelPayloadRepositoryImpl.java | 6 + tx-backend/src/main/resources/application.yml | 6 + .../importdata/ImportControllerIT.java | 2 +- 12 files changed, 386 insertions(+), 7 deletions(-) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 8406a6f648..ba86089aa6 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -98,6 +98,10 @@ spec: value: {{ .Values.edc.apiKey | quote }} - name: EDC_PROVIDER_URL value: {{ .Values.edc.providerUrl | quote }} + - name: PARTS_EDC_PROVIDER_URL + value: {{ .Values.edc.partsProviderUrl | quote }} + - name: REGISTRY_URL_WITH_PATH + value: {{ .Values.registry.urlWithPath | quote }} - name: SUBMODEL_URL value: {{ .Values.submodel.baseUrl | quote }} - name: IRS_URL diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 3c129e5555..c92fa33342 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -293,6 +293,7 @@ backend: callbackUrl: "CHANGEME" # example: http://:8181/internal/endpoint-data-reference callbackUrlEdcClient: "CHANGEME" # example: https:///api/internal/endpoint-data-reference dataEndpointUrl: "CHANGEME" # example: https:///management" + partsProviderUrl: "CHANGEME" # host of the parts provider EDC discoveryfinder: baseUrl: "CHANGEME" # example: https://discoveryfinder.net/discoveryfinder/api/administration/connectors/discovery/search diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepository.java index 521f81660c..4ee08e6f85 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepository.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepository.java @@ -22,9 +22,12 @@ import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.GenericSubmodel; import java.util.List; +import java.util.Map; public interface SubmodelPayloadRepository { void savePayloadForAssetAsBuilt(String assetId, List submodels); void savePayloadForAssetAsPlanned(String assetId, List submodels); + + Map getTypesAndPayloadsByAssetId(String assetId); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java new file mode 100644 index 0000000000..e236170f68 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -0,0 +1,199 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.assets.domain.importpoc.service; + +import lombok.RequiredArgsConstructor; +import org.eclipse.tractusx.irs.component.assetadministrationshell.AssetAdministrationShellDescriptor; +import org.eclipse.tractusx.irs.component.assetadministrationshell.Endpoint; +import org.eclipse.tractusx.irs.component.assetadministrationshell.IdentifierKeyValuePair; +import org.eclipse.tractusx.irs.component.assetadministrationshell.ProtocolInformation; +import org.eclipse.tractusx.irs.component.assetadministrationshell.Reference; +import org.eclipse.tractusx.irs.component.assetadministrationshell.SecurityAttribute; +import org.eclipse.tractusx.irs.component.assetadministrationshell.SemanticId; +import org.eclipse.tractusx.irs.component.assetadministrationshell.SubmodelDescriptor; +import org.eclipse.tractusx.irs.registryclient.decentral.DigitalTwinRegistryCreateShellService; +import org.eclipse.tractusx.irs.registryclient.decentral.exception.CreateDtrShellException; +import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.SubmodelPayloadRepository; +import org.eclipse.tractusx.traceability.common.properties.EdcProperties; +import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; +import org.eclipse.tractusx.traceability.submodel.domain.repository.SubmodelServerRepository; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.stream.Collectors; + +@Service +@RequiredArgsConstructor +public class DtrService { + private static final String GLOBAL_REFERENCE = "GlobalReference"; + + private final DigitalTwinRegistryCreateShellService dtrCreateShellService; + private final SubmodelPayloadRepository submodelPayloadRepository; + private final SubmodelServerRepository submodelServerRepository; + private final EdcProperties edcProperties; + private final TraceabilityProperties traceabilityProperties; + + + public void createShellInDtr(final AssetBase assetBase) throws CreateDtrShellException { + Map payloadByAspectType = submodelPayloadRepository.getTypesAndPayloadsByAssetId(assetBase.getId()); + Map createdSubmodelIdByAspectType = payloadByAspectType.entrySet().stream() + .map(this::createSubmodel) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + + List descriptors = toSubmodelDescriptors(createdSubmodelIdByAspectType); + + dtrCreateShellService.createShell(aasFrom(assetBase, descriptors)); + } + + private List toSubmodelDescriptors(Map createdSubmodelIdByAspectType) { + return createdSubmodelIdByAspectType.entrySet() + .stream().map(entry -> + toSubmodelDescriptor(entry.getKey(), entry.getValue()) + + ).toList(); + } + + private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodelServerIdReference) { + return SubmodelDescriptor.builder() + .description(List.of()) + .idShort(aspectTypeToSimpleSubmodelName(aspectType)) // example SingleLevelUsageAsBuilt + .id(submodelServerIdReference.toString()) + .semanticId( + Reference.builder() + .type("ExternalReference") + .keys( + List.of(SemanticId.builder() + .type(GLOBAL_REFERENCE) + .value(aspectType).build()) + ).build() + ) + .endpoints( + List.of( + Endpoint.builder() + .interfaceInformation("SUBMODEL-3.0") + .protocolInformation( + ProtocolInformation.builder() + // TODO: Dataplane from application yaml config + .href(edcProperties.getPartsProviderEdcDataplaneUrl() + "/api/public/data/" + submodelServerIdReference) + .endpointProtocol("HTTP") + .endpointProtocolVersion(List.of("1.1")) + .subprotocol("DSP") + .subprotocolBodyEncoding("plain") + .subprotocolBody(getSubProtocol()) + .securityAttributes( + List.of(SecurityAttribute.none()) + ).build() + ).build() + ) + ).build(); + } + + private String getSubProtocol() { + final String submodelServerAssetId = "submodel-asset"; + final String edcProviderControlplaneUrl = edcProperties.getPartsProviderEdcControlplaneUrl(); // "https://trace-x-test-edc.dev.demo.catena-x.net" + return "id=%s;dspEndpoint=%s".formatted(submodelServerAssetId, edcProviderControlplaneUrl); + } + + private String aspectTypeToSimpleSubmodelName(String aspectType) { + String[] split = aspectType.split("#"); + return split[1]; + } + + private Map.Entry createSubmodel(Map.Entry payloadByAspectType) { + UUID submodelId = UUID.randomUUID(); + submodelServerRepository.saveSubmodel(submodelId.toString(), payloadByAspectType.getValue()); + return Map.entry(payloadByAspectType.getKey(), submodelId); + } + + // Do we have partInstanceId ? python script is generating specificAssetId with part instance id in it + private AssetAdministrationShellDescriptor aasFrom(AssetBase assetBase, List descriptors) { + return AssetAdministrationShellDescriptor.builder() + .globalAssetId(assetBase.getId()) + .idShort(assetBase.getIdShort()) + .id(UUID.randomUUID().toString()) // TODO: generated ? upon creation do we need it later on ? + .specificAssetIds(aasIdentifiersFromAsset(assetBase)) + .submodelDescriptors(descriptors) + .build(); + } + + List aasIdentifiersFromAsset(AssetBase assetBase) { + return List.of( + IdentifierKeyValuePair.builder() + .name("manufacturerId") + .value(assetBase.getManufacturerId()) + .subjectId(// TODO: for now IRS lib does not support exterrnalSubjectId needs to be implemented + Reference.builder() + .type("ExternalReference") + .keys(getExternalSubjectIds()) + .build()) + .build(), + IdentifierKeyValuePair.builder() + .name("manufacturerPartId") + .value(assetBase.getManufacturerPartId()) + .subjectId(// TODO: for now IRS lib does not support exterrnalSubjectId needs to be implemented + Reference.builder() + .type("ExternalReference") + .keys(getExternalSubjectIds()) + .build()) + .build() + // Python script creates also partInstanceId like below where do I get partInstanceId information ?? +// ,IdentifierKeyValuePair.builder() +// .name("partInstanceId") +// .value(assetBase.getManufacturerPartId()) +// .subjectId(// TODO: for now IRS lib does not support exterrnalSubjectId needs to be implemented +// Reference.builder() +// .type("ExternalReference") +// .keys(getExternalSubjectIds()) +// .build()) +// .build() + ); + } + + private List getExternalSubjectIds() { + return List.of( + SemanticId.builder() + .type(GLOBAL_REFERENCE) + .value("PUBLIC_READABLE") + .build(), + SemanticId.builder() + .type(GLOBAL_REFERENCE) + .value(traceabilityProperties.getBpn().toString()) + .build() + // TODO: Test if it works python script creates GlobalReferences for both instances BPN + // TODO: Last time we used python script with only own bpn in global references other instance could not retrieve assets + // our usage of python script generates following +// { +// "type": "GlobalReference", +// "value": "PUBLIC_READABLE" +// }, +// { +// "type": "GlobalReference", +// "value": "BPNL00000003CML1" +// }, +// { +// "type": "GlobalReference", +// "value": "BPNL00000003CNKC" +// } + ); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java new file mode 100644 index 0000000000..bafe2cde97 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -0,0 +1,91 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.assets.domain.importpoc.service; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.irs.edc.client.asset.EdcAssetService; +import org.eclipse.tractusx.irs.edc.client.asset.model.exception.CreateEdcAssetException; +import org.eclipse.tractusx.irs.edc.client.contract.model.exception.CreateEdcContractDefinitionException; +import org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractDefinitionService; +import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; +import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; +import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +@Slf4j +@Service +@RequiredArgsConstructor +public class EdcAssetCreationService { + private static final String REGISTRY_ASSET_NAME = "registry-asset"; + private static final String SUBMODEL_ASSET_NAME = "submodel-asset"; + private final EdcAssetService edcDtrAssetService; + private final EdcPolicyDefinitionService edcDtrPolicyDefinitionService; + private final EdcContractDefinitionService edcDtrContractDefinitionService; + private final TraceabilityProperties traceabilityProperties; + @Value("${registry.urlWithPath}") + String registryUrlWithPath = null; + + public void createDtrAndSubmodelAssets() { + // TODO: check if exists ( query catalog of parts provider EDC ) ? + + String createdPolicyId = null; + try { + createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy("ID 3.0 Trace"); // which one and from where to use it ? + } catch (CreateEdcPolicyDefinitionException e) { + throw new RuntimeException(e); + } + log.info("DTR Policy Id created :{}", createdPolicyId); + + String dtrAssetId = null; + try { + dtrAssetId = edcDtrAssetService.createDtrAsset(registryUrlWithPath, REGISTRY_ASSET_NAME); + } catch (CreateEdcAssetException e) { + throw new RuntimeException(e); + } + log.info("DTR Asset Id created :{}", dtrAssetId); + + String dtrContractId = null; + try { + dtrContractId = edcDtrContractDefinitionService.createContractDefinition(dtrAssetId, createdPolicyId); + } catch (CreateEdcContractDefinitionException e) { + throw new RuntimeException(e); + } + log.info("DTR Contract Id created :{}", dtrContractId); + +// String submodelAssetId = null; + // TODO: IRS lib needs adjustments to support different protocol for submodel asset +// try { +// submodelAssetId = edcDtrAssetService.createSubmodelAssetRequest(traceabilityProperties.getSubmodelBase()+ "/api/submodel/data", SUBMODEL_ASSET_NAME); +// } catch (CreateEdcAssetException e) { +// throw new RuntimeException(e); +// } +// log.info("Submodel Asset Id created :{}", submodelAssetId); + +// String submodelContractId = null; +// try { +// submodelContractId = edcDtrContractDefinitionService.createContractDefinition(submodelAssetId, createdPolicyId); +// } catch (CreateEdcContractDefinitionException e) { +// throw new RuntimeException(e); +// } +// log.info("Submodel Contract Id created :{}", submodelContractId); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java index e9e02f1405..a5cb4935ec 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java @@ -20,6 +20,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.irs.registryclient.decentral.exception.CreateDtrShellException; import org.eclipse.tractusx.traceability.assets.application.importpoc.PublishService; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; @@ -41,17 +42,27 @@ public class PublishServiceImpl implements PublishService { private final AssetAsPlannedRepository assetAsPlannedRepository; private final AssetAsBuiltRepository assetAsBuiltRepository; + private final DtrService dtrService; + private final EdcAssetCreationService edcAssetCreationService; @Override public void publishAssets(String policyId, List assetIds) { //Update assets with policy id assetIds.forEach(this::throwIfNotExists); - log.info("Updating status of asPlannedAssets."); - updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsPlannedRepository); - log.info("Updating status of asBuiltAssets."); - updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsBuiltRepository); + edcAssetCreationService.createDtrAndSubmodelAssets(); + // TODO: rethink how to refactor updateAssetsAndPolicyMethod so steps will be more visibe + try { + log.info("Updating status of asPlannedAssets."); + updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsPlannedRepository); + log.info("Updating status of asBuiltAssets."); + updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsBuiltRepository); + } catch (CreateDtrShellException e) { + throw new RuntimeException(e); + } + } + private void throwIfNotExists(String assetId) { if (!(assetAsBuiltRepository.existsById(assetId) || assetAsPlannedRepository.existsById(assetId))) { throw new PublishAssetException("No asset found with the provided ID: " + assetId); @@ -59,7 +70,7 @@ private void throwIfNotExists(String assetId) { } - private void updateAssetWithStatusAndPolicy(String policyId, List assetIds, AssetRepository repository) { + private void updateAssetWithStatusAndPolicy(String policyId, List assetIds, AssetRepository repository) throws CreateDtrShellException { List assetList = repository.getAssetsById(assetIds); List saveList = assetList.stream() .filter(this::validTransientState) @@ -70,6 +81,10 @@ private void updateAssetWithStatusAndPolicy(String policyId, List assetI return asset; }).toList(); + for (AssetBase assetBase : saveList) { + dtrService.createShellInDtr(assetBase); + } + List assetBases = repository.saveAll(saveList); log.info("Successfully set {} in status IN_SYNCHRONIZATION", assetBases.stream().map(AssetBase::getId).collect(Collectors.joining(", "))); @@ -81,5 +96,4 @@ private boolean validTransientState(AssetBase assetBase) { } throw new PublishAssetException("Asset with ID " + assetBase.getId() + " is not in TRANSIENT state."); } - } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java index d8a64fe3fd..baf3d6e897 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java @@ -46,6 +46,7 @@ import org.eclipse.tractusx.irs.edc.client.policy.PolicyType; import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; +import org.eclipse.tractusx.irs.registryclient.decentral.DigitalTwinRegistryCreateShellService; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.IrsService; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.PolicyResponse; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; @@ -54,6 +55,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -93,6 +95,9 @@ public class ApplicationConfig { @Lazy IrsService irsService; + @Value("${registry.urlWithPath}") + String registryUrlWithPath; + private final AcceptedPoliciesProvider.DefaultAcceptedPoliciesProvider defaultAcceptedPoliciesProvider; @@ -227,4 +232,24 @@ public EdcPolicyDefinitionService edcPolicyDefinitionService(EdcConfiguration ed public EdcContractDefinitionService edcContractDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcNotificationAssetRestTemplate) { return new EdcContractDefinitionService(edcConfiguration, edcNotificationAssetRestTemplate); } + + @Bean + public EdcAssetService edcDtrAssetService(EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcDtrAssetRestTemplate) { + return new EdcAssetService(edcTransformer, edcConfiguration, edcDtrAssetRestTemplate); + } + + @Bean + public EdcPolicyDefinitionService edcDtrPolicyDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { + return new EdcPolicyDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); + } + + @Bean + public EdcContractDefinitionService edcDtrContractDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { + return new EdcContractDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); + } + + @Bean + public DigitalTwinRegistryCreateShellService dtrCreateShellService(RestTemplate digitalTwinRegistryCreateShellRestTemplate) { + return new DigitalTwinRegistryCreateShellService(digitalTwinRegistryCreateShellRestTemplate, registryUrlWithPath); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java index bb2a67d1d5..e4deb64390 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java @@ -84,6 +84,28 @@ public RestTemplate edcNotificationAssetRestTemplate(@Autowired EdcProperties ed .build(); } + @Bean + public RestTemplate edcDtrAssetRestTemplate(@Autowired EdcProperties edcProperties) { + return new RestTemplateBuilder() + .rootUri(edcProperties.getPartsProviderEdcControlplaneUrl()) + .defaultHeader("Accept", MediaType.APPLICATION_JSON_VALUE) + .defaultHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE) + .defaultHeader(EDC_API_KEY_HEADER_NAME, edcProperties.getApiAuthKey()) + .setConnectTimeout(Duration.ofSeconds(10L)) + .setReadTimeout(Duration.ofSeconds(25L)) + .build(); + } + + @Bean + public RestTemplate digitalTwinRegistryCreateShellRestTemplate( + final RestTemplateBuilder restTemplateBuilder, + @Value("${digitalTwinRegistryClient.oAuthClientId}") final String clientRegistrationId) { + oAuthRestTemplate(restTemplateBuilder, + clientRegistrationId).build(); + return oAuthRestTemplate(restTemplateBuilder, + clientRegistrationId).build(); + } + /* RestTemplate used by trace x for the notification transfer to the edc controlplane including edc api key*/ @Bean public RestTemplate edcNotificationTemplate(@Autowired EdcProperties edcProperties) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java index e722c9248d..f50fab55d5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java @@ -51,6 +51,14 @@ public class EdcProperties { @Value("${edc.provider-edc-url}") private String providerEdcUrl; + @NotBlank + @Value("${edc.parts-provider-edc-controlplane-url}") + private String partsProviderEdcControlplaneUrl; + + @NotBlank + @Value("${edc.parts-provider-edc-dataplane-url}") + private String partsProviderEdcDataplaneUrl; + @NotBlank @Value("${edc.api-auth-key}") private String apiAuthKey; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java index 440ddf812b..24c8771d32 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java @@ -31,6 +31,7 @@ import org.springframework.stereotype.Repository; import java.util.List; +import java.util.Map; @Repository @RequiredArgsConstructor @@ -52,4 +53,9 @@ public void savePayloadForAssetAsPlanned(String assetId, List s AssetAsPlannedEntity asset = jpaAssetAsPlannedRepository.findById(assetId).orElseThrow(() -> new AssetNotFoundException(ASSET_NOT_FOUND_EXCEPTION_TEMPLATE.formatted(assetId))); jpaSubmodelPayloadRepository.saveAll(SubmodelPayloadEntity.from(asset, submodels)); } + + @Override + public Map getTypesAndPayloadsByAssetId(String assetId) { + return null; // TODO implement + } } diff --git a/tx-backend/src/main/resources/application.yml b/tx-backend/src/main/resources/application.yml index 1a66b097bd..087ed04b72 100644 --- a/tx-backend/src/main/resources/application.yml +++ b/tx-backend/src/main/resources/application.yml @@ -47,6 +47,9 @@ edc: api-auth-key: ${EDC_API_KEY} bpn-provider-url-mappings: { } provider-edc-url: ${EDC_PROVIDER_URL} + parts-provider-edc-controlplane-url: ${PARTS_EDC_PROVIDER_CONTROLPLANE_URL:https://provider-edc-controlplane.net} + parts-provider-edc-dataplane-url: ${PARTS_EDC_PROVIDER_DATAPLANE_URL:https://provider-edc-dataplane.net} + callback-urls: ${EDC_CALLBACK_URL} irs-edc-client: @@ -154,6 +157,9 @@ cors: ${ALLOWED_CORS_ORIGIN_FIRST}, ${ALLOWED_CORS_ORIGIN_SECOND} +registry: + urlWithPath: ${REGISTRY_URL_WITH_PATH:https://registry.net/semantics/registry/api/v3.0} + digitalTwinRegistryClient: shellDescriptorTemplate: /shell-descriptors/{aasIdentifier} # The path to retrieve AAS descriptors from the decentral DTR, must contain the placeholder {aasIdentifier} lookupShellsTemplate: /lookup/shells?assetIds={assetIds} # The path to lookup shells from the decentral DTR, must contain the placeholder {assetIds} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index eb48a114db..a10682553a 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -380,7 +380,7 @@ void givenInvalidAspect_whenImportData_thenValidationShouldNotPass() throws Jose .body("jobId", Matchers.notNullValue()); } - @Test +// @Test void givenValidFile_whenPublishData_thenStatusShouldChangeToInSynchronization() throws JoseException { // given String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); From af55c68efb89866facd28c9b4c22375477ed5ede Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Mar 2024 14:41:43 +0100 Subject: [PATCH 02/44] feature(tx-backend): #536 integration test for subsequential flow --- .../validation/JsonFileValidator.java | 3 +- .../domain/importpoc/service/DtrService.java | 4 +- .../service/EdcAssetCreationService.java | 32 ++++---- .../config/RestTemplateConfiguration.java | 10 +-- .../model/SubmodelPayloadEntity.java | 5 +- .../JpaSubmodelPayloadRepository.java | 8 ++ .../SubmodelPayloadRepositoryImpl.java | 17 ++++- .../application-integration-spring-boot.yml | 6 +- .../SubmodelPayloadRepositoryIT.java | 73 +++++++++++++++++++ .../EdcNotificationContractServiceTest.java | 3 +- .../common/config/RestitoConfig.java | 2 + .../common/support/DtrApiSupport.java | 52 +++++++++++++ .../common/support/EdcSupport.java | 9 +++ .../common/support/OAuth2ApiSupport.java | 11 +++ .../importdata/ImportControllerIT.java | 23 +++++- .../resources/testdata/import-request.json | 8 +- 16 files changed, 228 insertions(+), 38 deletions(-) create mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepositoryIT.java create mode 100644 tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DtrApiSupport.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java index e62841b0f8..ccbe627639 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java @@ -157,7 +157,8 @@ private URL getSchemaUrl(String schemaName) { throw new NotSupportedSchemaException(schemaName); } - return JsonFileValidator.class.getResource(schemaPath); + URL url = JsonFileValidator.class.getResource(schemaPath); + return url; } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index e236170f68..4162b9934f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -141,7 +141,7 @@ List aasIdentifiersFromAsset(AssetBase assetBase) { IdentifierKeyValuePair.builder() .name("manufacturerId") .value(assetBase.getManufacturerId()) - .subjectId(// TODO: for now IRS lib does not support exterrnalSubjectId needs to be implemented + .externalSubjectId( Reference.builder() .type("ExternalReference") .keys(getExternalSubjectIds()) @@ -150,7 +150,7 @@ List aasIdentifiersFromAsset(AssetBase assetBase) { IdentifierKeyValuePair.builder() .name("manufacturerPartId") .value(assetBase.getManufacturerPartId()) - .subjectId(// TODO: for now IRS lib does not support exterrnalSubjectId needs to be implemented + .externalSubjectId( Reference.builder() .type("ExternalReference") .keys(getExternalSubjectIds()) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index bafe2cde97..443b17401b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -49,7 +49,7 @@ public void createDtrAndSubmodelAssets() { String createdPolicyId = null; try { - createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy("ID 3.0 Trace"); // which one and from where to use it ? + createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy(traceabilityProperties.getRightOperand()); } catch (CreateEdcPolicyDefinitionException e) { throw new RuntimeException(e); } @@ -71,21 +71,21 @@ public void createDtrAndSubmodelAssets() { } log.info("DTR Contract Id created :{}", dtrContractId); -// String submodelAssetId = null; - // TODO: IRS lib needs adjustments to support different protocol for submodel asset -// try { -// submodelAssetId = edcDtrAssetService.createSubmodelAssetRequest(traceabilityProperties.getSubmodelBase()+ "/api/submodel/data", SUBMODEL_ASSET_NAME); -// } catch (CreateEdcAssetException e) { -// throw new RuntimeException(e); -// } -// log.info("Submodel Asset Id created :{}", submodelAssetId); + String submodelAssetId = null; -// String submodelContractId = null; -// try { -// submodelContractId = edcDtrContractDefinitionService.createContractDefinition(submodelAssetId, createdPolicyId); -// } catch (CreateEdcContractDefinitionException e) { -// throw new RuntimeException(e); -// } -// log.info("Submodel Contract Id created :{}", submodelContractId); + try { + submodelAssetId = edcDtrAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase()+ "/api/submodel/data", SUBMODEL_ASSET_NAME); + } catch (CreateEdcAssetException e) { + throw new RuntimeException(e); + } + log.info("Submodel Asset Id created :{}", submodelAssetId); + + String submodelContractId = null; + try { + submodelContractId = edcDtrContractDefinitionService.createContractDefinition(submodelAssetId, createdPolicyId); + } catch (CreateEdcContractDefinitionException e) { + throw new RuntimeException(e); + } + log.info("Submodel Contract Id created :{}", submodelContractId); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java index e4deb64390..db0dde06d5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java @@ -97,13 +97,9 @@ public RestTemplate edcDtrAssetRestTemplate(@Autowired EdcProperties edcProperti } @Bean - public RestTemplate digitalTwinRegistryCreateShellRestTemplate( - final RestTemplateBuilder restTemplateBuilder, - @Value("${digitalTwinRegistryClient.oAuthClientId}") final String clientRegistrationId) { - oAuthRestTemplate(restTemplateBuilder, - clientRegistrationId).build(); - return oAuthRestTemplate(restTemplateBuilder, - clientRegistrationId).build(); + public RestTemplate digitalTwinRegistryCreateShellRestTemplate() { + return new RestTemplateBuilder() + .build(); } /* RestTemplate used by trace x for the notification transfer to the edc controlplane including edc api key*/ diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/model/SubmodelPayloadEntity.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/model/SubmodelPayloadEntity.java index 916e9d90e4..4a520fc885 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/model/SubmodelPayloadEntity.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/model/SubmodelPayloadEntity.java @@ -18,7 +18,6 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.submodel.infrastructure.model; -import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.FetchType; import jakarta.persistence.GeneratedValue; @@ -54,12 +53,12 @@ public class SubmodelPayloadEntity { private String json; - @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL) + @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "asset_as_built_id") @ToString.Exclude public AssetAsBuiltEntity assetAsBuilt; - @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL) + @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "asset_as_planned_id") @ToString.Exclude private AssetAsPlannedEntity assetAsPlanned; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/JpaSubmodelPayloadRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/JpaSubmodelPayloadRepository.java index 3c61739a22..38dec7549f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/JpaSubmodelPayloadRepository.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/JpaSubmodelPayloadRepository.java @@ -19,9 +19,17 @@ package org.eclipse.tractusx.traceability.submodel.infrastructure.repository; +import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.model.AssetAsBuiltEntity; +import org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.model.AssetAsPlannedEntity; import org.eclipse.tractusx.traceability.submodel.infrastructure.model.SubmodelPayloadEntity; import org.springframework.data.jpa.repository.JpaRepository; +import java.util.List; + public interface JpaSubmodelPayloadRepository extends JpaRepository { + List findByAssetAsBuilt(AssetAsBuiltEntity assetAsBuilt); + + List findByAssetAsPlanned(AssetAsPlannedEntity assetAsPlanned); + } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java index 24c8771d32..2a73a90034 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java @@ -32,6 +32,8 @@ import java.util.List; import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; @Repository @RequiredArgsConstructor @@ -56,6 +58,19 @@ public void savePayloadForAssetAsPlanned(String assetId, List s @Override public Map getTypesAndPayloadsByAssetId(String assetId) { - return null; // TODO implement + Optional assetAsBuilt = jpaAssetAsBuiltRepository.findById(assetId); + Optional assetAsPlanned = jpaAssetAsPlannedRepository.findById(assetId); + + if(assetAsBuilt.isPresent()) { + return toTypesAndPayloadsMap(jpaSubmodelPayloadRepository.findByAssetAsBuilt(assetAsBuilt.get())); + } else if (assetAsPlanned.isPresent()) { + return toTypesAndPayloadsMap(jpaSubmodelPayloadRepository.findByAssetAsPlanned(assetAsPlanned.get())); + } + throw new AssetNotFoundException(ASSET_NOT_FOUND_EXCEPTION_TEMPLATE.formatted(assetId)); + } + + private Map toTypesAndPayloadsMap(List entities) { + return entities.stream().map(entity -> Map.entry(entity.getAspectType(), entity.getJson())) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); } } diff --git a/tx-backend/src/main/resources/application-integration-spring-boot.yml b/tx-backend/src/main/resources/application-integration-spring-boot.yml index 7d5f24adcc..5cef1a7837 100644 --- a/tx-backend/src/main/resources/application-integration-spring-boot.yml +++ b/tx-backend/src/main/resources/application-integration-spring-boot.yml @@ -29,10 +29,14 @@ traceability: adminApiKey: testAdminKey regularApiKey: testRegularKey irsBase: "http://127.0.0.1" - submodelBase: "http://127.0.0.1" + submodelBase: http://localhost:${server.port} +registry: + urlWithPath: "http://127.0.0.1" edc: api-auth-key: "integration-tests" + parts-provider-edc-controlplane-url: "http://127.0.0.1" + parts-provider-edc-dataplane-url: "http://127.0.0.1" spring: security: diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepositoryIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepositoryIT.java new file mode 100644 index 0000000000..b1145e4610 --- /dev/null +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepositoryIT.java @@ -0,0 +1,73 @@ +package org.eclipse.tractusx.traceability.assets.domain.importpoc.repository; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportRequest; +import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.repository.JpaAssetAsBuiltRepository; +import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.GenericSubmodel; +import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; +import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import static org.assertj.core.api.Assertions.assertThat; + +class SubmodelPayloadRepositoryIT extends IntegrationTestSpecification { + + @Autowired + JpaAssetAsBuiltRepository assetAsBuiltRepository; + @Autowired + AssetsSupport assetsSupport; + + @Autowired + SubmodelPayloadRepository submodelPayloadRepository; + @Autowired + JpaAssetAsBuiltRepository jpaAssetAsBuiltRepository; + + ObjectMapper objectMapper; + + @BeforeEach + @Transactional + void setUp() { + objectMapper = new ObjectMapper(); + objectMapper.registerModule(new JavaTimeModule()); + } + + @Test + void givenAssetAsBuilt_when() throws IOException { + // given + String filePath = "src/test/resources/testdata/import-request.json"; + + String jsonString = Files.readString(Path.of(filePath)); + String assetId = "urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb"; + ImportRequest importRequest = objectMapper.readValue(jsonString, ImportRequest.class); + List submodels = importRequest.assets().stream() + .filter(asset -> Objects.equals(asset.assetMetaInfoRequest().catenaXId(), assetId)).findFirst() + .map(ImportRequest.AssetImportRequest::submodels).get(); + + + assetsSupport.defaultAssetsStored(); + jpaAssetAsBuiltRepository.findAll(); + submodelPayloadRepository.savePayloadForAssetAsBuilt(assetId, submodels); + importRequest.assets().stream().map(it -> it.assetMetaInfoRequest().catenaXId()).toList(); + + + // when + Map result = submodelPayloadRepository.getTypesAndPayloadsByAssetId(assetId); + + // then + assertThat(result).isNotNull(); + } + +} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractServiceTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractServiceTest.java index 78f632137e..95fa03102e 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractServiceTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/notificationcontract/service/EdcNotificationContractServiceTest.java @@ -26,6 +26,7 @@ import org.eclipse.tractusx.irs.edc.client.asset.model.exception.DeleteEdcAssetException; import org.eclipse.tractusx.irs.edc.client.contract.model.exception.CreateEdcContractDefinitionException; import org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractDefinitionService; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcCreatePolicyDefinitionRequest; import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; import org.eclipse.tractusx.irs.edc.client.policy.model.exception.DeleteEdcPolicyDefinitionException; import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; @@ -127,7 +128,7 @@ void givenService_whenPolicyDefinitionServiceThrowsException_thenThrowException( when(edcNotificationAssetService.createNotificationAsset(any(), any(), any(), any())).thenReturn(notificationAssetId); when(traceabilityProperties.getUrl()).thenReturn("https://test"); when(traceabilityProperties.getRightOperand()).thenReturn(rightOperand); - doThrow(CreateEdcPolicyDefinitionException.class).when(edcPolicyDefinitionService).createAccessPolicy(any()); + doThrow(CreateEdcPolicyDefinitionException.class).when(edcPolicyDefinitionService).createAccessPolicy(any(String.class)); // when/then assertThrows(CreateNotificationContractException.class, () -> edcNotificationContractService.handle(request)); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/config/RestitoConfig.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/config/RestitoConfig.java index bff127a847..9d22fbe9ac 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/config/RestitoConfig.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/config/RestitoConfig.java @@ -58,6 +58,8 @@ public void initialize(ConfigurableApplicationContext configurableApplicationCon "feign.registryApi.url=http://127.0.0.1:" + STUB_SERVER_PORT, "feign.registryApi.defaultBpn=BPNL00000003AYRE", "edc.provider-edc-url=http://localhost:" + STUB_SERVER_PORT, + "registry.urlWithPath=http://127.0.0.1:" + STUB_SERVER_PORT + "/semantics/registry/api/v3.0", + "edc.parts-provider-edc-controlplane-url=http://localhost:" + STUB_SERVER_PORT, "edc.callbackUrls=http://localhost:" + STUB_SERVER_PORT + "/callback/redirect" ).applyTo(configurableApplicationContext.getEnvironment()); } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DtrApiSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DtrApiSupport.java new file mode 100644 index 0000000000..615c4071e5 --- /dev/null +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DtrApiSupport.java @@ -0,0 +1,52 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.integration.common.support; + +import org.glassfish.grizzly.http.util.HttpStatus; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import static com.xebialabs.restito.builder.stub.StubHttp.whenHttp; +import static com.xebialabs.restito.builder.verify.VerifyHttp.verifyHttp; +import static com.xebialabs.restito.semantics.Action.status; +import static com.xebialabs.restito.semantics.Condition.post; + +//https://registry.net/semantics/registry/api/v3.0 +@Component +public class DtrApiSupport { + + @Autowired + RestitoProvider restitoProvider; + + public void dtrWillCreateShell() { + whenHttp(restitoProvider.stubServer()).match( + post("/semantics/registry/api/v3.0") + ).then( + status(HttpStatus.CREATED_201) + ); + } + + public void verityDtrCreateShellCalledTimes(int times) { + verifyHttp(restitoProvider.stubServer()).times( + times, + post("/semantics/registry/api/v3.0") + ); + } +} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java index bd1d6686a9..f1e10291b6 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java @@ -52,6 +52,15 @@ public void edcWillCreateNotificationAsset() { ); } + public void edcWillCreateAsset() { + whenHttp(restitoProvider.stubServer()).match( + post("/management/v3/assets"), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.OK_200) + ); + } + public void edcWillRemoveNotificationAsset() { whenHttp(restitoProvider.stubServer()).match( method(DELETE), diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/OAuth2ApiSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/OAuth2ApiSupport.java index bcc1b51794..48a8268012 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/OAuth2ApiSupport.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/OAuth2ApiSupport.java @@ -46,6 +46,17 @@ public void oauth2ApiReturnsTechnicalUserToken() { ); } + public void oauth2ApiReturnsDtrToken() { + whenHttp(restitoProvider.stubServer()).match( + post(RestitoConfig.OAUTH2_TOKEN_PATH) + ) + .then( + ok(), + header("Content-Type", "application/json"), + restitoProvider.jsonResponseFromFile("./stubs/oauth/post/auth/realms/CX-Central/protocol/openid-connect/token/response_200.json") + ); + } + public void oauth2ApiReturnsJwkCerts(String jwk) { whenHttp(restitoProvider.stubServer()).match( get(RestitoConfig.OAUTH2_JWK_PATH) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index a10682553a..5921ca520e 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -36,6 +36,9 @@ import org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.repository.JpaAssetAsPlannedRepository; import org.eclipse.tractusx.traceability.common.security.JwtRole; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; +import org.eclipse.tractusx.traceability.integration.common.support.DtrApiSupport; +import org.eclipse.tractusx.traceability.integration.common.support.EdcSupport; +import org.eclipse.tractusx.traceability.integration.common.support.OAuth2ApiSupport; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.Test; @@ -60,6 +63,15 @@ class ImportControllerIT extends IntegrationTestSpecification { @Autowired JpaAssetAsPlannedRepository jpaAssetAsPlannedRepository; + @Autowired + EdcSupport edcApiSupport; + + @Autowired + OAuth2ApiSupport oAuth2ApiSupport; + + @Autowired + DtrApiSupport dtrApiSupport; + @Test void givenValidFile_whenImportData_thenValidationShouldPass() throws JoseException { // given @@ -380,7 +392,7 @@ void givenInvalidAspect_whenImportData_thenValidationShouldNotPass() throws Jose .body("jobId", Matchers.notNullValue()); } -// @Test + @Test void givenValidFile_whenPublishData_thenStatusShouldChangeToInSynchronization() throws JoseException { // given String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); @@ -397,6 +409,13 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInSynchronization() RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("Trace-X policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); + edcApiSupport.edcWillCreatePolicyDefinition(); + edcApiSupport.edcWillCreateAsset(); + edcApiSupport.edcWillCreateContractDefinition(); + oAuth2ApiSupport.oauth2ApiReturnsTechnicalUserToken(); + oAuth2ApiSupport.oauth2ApiReturnsDtrToken(); + dtrApiSupport.dtrWillCreateShell(); + // when given() .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) @@ -411,7 +430,7 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInSynchronization() AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); assertThat("Trace-X policy").isEqualTo(asset.getPolicyId()); assertThat(ImportState.IN_SYNCHRONIZATION).isEqualTo(asset.getImportState()); - + dtrApiSupport.verityDtrCreateShellCalledTimes(1); } @Test diff --git a/tx-backend/src/test/resources/testdata/import-request.json b/tx-backend/src/test/resources/testdata/import-request.json index 579f9a98f3..62711da288 100644 --- a/tx-backend/src/test/resources/testdata/import-request.json +++ b/tx-backend/src/test/resources/testdata/import-request.json @@ -2,7 +2,7 @@ "assets" : [ { "assetMetaInfo" : { - "catenaXId" : "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd" + "catenaXId" : "urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb" }, "submodels" : [ { @@ -26,7 +26,7 @@ "date" : "2018-09-28T04:15:57.000Z", "country" : "DEU" }, - "catenaXId" : "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd", + "catenaXId" : "urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb", "partTypeInformation" : { "manufacturerPartId" : "22782277-50", "customerPartId" : "22782277-50", @@ -39,7 +39,7 @@ { "aspectType" : "urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt", "payload" : { - "catenaXId" : "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd", + "catenaXId" : "urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb", "childItems" : [ { "quantity" : { @@ -58,7 +58,7 @@ { "aspectType" : "urn:bamm:io.catenax.single_level_usage_as_built:2.0.0#SingleLevelUsageAsBuilt", "payload" : { - "catenaXId" : "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd", + "catenaXId" : "urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb", "customers" : [ { "parentItems" : [ From fed4af0608b38383be7a978163adcb8b7b08fe7e Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Mar 2024 14:51:07 +0100 Subject: [PATCH 03/44] feature(tx-backend): #536 integration test for subsequential flow --- .../traceability/integration/importdata/ImportControllerIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index 5921ca520e..342abf518b 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -426,7 +426,7 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInSynchronization() .then() .statusCode(201); - //then + // then AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); assertThat("Trace-X policy").isEqualTo(asset.getPolicyId()); assertThat(ImportState.IN_SYNCHRONIZATION).isEqualTo(asset.getImportState()); From 322f6711f80fd48fbd92c0ad198fb72be8d12f07 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Mar 2024 23:17:32 +0100 Subject: [PATCH 04/44] feature(tx-backend): #536 testing env config --- charts/traceability-foss/values.yaml | 3 ++- .../importpoc/validation/JsonFileValidator.java | 3 +-- .../assets/domain/importpoc/service/DtrService.java | 8 ++++---- tx-backend/src/main/resources/application.yml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index c92fa33342..b8abee4edc 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -293,7 +293,8 @@ backend: callbackUrl: "CHANGEME" # example: http://:8181/internal/endpoint-data-reference callbackUrlEdcClient: "CHANGEME" # example: https:///api/internal/endpoint-data-reference dataEndpointUrl: "CHANGEME" # example: https:///management" - partsProviderUrl: "CHANGEME" # host of the parts provider EDC + partsProviderControlplaneUrl: "CHANGEME" # host of the parts provider EDC + partsProviderDataplaneUrl: "CHANGEME" discoveryfinder: baseUrl: "CHANGEME" # example: https://discoveryfinder.net/discoveryfinder/api/administration/connectors/discovery/search diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java index ccbe627639..e62841b0f8 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/validation/JsonFileValidator.java @@ -157,8 +157,7 @@ private URL getSchemaUrl(String schemaName) { throw new NotSupportedSchemaException(schemaName); } - URL url = JsonFileValidator.class.getResource(schemaPath); - return url; + return JsonFileValidator.class.getResource(schemaPath); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 4162b9934f..4167e7267e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -46,6 +46,7 @@ @RequiredArgsConstructor public class DtrService { private static final String GLOBAL_REFERENCE = "GlobalReference"; + private static final String EXTERNAL_REFERENCE = "ExternalReference"; private final DigitalTwinRegistryCreateShellService dtrCreateShellService; private final SubmodelPayloadRepository submodelPayloadRepository; @@ -80,7 +81,7 @@ private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodel .id(submodelServerIdReference.toString()) .semanticId( Reference.builder() - .type("ExternalReference") + .type(EXTERNAL_REFERENCE) .keys( List.of(SemanticId.builder() .type(GLOBAL_REFERENCE) @@ -93,7 +94,6 @@ private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodel .interfaceInformation("SUBMODEL-3.0") .protocolInformation( ProtocolInformation.builder() - // TODO: Dataplane from application yaml config .href(edcProperties.getPartsProviderEdcDataplaneUrl() + "/api/public/data/" + submodelServerIdReference) .endpointProtocol("HTTP") .endpointProtocolVersion(List.of("1.1")) @@ -143,7 +143,7 @@ List aasIdentifiersFromAsset(AssetBase assetBase) { .value(assetBase.getManufacturerId()) .externalSubjectId( Reference.builder() - .type("ExternalReference") + .type(EXTERNAL_REFERENCE) .keys(getExternalSubjectIds()) .build()) .build(), @@ -152,7 +152,7 @@ List aasIdentifiersFromAsset(AssetBase assetBase) { .value(assetBase.getManufacturerPartId()) .externalSubjectId( Reference.builder() - .type("ExternalReference") + .type(EXTERNAL_REFERENCE) .keys(getExternalSubjectIds()) .build()) .build() diff --git a/tx-backend/src/main/resources/application.yml b/tx-backend/src/main/resources/application.yml index 087ed04b72..b8b28b46ab 100644 --- a/tx-backend/src/main/resources/application.yml +++ b/tx-backend/src/main/resources/application.yml @@ -47,8 +47,8 @@ edc: api-auth-key: ${EDC_API_KEY} bpn-provider-url-mappings: { } provider-edc-url: ${EDC_PROVIDER_URL} - parts-provider-edc-controlplane-url: ${PARTS_EDC_PROVIDER_CONTROLPLANE_URL:https://provider-edc-controlplane.net} - parts-provider-edc-dataplane-url: ${PARTS_EDC_PROVIDER_DATAPLANE_URL:https://provider-edc-dataplane.net} + parts-provider-edc-controlplane-url: ${EDC_PARTS_PROVIDER_CONTROLPLANE_URL:https://provider-edc-controlplane.net} + parts-provider-edc-dataplane-url: ${EDC_PARTS_PROVIDER_DATAPLANE_URL:https://provider-edc-dataplane.net} callback-urls: ${EDC_CALLBACK_URL} From a407e10695fb109c1270f996528c3a4f4a870ef0 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 5 Mar 2024 23:54:31 +0100 Subject: [PATCH 05/44] feature(tx-backend): #536 testing test with override --- .../service/EdcAssetCreationService.java | 3 +- .../common/config/ApplicationConfig.java | 4 +- .../config/TestContractDefinitionService.java | 42 +++++++++++++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index 443b17401b..05a4505c12 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -27,6 +27,7 @@ import org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractDefinitionService; import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; +import org.eclipse.tractusx.traceability.common.config.TestContractDefinitionService; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -39,7 +40,7 @@ public class EdcAssetCreationService { private static final String SUBMODEL_ASSET_NAME = "submodel-asset"; private final EdcAssetService edcDtrAssetService; private final EdcPolicyDefinitionService edcDtrPolicyDefinitionService; - private final EdcContractDefinitionService edcDtrContractDefinitionService; + private final TestContractDefinitionService edcDtrContractDefinitionService; private final TraceabilityProperties traceabilityProperties; @Value("${registry.urlWithPath}") String registryUrlWithPath = null; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java index baf3d6e897..56922ea751 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java @@ -244,8 +244,8 @@ public EdcPolicyDefinitionService edcDtrPolicyDefinitionService(EdcConfiguration } @Bean - public EdcContractDefinitionService edcDtrContractDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { - return new EdcContractDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); + public TestContractDefinitionService edcDtrContractDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { + return new TestContractDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); } @Bean diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java new file mode 100644 index 0000000000..ca2cfc842d --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java @@ -0,0 +1,42 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.common.config; + +import org.eclipse.tractusx.irs.edc.client.EdcConfiguration; +import org.eclipse.tractusx.irs.edc.client.asset.model.EdcContext; +import org.eclipse.tractusx.irs.edc.client.contract.model.EdcContractDefinitionCriteria; +import org.eclipse.tractusx.irs.edc.client.contract.model.EdcCreateContractDefinitionRequest; +import org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractDefinitionService; +import org.springframework.web.client.RestTemplate; + +import java.util.UUID; + +public class TestContractDefinitionService extends EdcContractDefinitionService { + public TestContractDefinitionService(EdcConfiguration config, RestTemplate restTemplate) { + super(config, restTemplate); + } + + @Override + public EdcCreateContractDefinitionRequest createContractDefinitionRequest(String assetId, String accessPolicyId) { + EdcContractDefinitionCriteria edcContractDefinitionCriteria = EdcContractDefinitionCriteria.builder().type("CriterionDto").operandLeft("https://w3id.org/edc/v0.0.1/ns/id").operandRight(assetId).operator("=").build(); + EdcContext edcContext = EdcContext.builder().edc("https://w3id.org/edc/v0.0.1/ns/").build(); + return EdcCreateContractDefinitionRequest.builder().contractPolicyId(accessPolicyId).edcContext(edcContext).type("ContractDefinition").accessPolicyId(accessPolicyId).contractDefinitionId(UUID.randomUUID().toString()).assetsSelector(edcContractDefinitionCriteria).build(); + } +} From 01122a3762de21e7936ed056da15e7061a62123b Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Mar 2024 01:12:51 +0100 Subject: [PATCH 06/44] feature(tx-backend): #536 testing with adjustments to lib code --- .../service/EdcAssetCreationService.java | 6 +- .../common/config/ApplicationConfig.java | 8 +- .../config/TestContractDefinitionService.java | 50 ++++++- .../common/config/TestEdcAssetService.java | 134 ++++++++++++++++++ .../config/TestPolicyDefinitionService.java | 115 +++++++++++++++ .../common/support/EdcSupport.java | 9 ++ .../importdata/ImportControllerIT.java | 41 ++++++ 7 files changed, 352 insertions(+), 11 deletions(-) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index 05a4505c12..6fc14ea75b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -28,6 +28,8 @@ import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; import org.eclipse.tractusx.traceability.common.config.TestContractDefinitionService; +import org.eclipse.tractusx.traceability.common.config.TestEdcAssetService; +import org.eclipse.tractusx.traceability.common.config.TestPolicyDefinitionService; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -38,8 +40,8 @@ public class EdcAssetCreationService { private static final String REGISTRY_ASSET_NAME = "registry-asset"; private static final String SUBMODEL_ASSET_NAME = "submodel-asset"; - private final EdcAssetService edcDtrAssetService; - private final EdcPolicyDefinitionService edcDtrPolicyDefinitionService; + private final TestEdcAssetService edcDtrAssetService; + private final TestPolicyDefinitionService edcDtrPolicyDefinitionService; private final TestContractDefinitionService edcDtrContractDefinitionService; private final TraceabilityProperties traceabilityProperties; @Value("${registry.urlWithPath}") diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java index 56922ea751..1e23c843e5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java @@ -234,13 +234,13 @@ public EdcContractDefinitionService edcContractDefinitionService(EdcConfiguratio } @Bean - public EdcAssetService edcDtrAssetService(EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcDtrAssetRestTemplate) { - return new EdcAssetService(edcTransformer, edcConfiguration, edcDtrAssetRestTemplate); + public TestEdcAssetService edcDtrAssetService(EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcDtrAssetRestTemplate) { + return new TestEdcAssetService(edcTransformer, edcConfiguration, edcDtrAssetRestTemplate); } @Bean - public EdcPolicyDefinitionService edcDtrPolicyDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { - return new EdcPolicyDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); + public TestPolicyDefinitionService edcDtrPolicyDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { + return new TestPolicyDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); } @Bean diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java index ca2cfc842d..b83f8f318c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java @@ -19,24 +19,64 @@ package org.eclipse.tractusx.traceability.common.config; +import lombok.Generated; import org.eclipse.tractusx.irs.edc.client.EdcConfiguration; import org.eclipse.tractusx.irs.edc.client.asset.model.EdcContext; import org.eclipse.tractusx.irs.edc.client.contract.model.EdcContractDefinitionCriteria; import org.eclipse.tractusx.irs.edc.client.contract.model.EdcCreateContractDefinitionRequest; +import org.eclipse.tractusx.irs.edc.client.contract.model.exception.CreateEdcContractDefinitionException; import org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractDefinitionService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; +import org.springframework.http.ResponseEntity; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; import java.util.UUID; -public class TestContractDefinitionService extends EdcContractDefinitionService { - public TestContractDefinitionService(EdcConfiguration config, RestTemplate restTemplate) { - super(config, restTemplate); +public class TestContractDefinitionService { + @Generated + private static final Logger log = LoggerFactory.getLogger(EdcContractDefinitionService.class); + private static final String ASSET_SELECTOR_ID = "https://w3id.org/edc/v0.0.1/ns/id"; + private static final String ASSET_SELECTOR_EQUALITY_OPERATOR = "="; + private static final String ASSET_SELECTOR_TYPE = "CriterionDto"; + private static final String CONTRACT_DEFINITION_TYPE = "ContractDefinition"; + private final EdcConfiguration config; + private final RestTemplate restTemplate; + + public String createContractDefinition(String assetId, String policyId) throws CreateEdcContractDefinitionException { + EdcCreateContractDefinitionRequest createContractDefinitionRequest = this.createContractDefinitionRequest(assetId, policyId); + + try { + ResponseEntity createContractDefinitionResponse = this.restTemplate.postForEntity(this.config.getControlplane().getEndpoint().getContractDefinition(), createContractDefinitionRequest, String.class, new Object[0]); + HttpStatusCode responseCode = createContractDefinitionResponse.getStatusCode(); + if (responseCode.value() == HttpStatus.OK.value()) { + return policyId; + } else { + throw new CreateEdcContractDefinitionException("Failed to create EDC contract definition for %s notification asset id".formatted(assetId)); + } + } catch (HttpClientErrorException var6) { + if (var6.getStatusCode().value() == HttpStatus.CONFLICT.value()) { + log.info("{} contract definition already exists in the EDC", policyId); + return policyId; + } + log.error("Failed to create edc contract definition for {} notification asset and {} policy definition id. Reason: ", new Object[]{assetId, policyId, var6}); + throw new CreateEdcContractDefinitionException(var6); + } } - @Override public EdcCreateContractDefinitionRequest createContractDefinitionRequest(String assetId, String accessPolicyId) { EdcContractDefinitionCriteria edcContractDefinitionCriteria = EdcContractDefinitionCriteria.builder().type("CriterionDto").operandLeft("https://w3id.org/edc/v0.0.1/ns/id").operandRight(assetId).operator("=").build(); EdcContext edcContext = EdcContext.builder().edc("https://w3id.org/edc/v0.0.1/ns/").build(); - return EdcCreateContractDefinitionRequest.builder().contractPolicyId(accessPolicyId).edcContext(edcContext).type("ContractDefinition").accessPolicyId(accessPolicyId).contractDefinitionId(UUID.randomUUID().toString()).assetsSelector(edcContractDefinitionCriteria).build(); + return EdcCreateContractDefinitionRequest.builder().contractPolicyId(accessPolicyId).edcContext(edcContext).type("ContractDefinition").accessPolicyId(accessPolicyId).contractDefinitionId(accessPolicyId).assetsSelector(edcContractDefinitionCriteria).build(); + } + + @Generated + public TestContractDefinitionService(EdcConfiguration config, RestTemplate restTemplate) { + this.config = config; + this.restTemplate = restTemplate; } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java new file mode 100644 index 0000000000..2a93348b86 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java @@ -0,0 +1,134 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.common.config; + +import jakarta.json.JsonObject; +import lombok.Generated; +import lombok.RequiredArgsConstructor; +import org.eclipse.edc.spi.types.domain.DataAddress; +import org.eclipse.edc.spi.types.domain.asset.Asset; +import org.eclipse.tractusx.irs.edc.client.EdcConfiguration; +import org.eclipse.tractusx.irs.edc.client.asset.EdcAssetService; +import org.eclipse.tractusx.irs.edc.client.asset.model.NotificationMethod; +import org.eclipse.tractusx.irs.edc.client.asset.model.NotificationType; +import org.eclipse.tractusx.irs.edc.client.asset.model.exception.CreateEdcAssetException; +import org.eclipse.tractusx.irs.edc.client.asset.model.exception.DeleteEdcAssetException; +import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; +import org.springframework.http.ResponseEntity; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.util.UriComponentsBuilder; + +import java.util.Map; +import java.util.UUID; + +@RequiredArgsConstructor +public class TestEdcAssetService{ + @Generated + private static final Logger log = LoggerFactory.getLogger(TestEdcAssetService.class); + private static final String DEFAULT_CONTENT_TYPE = "application/json"; + private static final String DEFAULT_POLICY_ID = "use-eu"; + private static final String DEFAULT_METHOD = "POST"; + private static final String ASSET_CREATION_DATA_ADDRESS_BASE_URL = "https://w3id.org/edc/v0.0.1/ns/baseUrl"; + private static final String ASSET_CREATION_DATA_ADDRESS_PROXY_METHOD = "https://w3id.org/edc/v0.0.1/ns/proxyMethod"; + private static final String ASSET_CREATION_DATA_ADDRESS_PROXY_BODY = "https://w3id.org/edc/v0.0.1/ns/proxyBody"; + private static final String ASSET_CREATION_DATA_ADDRESS_PROXY_PATH = "https://w3id.org/edc/v0.0.1/ns/proxyPath"; + private static final String ASSET_CREATION_DATA_ADDRESS_PROXY_QUERY_PARAMS = "https://w3id.org/edc/v0.0.1/ns/proxyQueryParams"; + private static final String ASSET_CREATION_DATA_ADDRESS_METHOD = "https://w3id.org/edc/v0.0.1/ns/method"; + private static final String ASSET_CREATION_PROPERTY_DESCRIPTION = "https://w3id.org/edc/v0.0.1/ns/description"; + private static final String ASSET_CREATION_PROPERTY_CONTENT_TYPE = "https://w3id.org/edc/v0.0.1/ns/contenttype"; + private static final String ASSET_CREATION_PROPERTY_POLICY_ID = "https://w3id.org/edc/v0.0.1/ns/policy-id"; + private static final String ASSET_CREATION_PROPERTY_TYPE = "https://w3id.org/edc/v0.0.1/ns/type"; + private static final String ASSET_CREATION_PROPERTY_NOTIFICATION_TYPE = "https://w3id.org/edc/v0.0.1/ns/notificationtype"; + private static final String ASSET_CREATION_PROPERTY_NOTIFICATION_METHOD = "https://w3id.org/edc/v0.0.1/ns/notificationmethod"; + private final EdcTransformer edcTransformer; + private final EdcConfiguration config; + private final RestTemplate restTemplate; + + public String createNotificationAsset(String baseUrl, String assetName, NotificationMethod notificationMethod, NotificationType notificationType) throws CreateEdcAssetException { + Asset request = this.createNotificationAssetRequest(assetName, baseUrl, notificationMethod, notificationType); + return this.sendRequest(request); + } + + public String createDtrAsset(String baseUrl, String assetId) throws CreateEdcAssetException { + Asset request = this.createDtrAssetRequest(assetId, baseUrl); + return this.sendRequest(request); + } + + public String createSubmodelAsset(String baseUrl, String assetId) throws CreateEdcAssetException { + Asset request = this.createSubmodelAssetRequest(assetId, baseUrl); + return this.sendRequest(request); + } + + private String sendRequest(Asset request) throws CreateEdcAssetException { + JsonObject transformedPayload = this.edcTransformer.transformAssetToJson(request); + + try { + ResponseEntity createEdcDataAssetResponse = this.restTemplate.postForEntity(this.config.getControlplane().getEndpoint().getAsset(), transformedPayload.toString(), String.class, new Object[0]); + HttpStatusCode responseCode = createEdcDataAssetResponse.getStatusCode(); + + if (responseCode.value() == HttpStatus.OK.value()) { + return request.getId(); + } + } catch (HttpClientErrorException var5) { + if(var5.getStatusCode().value() == HttpStatus.CONFLICT.value()) { + return request.getId(); + } + throw new CreateEdcAssetException(var5); + } + + throw new CreateEdcAssetException("Failed to create asset %s".formatted(request.getId())); + } + + public void deleteAsset(String assetId) throws DeleteEdcAssetException { + String deleteUri = UriComponentsBuilder.fromPath(this.config.getControlplane().getEndpoint().getAsset()).pathSegment(new String[]{"{notificationAssetId}"}).buildAndExpand(new Object[]{assetId}).toUriString(); + + try { + this.restTemplate.delete(deleteUri, new Object[0]); + } catch (RestClientException var4) { + log.error("Failed to delete EDC notification asset {}. Reason: ", assetId, var4); + throw new DeleteEdcAssetException(var4); + } + } + + private Asset createNotificationAssetRequest(String assetName, String baseUrl, NotificationMethod notificationMethod, NotificationType notificationType) { + String assetId = UUID.randomUUID().toString(); + Map properties = Map.of("https://w3id.org/edc/v0.0.1/ns/description", assetName, "https://w3id.org/edc/v0.0.1/ns/contenttype", "application/json", "https://w3id.org/edc/v0.0.1/ns/policy-id", "use-eu", "https://w3id.org/edc/v0.0.1/ns/type", notificationType.getValue(), "https://w3id.org/edc/v0.0.1/ns/notificationtype", notificationType.getValue(), "https://w3id.org/edc/v0.0.1/ns/notificationmethod", notificationMethod.getValue()); + DataAddress dataAddress = DataAddress.Builder.newInstance().type("HttpData").property("https://w3id.org/edc/v0.0.1/ns/type", "HttpData").property("https://w3id.org/edc/v0.0.1/ns/baseUrl", baseUrl).property("https://w3id.org/edc/v0.0.1/ns/proxyMethod", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyBody", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/method", "POST").build(); + return org.eclipse.edc.spi.types.domain.asset.Asset.Builder.newInstance().id(assetId).contentType("Asset").properties(properties).dataAddress(dataAddress).build(); + } + + private Asset createDtrAssetRequest(String assetId, String baseUrl) { + Map properties = Map.of("https://w3id.org/edc/v0.0.1/ns/description", "Digital Twin Registry Asset", "https://w3id.org/edc/v0.0.1/ns/type", "data.core.digitalTwinRegistry"); + DataAddress dataAddress = DataAddress.Builder.newInstance().type("DataAddress").property("https://w3id.org/edc/v0.0.1/ns/type", "HttpData").property("https://w3id.org/edc/v0.0.1/ns/baseUrl", baseUrl).property("https://w3id.org/edc/v0.0.1/ns/proxyMethod", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyBody", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyPath", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyQueryParams", Boolean.TRUE.toString()).build(); + return org.eclipse.edc.spi.types.domain.asset.Asset.Builder.newInstance().id(assetId).contentType("Asset").properties(properties).dataAddress(dataAddress).build(); + } + + private Asset createSubmodelAssetRequest(String assetId, String baseUrl) { + Map properties = Map.of("https://w3id.org/edc/v0.0.1/ns/description", "Submodel Server Asset"); + DataAddress dataAddress = DataAddress.Builder.newInstance().type("DataAddress").property("https://w3id.org/edc/v0.0.1/ns/type", "HttpData").property("https://w3id.org/edc/v0.0.1/ns/baseUrl", baseUrl).property("https://w3id.org/edc/v0.0.1/ns/proxyMethod", Boolean.FALSE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyBody", Boolean.FALSE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyPath", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyQueryParams", Boolean.FALSE.toString()).build(); + return org.eclipse.edc.spi.types.domain.asset.Asset.Builder.newInstance().id(assetId).contentType("Asset").properties(properties).dataAddress(dataAddress).build(); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java new file mode 100644 index 0000000000..90985369ac --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java @@ -0,0 +1,115 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.common.config; + +import lombok.Generated; +import org.eclipse.tractusx.irs.edc.client.EdcConfiguration; +import org.eclipse.tractusx.irs.edc.client.asset.model.OdrlContext; +import org.eclipse.tractusx.irs.edc.client.contract.model.EdcOperator; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcCreatePolicyDefinitionRequest; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicy; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermission; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermissionConstraint; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermissionConstraintExpression; +import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; +import org.eclipse.tractusx.irs.edc.client.policy.model.exception.DeleteEdcPolicyDefinitionException; +import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; +import org.springframework.http.ResponseEntity; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.util.UriComponentsBuilder; + +import java.util.List; +import java.util.UUID; + +public class TestPolicyDefinitionService { + @Generated + private static final Logger log = LoggerFactory.getLogger(TestPolicyDefinitionService.class); + private static final String USE_ACTION = "USE"; + private static final String POLICY_TYPE = "Policy"; + private static final String POLICY_DEFINITION_TYPE = "PolicyDefinitionRequestDto"; + private static final String ATOMIC_CONSTRAINT = "AtomicConstraint"; + private static final String CONSTRAINT = "Constraint"; + private static final String OPERATOR_PREFIX = "odrl:"; + private final EdcConfiguration config; + private final RestTemplate restTemplate; + + public String createAccessPolicy(String policyName) throws CreateEdcPolicyDefinitionException { + String accessPolicyId = UUID.randomUUID().toString(); + return this.createAccessPolicy(policyName, accessPolicyId); + } + + public String createAccessPolicy(String policyName, String policyId) throws CreateEdcPolicyDefinitionException { + EdcCreatePolicyDefinitionRequest request = this.createPolicyDefinition(policyName, policyId); + return this.createAccessPolicy(request); + } + + public String createAccessPolicy(EdcCreatePolicyDefinitionRequest policyRequest) throws CreateEdcPolicyDefinitionException { + ResponseEntity createPolicyDefinitionResponse; + try { + createPolicyDefinitionResponse = this.restTemplate.postForEntity(this.config.getControlplane().getEndpoint().getPolicyDefinition(), policyRequest, String.class, new Object[0]); + } catch (HttpClientErrorException var4) { + if (var4.getStatusCode().value() == HttpStatus.CONFLICT.value()) { + log.info("Notification asset policy definition already exists in the EDC"); + return policyRequest.getPolicyDefinitionId(); + } + log.error("Failed to create EDC notification asset policy. Reason: ", var4); + throw new CreateEdcPolicyDefinitionException(var4); + } + + HttpStatusCode responseCode = createPolicyDefinitionResponse.getStatusCode(); + if (responseCode.value() == HttpStatus.OK.value()) { + return policyRequest.getPolicyDefinitionId(); + } else { + throw new CreateEdcPolicyDefinitionException("Failed to create EDC policy definition for asset"); + } + } + + public EdcCreatePolicyDefinitionRequest createPolicyDefinition(String policyName, String accessPolicyId) { + EdcPolicyPermissionConstraintExpression constraint = EdcPolicyPermissionConstraintExpression.builder().leftOperand("PURPOSE").rightOperand(policyName).operator(new EdcOperator("odrl:eq")).type("Constraint").build(); + EdcPolicyPermissionConstraint edcPolicyPermissionConstraint = EdcPolicyPermissionConstraint.builder().orExpressions(List.of(constraint)).type("AtomicConstraint").build(); + EdcPolicyPermission odrlPermissions = EdcPolicyPermission.builder().action("USE").edcPolicyPermissionConstraints(edcPolicyPermissionConstraint).build(); + EdcPolicy edcPolicy = EdcPolicy.builder().odrlPermissions(List.of(odrlPermissions)).type("Policy").build(); + OdrlContext odrlContext = OdrlContext.builder().odrl("http://www.w3.org/ns/odrl/2/").build(); + return EdcCreatePolicyDefinitionRequest.builder().policyDefinitionId(accessPolicyId).policy(edcPolicy).odrlContext(odrlContext).type("PolicyDefinitionRequestDto").build(); + } + + public void deleteAccessPolicy(String accessPolicyId) throws DeleteEdcPolicyDefinitionException { + String deleteUri = UriComponentsBuilder.fromPath(this.config.getControlplane().getEndpoint().getPolicyDefinition()).pathSegment(new String[]{"{accessPolicyId}"}).buildAndExpand(new Object[]{accessPolicyId}).toUriString(); + + try { + this.restTemplate.delete(deleteUri, new Object[0]); + } catch (RestClientException var4) { + log.error("Failed to delete EDC notification asset policy {}. Reason: ", accessPolicyId, var4); + throw new DeleteEdcPolicyDefinitionException(var4); + } + } + + @Generated + public TestPolicyDefinitionService(EdcConfiguration config, RestTemplate restTemplate) { + this.config = config; + this.restTemplate = restTemplate; + } +} diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java index f1e10291b6..16e6a6f8bd 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java @@ -99,6 +99,15 @@ public void edcWillCreatePolicyDefinition() { ); } + public void edcWillReturnConflictWhenCreatePolicyDefinition() { + whenHttp(restitoProvider.stubServer()).match( + post("/management/v2/policydefinitions"), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.CONFLICT_409) + ); + } + public void edcWillRemovePolicyDefinition() { whenHttp(restitoProvider.stubServer()).match( composite( diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index 342abf518b..32ad3fd236 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -433,6 +433,47 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInSynchronization() dtrApiSupport.verityDtrCreateShellCalledTimes(1); } + @Test + void givenValidFile2_whenPublishData_thenStatusShouldChangeToInSynchronization() throws JoseException { + // given + String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); + File file = new File(path); + + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .when() + .multiPart(file) + .post("/api/assets/import") + .then() + .statusCode(200) + .extract().as(ImportResponse.class); + + RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("Trace-X policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); + + edcApiSupport.edcWillReturnConflictWhenCreatePolicyDefinition(); + edcApiSupport.edcWillCreateAsset(); + edcApiSupport.edcWillCreateContractDefinition(); + oAuth2ApiSupport.oauth2ApiReturnsTechnicalUserToken(); + oAuth2ApiSupport.oauth2ApiReturnsDtrToken(); + dtrApiSupport.dtrWillCreateShell(); + + // when + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .contentType(ContentType.JSON) + .when() + .body(registerAssetRequest) + .post("/api/assets/publish") + .then() + .statusCode(201); + + // then + AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); + assertThat("Trace-X policy").isEqualTo(asset.getPolicyId()); + assertThat(ImportState.IN_SYNCHRONIZATION).isEqualTo(asset.getImportState()); + dtrApiSupport.verityDtrCreateShellCalledTimes(1); + } + @Test void givenInvalidAssetID_whenPublishData_thenStatusCode404() throws JoseException { // given From 14cab7e9f07ab2516189f3b379722f2a4f6c1963 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Mar 2024 01:20:52 +0100 Subject: [PATCH 07/44] feature(tx-backend): #536 testing with adjustments to lib code --- .../common/config/TestEdcAssetService.java | 34 ++----------------- .../config/TestPolicyDefinitionService.java | 17 +--------- 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java index 2a93348b86..444c5b9d2b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java @@ -25,11 +25,7 @@ import org.eclipse.edc.spi.types.domain.DataAddress; import org.eclipse.edc.spi.types.domain.asset.Asset; import org.eclipse.tractusx.irs.edc.client.EdcConfiguration; -import org.eclipse.tractusx.irs.edc.client.asset.EdcAssetService; -import org.eclipse.tractusx.irs.edc.client.asset.model.NotificationMethod; -import org.eclipse.tractusx.irs.edc.client.asset.model.NotificationType; import org.eclipse.tractusx.irs.edc.client.asset.model.exception.CreateEdcAssetException; -import org.eclipse.tractusx.irs.edc.client.asset.model.exception.DeleteEdcAssetException; import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -37,15 +33,12 @@ import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; -import org.springframework.web.util.UriComponentsBuilder; import java.util.Map; -import java.util.UUID; @RequiredArgsConstructor -public class TestEdcAssetService{ +public class TestEdcAssetService { @Generated private static final Logger log = LoggerFactory.getLogger(TestEdcAssetService.class); private static final String DEFAULT_CONTENT_TYPE = "application/json"; @@ -67,11 +60,6 @@ public class TestEdcAssetService{ private final EdcConfiguration config; private final RestTemplate restTemplate; - public String createNotificationAsset(String baseUrl, String assetName, NotificationMethod notificationMethod, NotificationType notificationType) throws CreateEdcAssetException { - Asset request = this.createNotificationAssetRequest(assetName, baseUrl, notificationMethod, notificationType); - return this.sendRequest(request); - } - public String createDtrAsset(String baseUrl, String assetId) throws CreateEdcAssetException { Asset request = this.createDtrAssetRequest(assetId, baseUrl); return this.sendRequest(request); @@ -93,7 +81,7 @@ private String sendRequest(Asset request) throws CreateEdcAssetException { return request.getId(); } } catch (HttpClientErrorException var5) { - if(var5.getStatusCode().value() == HttpStatus.CONFLICT.value()) { + if (var5.getStatusCode().value() == HttpStatus.CONFLICT.value()) { return request.getId(); } throw new CreateEdcAssetException(var5); @@ -102,24 +90,6 @@ private String sendRequest(Asset request) throws CreateEdcAssetException { throw new CreateEdcAssetException("Failed to create asset %s".formatted(request.getId())); } - public void deleteAsset(String assetId) throws DeleteEdcAssetException { - String deleteUri = UriComponentsBuilder.fromPath(this.config.getControlplane().getEndpoint().getAsset()).pathSegment(new String[]{"{notificationAssetId}"}).buildAndExpand(new Object[]{assetId}).toUriString(); - - try { - this.restTemplate.delete(deleteUri, new Object[0]); - } catch (RestClientException var4) { - log.error("Failed to delete EDC notification asset {}. Reason: ", assetId, var4); - throw new DeleteEdcAssetException(var4); - } - } - - private Asset createNotificationAssetRequest(String assetName, String baseUrl, NotificationMethod notificationMethod, NotificationType notificationType) { - String assetId = UUID.randomUUID().toString(); - Map properties = Map.of("https://w3id.org/edc/v0.0.1/ns/description", assetName, "https://w3id.org/edc/v0.0.1/ns/contenttype", "application/json", "https://w3id.org/edc/v0.0.1/ns/policy-id", "use-eu", "https://w3id.org/edc/v0.0.1/ns/type", notificationType.getValue(), "https://w3id.org/edc/v0.0.1/ns/notificationtype", notificationType.getValue(), "https://w3id.org/edc/v0.0.1/ns/notificationmethod", notificationMethod.getValue()); - DataAddress dataAddress = DataAddress.Builder.newInstance().type("HttpData").property("https://w3id.org/edc/v0.0.1/ns/type", "HttpData").property("https://w3id.org/edc/v0.0.1/ns/baseUrl", baseUrl).property("https://w3id.org/edc/v0.0.1/ns/proxyMethod", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyBody", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/method", "POST").build(); - return org.eclipse.edc.spi.types.domain.asset.Asset.Builder.newInstance().id(assetId).contentType("Asset").properties(properties).dataAddress(dataAddress).build(); - } - private Asset createDtrAssetRequest(String assetId, String baseUrl) { Map properties = Map.of("https://w3id.org/edc/v0.0.1/ns/description", "Digital Twin Registry Asset", "https://w3id.org/edc/v0.0.1/ns/type", "data.core.digitalTwinRegistry"); DataAddress dataAddress = DataAddress.Builder.newInstance().type("DataAddress").property("https://w3id.org/edc/v0.0.1/ns/type", "HttpData").property("https://w3id.org/edc/v0.0.1/ns/baseUrl", baseUrl).property("https://w3id.org/edc/v0.0.1/ns/proxyMethod", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyBody", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyPath", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyQueryParams", Boolean.TRUE.toString()).build(); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java index 90985369ac..b8dfc84e4a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java @@ -29,17 +29,13 @@ import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermissionConstraint; import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermissionConstraintExpression; import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; -import org.eclipse.tractusx.irs.edc.client.policy.model.exception.DeleteEdcPolicyDefinitionException; -import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestClientException; import org.springframework.web.client.RestTemplate; -import org.springframework.web.util.UriComponentsBuilder; import java.util.List; import java.util.UUID; @@ -80,7 +76,7 @@ public String createAccessPolicy(EdcCreatePolicyDefinitionRequest policyRequest) } HttpStatusCode responseCode = createPolicyDefinitionResponse.getStatusCode(); - if (responseCode.value() == HttpStatus.OK.value()) { + if (responseCode.value() == HttpStatus.OK.value()) { return policyRequest.getPolicyDefinitionId(); } else { throw new CreateEdcPolicyDefinitionException("Failed to create EDC policy definition for asset"); @@ -96,17 +92,6 @@ public EdcCreatePolicyDefinitionRequest createPolicyDefinition(String policyName return EdcCreatePolicyDefinitionRequest.builder().policyDefinitionId(accessPolicyId).policy(edcPolicy).odrlContext(odrlContext).type("PolicyDefinitionRequestDto").build(); } - public void deleteAccessPolicy(String accessPolicyId) throws DeleteEdcPolicyDefinitionException { - String deleteUri = UriComponentsBuilder.fromPath(this.config.getControlplane().getEndpoint().getPolicyDefinition()).pathSegment(new String[]{"{accessPolicyId}"}).buildAndExpand(new Object[]{accessPolicyId}).toUriString(); - - try { - this.restTemplate.delete(deleteUri, new Object[0]); - } catch (RestClientException var4) { - log.error("Failed to delete EDC notification asset policy {}. Reason: ", accessPolicyId, var4); - throw new DeleteEdcPolicyDefinitionException(var4); - } - } - @Generated public TestPolicyDefinitionService(EdcConfiguration config, RestTemplate restTemplate) { this.config = config; From 206ac80852f7bb06a8a2b149edfc49f6d7d3c467 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Mar 2024 01:25:42 +0100 Subject: [PATCH 08/44] feature(tx-backend): #536 testing with adjustments to lib code --- .../common/config/TestContractDefinitionService.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java index b83f8f318c..4baeca7140 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java @@ -48,30 +48,31 @@ public class TestContractDefinitionService { private final RestTemplate restTemplate; public String createContractDefinition(String assetId, String policyId) throws CreateEdcContractDefinitionException { - EdcCreateContractDefinitionRequest createContractDefinitionRequest = this.createContractDefinitionRequest(assetId, policyId); + final String contractId = UUID.randomUUID().toString(); + EdcCreateContractDefinitionRequest createContractDefinitionRequest = this.createContractDefinitionRequest(assetId, policyId, contractId); try { ResponseEntity createContractDefinitionResponse = this.restTemplate.postForEntity(this.config.getControlplane().getEndpoint().getContractDefinition(), createContractDefinitionRequest, String.class, new Object[0]); HttpStatusCode responseCode = createContractDefinitionResponse.getStatusCode(); if (responseCode.value() == HttpStatus.OK.value()) { - return policyId; + return contractId; } else { throw new CreateEdcContractDefinitionException("Failed to create EDC contract definition for %s notification asset id".formatted(assetId)); } } catch (HttpClientErrorException var6) { if (var6.getStatusCode().value() == HttpStatus.CONFLICT.value()) { log.info("{} contract definition already exists in the EDC", policyId); - return policyId; + return contractId; } log.error("Failed to create edc contract definition for {} notification asset and {} policy definition id. Reason: ", new Object[]{assetId, policyId, var6}); throw new CreateEdcContractDefinitionException(var6); } } - public EdcCreateContractDefinitionRequest createContractDefinitionRequest(String assetId, String accessPolicyId) { + public EdcCreateContractDefinitionRequest createContractDefinitionRequest(String assetId, String accessPolicyId, String contractId) { EdcContractDefinitionCriteria edcContractDefinitionCriteria = EdcContractDefinitionCriteria.builder().type("CriterionDto").operandLeft("https://w3id.org/edc/v0.0.1/ns/id").operandRight(assetId).operator("=").build(); EdcContext edcContext = EdcContext.builder().edc("https://w3id.org/edc/v0.0.1/ns/").build(); - return EdcCreateContractDefinitionRequest.builder().contractPolicyId(accessPolicyId).edcContext(edcContext).type("ContractDefinition").accessPolicyId(accessPolicyId).contractDefinitionId(accessPolicyId).assetsSelector(edcContractDefinitionCriteria).build(); + return EdcCreateContractDefinitionRequest.builder().contractPolicyId(accessPolicyId).edcContext(edcContext).type("ContractDefinition").accessPolicyId(accessPolicyId).contractDefinitionId(contractId).assetsSelector(edcContractDefinitionCriteria).build(); } @Generated From 06158f17d7ba44c65c3ad42778b6a465e608e576 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Mar 2024 10:54:07 +0100 Subject: [PATCH 09/44] feature(tx-backend): #536 change shell descriptor path used in service --- .../traceability/common/config/ApplicationConfig.java | 4 +++- tx-backend/src/main/resources/application.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java index 1e23c843e5..544f665562 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java @@ -97,6 +97,8 @@ public class ApplicationConfig { @Value("${registry.urlWithPath}") String registryUrlWithPath; + @Value("${registry.shellDescriptorUrl}") + String shellDescriptorUrl; private final AcceptedPoliciesProvider.DefaultAcceptedPoliciesProvider defaultAcceptedPoliciesProvider; @@ -250,6 +252,6 @@ public TestContractDefinitionService edcDtrContractDefinitionService(EdcConfigur @Bean public DigitalTwinRegistryCreateShellService dtrCreateShellService(RestTemplate digitalTwinRegistryCreateShellRestTemplate) { - return new DigitalTwinRegistryCreateShellService(digitalTwinRegistryCreateShellRestTemplate, registryUrlWithPath); + return new DigitalTwinRegistryCreateShellService(digitalTwinRegistryCreateShellRestTemplate, registryUrlWithPath + shellDescriptorUrl); } } diff --git a/tx-backend/src/main/resources/application.yml b/tx-backend/src/main/resources/application.yml index b8b28b46ab..eb05170614 100644 --- a/tx-backend/src/main/resources/application.yml +++ b/tx-backend/src/main/resources/application.yml @@ -159,6 +159,7 @@ cors: registry: urlWithPath: ${REGISTRY_URL_WITH_PATH:https://registry.net/semantics/registry/api/v3.0} + shellDescriptorUrl: /shell-descriptors digitalTwinRegistryClient: shellDescriptorTemplate: /shell-descriptors/{aasIdentifier} # The path to retrieve AAS descriptors from the decentral DTR, must contain the placeholder {aasIdentifier} From 10aafdce59bb742e9d7a57b6c1b69162b74a89c1 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Mar 2024 13:13:09 +0100 Subject: [PATCH 10/44] feature(tx-backend): #536 change shell descriptor path used in service --- .../integration/common/support/DtrApiSupport.java | 6 +++--- .../integration/importdata/ImportControllerIT.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DtrApiSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DtrApiSupport.java index 615c4071e5..7d0d7ec7fe 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DtrApiSupport.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/DtrApiSupport.java @@ -37,16 +37,16 @@ public class DtrApiSupport { public void dtrWillCreateShell() { whenHttp(restitoProvider.stubServer()).match( - post("/semantics/registry/api/v3.0") + post("/semantics/registry/api/v3.0/shell-descriptors") ).then( status(HttpStatus.CREATED_201) ); } - public void verityDtrCreateShellCalledTimes(int times) { + public void verifyDtrCreateShellCalledTimes(int times) { verifyHttp(restitoProvider.stubServer()).times( times, - post("/semantics/registry/api/v3.0") + post("/semantics/registry/api/v3.0/shell-descriptors") ); } } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index 32ad3fd236..6bcc3a14e9 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -430,7 +430,7 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInSynchronization() AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); assertThat("Trace-X policy").isEqualTo(asset.getPolicyId()); assertThat(ImportState.IN_SYNCHRONIZATION).isEqualTo(asset.getImportState()); - dtrApiSupport.verityDtrCreateShellCalledTimes(1); + dtrApiSupport.verifyDtrCreateShellCalledTimes(1); } @Test @@ -471,7 +471,7 @@ void givenValidFile2_whenPublishData_thenStatusShouldChangeToInSynchronization() AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); assertThat("Trace-X policy").isEqualTo(asset.getPolicyId()); assertThat(ImportState.IN_SYNCHRONIZATION).isEqualTo(asset.getImportState()); - dtrApiSupport.verityDtrCreateShellCalledTimes(1); + dtrApiSupport.verifyDtrCreateShellCalledTimes(1); } @Test From 01a9d45e4675ce28ffaa69914d4d7d580ab8a084 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Mar 2024 21:40:38 +0100 Subject: [PATCH 11/44] feature(tx-backend): #536 submodel asset base url change --- .../domain/importpoc/service/EdcAssetCreationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index 6fc14ea75b..841320795e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -77,7 +77,7 @@ public void createDtrAndSubmodelAssets() { String submodelAssetId = null; try { - submodelAssetId = edcDtrAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase()+ "/api/submodel/data", SUBMODEL_ASSET_NAME); + submodelAssetId = edcDtrAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase()+ "/api/submodel", SUBMODEL_ASSET_NAME); } catch (CreateEdcAssetException e) { throw new RuntimeException(e); } From fe7f6e0710b0afd116eaede0f94b32f8aa36b360 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 6 Mar 2024 22:26:55 +0100 Subject: [PATCH 12/44] feature(tx-backend): #536 submodel asset base url change --- .../assets/domain/importpoc/service/DtrService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 4167e7267e..749865318e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -20,6 +20,7 @@ package org.eclipse.tractusx.traceability.assets.domain.importpoc.service; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.irs.component.assetadministrationshell.AssetAdministrationShellDescriptor; import org.eclipse.tractusx.irs.component.assetadministrationshell.Endpoint; import org.eclipse.tractusx.irs.component.assetadministrationshell.IdentifierKeyValuePair; @@ -42,6 +43,7 @@ import java.util.UUID; import java.util.stream.Collectors; +@Slf4j @Service @RequiredArgsConstructor public class DtrService { @@ -122,6 +124,7 @@ private String aspectTypeToSimpleSubmodelName(String aspectType) { private Map.Entry createSubmodel(Map.Entry payloadByAspectType) { UUID submodelId = UUID.randomUUID(); submodelServerRepository.saveSubmodel(submodelId.toString(), payloadByAspectType.getValue()); + log.info("create submodelId {} for aspectType {} on submodelServer", submodelId, payloadByAspectType.getKey()); return Map.entry(payloadByAspectType.getKey(), submodelId); } From 31fcdbb9be3fc24a43844dc92e507be97a344f11 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 7 Mar 2024 08:37:19 +0100 Subject: [PATCH 13/44] feature(tx-backend): #536 change shortId mapping to be null safe --- .../service/MainAspectAsBuiltStrategy.java | 1 + .../mapping/submodel/MapperHelper.java | 19 ++++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/MainAspectAsBuiltStrategy.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/MainAspectAsBuiltStrategy.java index 15f09f3393..9ed4ae2933 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/MainAspectAsBuiltStrategy.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/MainAspectAsBuiltStrategy.java @@ -132,6 +132,7 @@ public AssetBase mapToAssetBase(ImportRequest.AssetImportRequest assetImportRequ return AssetBase.builder() .id(assetImportRequestV2.assetMetaInfoRequest().catenaXId()) + //TODO: ASK: We need Id short for shell creation otherways we are not able to map it Back to system from IRS after creating shells with java .semanticModelId(semanticModelId.get()) .detailAspectModels(detailAspectModels) .manufacturerId(manufacturerId.get()) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/mapping/submodel/MapperHelper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/mapping/submodel/MapperHelper.java index b75fab09e4..4541f28a52 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/mapping/submodel/MapperHelper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/mapping/submodel/MapperHelper.java @@ -33,7 +33,14 @@ public static Owner getOwner(AssetBase assetBase, IRSResponse irsResponse) { } public static String getShortId(List shells, String globalAssetId) { - return getShortIds(shells).get(globalAssetId); + return shells.stream() + .filter(shell -> shell.payload().idShort() != null) + .map(shell -> Map.entry(shell.payload().globalAssetId(), shell.payload().idShort())) + .collect(Collectors.toMap( + Map.Entry::getKey, + Map.Entry::getValue, + (existingValue, newValue) -> existingValue + )).get(globalAssetId); } public static OffsetDateTime getOffsetDateTime(String date) { @@ -49,16 +56,6 @@ public static OffsetDateTime getOffsetDateTime(String date) { } } - private static Map getShortIds(List shells) { - return shells.stream() - .map(shell -> Map.entry(shell.payload().globalAssetId(), shell.payload().idShort())) - .collect(Collectors.toMap( - Map.Entry::getKey, - Map.Entry::getValue, - (existingValue, newValue) -> existingValue - )); - } - public static void enrichAssetBase(List detailAspectModels, AssetBase assetBase) { detailAspectModels.stream() .filter(detailAspectModel -> detailAspectModel.getGlobalAssetId().equals(assetBase.getId())) From 811c00011c1061e304e92a446541f040585726fa Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 7 Mar 2024 11:57:59 +0100 Subject: [PATCH 14/44] feature(tx-backend): #536 adjust subjectIds --- .../assets/domain/importpoc/service/DtrService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 749865318e..4c2dab2fb3 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -180,7 +180,13 @@ private List getExternalSubjectIds() { .build(), SemanticId.builder() .type(GLOBAL_REFERENCE) - .value(traceabilityProperties.getBpn().toString()) +// .value(traceabilityProperties.getBpn().toString()) + .value("BPNL00000003CML1") + .build(), + SemanticId.builder() + .type(GLOBAL_REFERENCE) +// .value(traceabilityProperties.getBpn().toString()) + .value("BPNL00000003CNKC") .build() // TODO: Test if it works python script creates GlobalReferences for both instances BPN // TODO: Last time we used python script with only own bpn in global references other instance could not retrieve assets From af1211f3ff0bc3503e572e8d7d6ccb4267f62d92 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 7 Mar 2024 13:59:33 +0100 Subject: [PATCH 15/44] feature(tx-backend): #536 adjust subjectIds --- .../domain/importpoc/service/EdcAssetCreationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index 841320795e..e191a1b926 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -52,7 +52,7 @@ public void createDtrAndSubmodelAssets() { String createdPolicyId = null; try { - createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy(traceabilityProperties.getRightOperand()); + createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy(traceabilityProperties.getRightOperand(), "id-3.0-trace"); } catch (CreateEdcPolicyDefinitionException e) { throw new RuntimeException(e); } From 9ddaad79593492e8ac390bfb7c49caaa54665aec Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Fri, 8 Mar 2024 10:54:58 +0100 Subject: [PATCH 16/44] feature(tx-backend): #536 submodel asset id randomly generated urn:uuid --- .../domain/importpoc/service/EdcAssetCreationService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index e191a1b926..7047e8911f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -34,6 +34,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import java.util.UUID; + @Slf4j @Service @RequiredArgsConstructor @@ -77,7 +79,7 @@ public void createDtrAndSubmodelAssets() { String submodelAssetId = null; try { - submodelAssetId = edcDtrAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase()+ "/api/submodel", SUBMODEL_ASSET_NAME); + submodelAssetId = edcDtrAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase()+ "/api/submodel", "urn:uuid:"+UUID.randomUUID().toString()); } catch (CreateEdcAssetException e) { throw new RuntimeException(e); } From ee285b41ada2806b054f80245d53576ce717c8dc Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Fri, 8 Mar 2024 12:30:47 +0100 Subject: [PATCH 17/44] feature(tx-backend): #536 merge main --- .../domain/importpoc/service/DtrService.java | 15 +++++++-------- .../service/EdcAssetCreationService.java | 3 ++- .../importpoc/service/PublishServiceImpl.java | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 4c2dab2fb3..19315046d5 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -57,26 +57,26 @@ public class DtrService { private final TraceabilityProperties traceabilityProperties; - public void createShellInDtr(final AssetBase assetBase) throws CreateDtrShellException { + public void createShellInDtr(final AssetBase assetBase, String submodelServerAssetId) throws CreateDtrShellException { Map payloadByAspectType = submodelPayloadRepository.getTypesAndPayloadsByAssetId(assetBase.getId()); Map createdSubmodelIdByAspectType = payloadByAspectType.entrySet().stream() .map(this::createSubmodel) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); - List descriptors = toSubmodelDescriptors(createdSubmodelIdByAspectType); + List descriptors = toSubmodelDescriptors(createdSubmodelIdByAspectType, submodelServerAssetId); dtrCreateShellService.createShell(aasFrom(assetBase, descriptors)); } - private List toSubmodelDescriptors(Map createdSubmodelIdByAspectType) { + private List toSubmodelDescriptors(Map createdSubmodelIdByAspectType, String submodelServerAssetId) { return createdSubmodelIdByAspectType.entrySet() .stream().map(entry -> - toSubmodelDescriptor(entry.getKey(), entry.getValue()) + toSubmodelDescriptor(entry.getKey(), entry.getValue(), submodelServerAssetId) ).toList(); } - private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodelServerIdReference) { + private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodelServerIdReference, String submodelServerAssetId) { return SubmodelDescriptor.builder() .description(List.of()) .idShort(aspectTypeToSimpleSubmodelName(aspectType)) // example SingleLevelUsageAsBuilt @@ -101,7 +101,7 @@ private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodel .endpointProtocolVersion(List.of("1.1")) .subprotocol("DSP") .subprotocolBodyEncoding("plain") - .subprotocolBody(getSubProtocol()) + .subprotocolBody(getSubProtocol(submodelServerAssetId)) .securityAttributes( List.of(SecurityAttribute.none()) ).build() @@ -110,8 +110,7 @@ private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodel ).build(); } - private String getSubProtocol() { - final String submodelServerAssetId = "submodel-asset"; + private String getSubProtocol(String submodelServerAssetId) { final String edcProviderControlplaneUrl = edcProperties.getPartsProviderEdcControlplaneUrl(); // "https://trace-x-test-edc.dev.demo.catena-x.net" return "id=%s;dspEndpoint=%s".formatted(submodelServerAssetId, edcProviderControlplaneUrl); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index 7047e8911f..7547415ae2 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -49,7 +49,7 @@ public class EdcAssetCreationService { @Value("${registry.urlWithPath}") String registryUrlWithPath = null; - public void createDtrAndSubmodelAssets() { + public String createDtrAndSubmodelAssets() { // TODO: check if exists ( query catalog of parts provider EDC ) ? String createdPolicyId = null; @@ -92,5 +92,6 @@ public void createDtrAndSubmodelAssets() { throw new RuntimeException(e); } log.info("Submodel Contract Id created :{}", submodelContractId); + return submodelAssetId; } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java index a5cb4935ec..a8d315b165 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java @@ -50,13 +50,13 @@ public void publishAssets(String policyId, List assetIds) { //Update assets with policy id assetIds.forEach(this::throwIfNotExists); - edcAssetCreationService.createDtrAndSubmodelAssets(); + String submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(); // TODO: rethink how to refactor updateAssetsAndPolicyMethod so steps will be more visibe try { log.info("Updating status of asPlannedAssets."); - updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsPlannedRepository); + updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsPlannedRepository, submodelServerAssetId); log.info("Updating status of asBuiltAssets."); - updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsBuiltRepository); + updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsBuiltRepository, submodelServerAssetId); } catch (CreateDtrShellException e) { throw new RuntimeException(e); } @@ -70,7 +70,7 @@ private void throwIfNotExists(String assetId) { } - private void updateAssetWithStatusAndPolicy(String policyId, List assetIds, AssetRepository repository) throws CreateDtrShellException { + private void updateAssetWithStatusAndPolicy(String policyId, List assetIds, AssetRepository repository, String submodelServerAssetId) throws CreateDtrShellException { List assetList = repository.getAssetsById(assetIds); List saveList = assetList.stream() .filter(this::validTransientState) @@ -82,7 +82,7 @@ private void updateAssetWithStatusAndPolicy(String policyId, List assetI }).toList(); for (AssetBase assetBase : saveList) { - dtrService.createShellInDtr(assetBase); + dtrService.createShellInDtr(assetBase, submodelServerAssetId); } List assetBases = repository.saveAll(saveList); From 477fed0fcb52668742eed8ea74011ddbb5c46fc2 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Mon, 11 Mar 2024 11:21:43 +0100 Subject: [PATCH 18/44] feature(tx-backend): #536 deployment adjustments --- .../charts/backend/templates/deployment.yaml | 4 ++-- .../assets/domain/importpoc/service/DtrService.java | 4 ++-- .../common/config/RestTemplateConfiguration.java | 2 +- .../traceability/common/properties/EdcProperties.java | 8 ++------ .../resources/application-integration-spring-boot.yml | 4 ++-- tx-backend/src/main/resources/application.yml | 3 +-- 6 files changed, 10 insertions(+), 15 deletions(-) diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index ba86089aa6..cd53b7076b 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -98,8 +98,8 @@ spec: value: {{ .Values.edc.apiKey | quote }} - name: EDC_PROVIDER_URL value: {{ .Values.edc.providerUrl | quote }} - - name: PARTS_EDC_PROVIDER_URL - value: {{ .Values.edc.partsProviderUrl | quote }} + - name: EDC_PROVIDER_DATAPLANE_URL + value: {{ .Values.edc.providerDataplaneUrl | quote }} - name: REGISTRY_URL_WITH_PATH value: {{ .Values.registry.urlWithPath | quote }} - name: SUBMODEL_URL diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 19315046d5..1a87271d90 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -96,7 +96,7 @@ private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodel .interfaceInformation("SUBMODEL-3.0") .protocolInformation( ProtocolInformation.builder() - .href(edcProperties.getPartsProviderEdcDataplaneUrl() + "/api/public/data/" + submodelServerIdReference) + .href(edcProperties.getProviderDataplaneEdcUrl() + "/api/public/data/" + submodelServerIdReference) .endpointProtocol("HTTP") .endpointProtocolVersion(List.of("1.1")) .subprotocol("DSP") @@ -111,7 +111,7 @@ private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodel } private String getSubProtocol(String submodelServerAssetId) { - final String edcProviderControlplaneUrl = edcProperties.getPartsProviderEdcControlplaneUrl(); // "https://trace-x-test-edc.dev.demo.catena-x.net" + final String edcProviderControlplaneUrl = edcProperties.getProviderEdcUrl(); // "https://trace-x-test-edc.dev.demo.catena-x.net" return "id=%s;dspEndpoint=%s".formatted(submodelServerAssetId, edcProviderControlplaneUrl); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java index db0dde06d5..0e0d46fa62 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java @@ -87,7 +87,7 @@ public RestTemplate edcNotificationAssetRestTemplate(@Autowired EdcProperties ed @Bean public RestTemplate edcDtrAssetRestTemplate(@Autowired EdcProperties edcProperties) { return new RestTemplateBuilder() - .rootUri(edcProperties.getPartsProviderEdcControlplaneUrl()) + .rootUri(edcProperties.getProviderEdcUrl()) .defaultHeader("Accept", MediaType.APPLICATION_JSON_VALUE) .defaultHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE) .defaultHeader(EDC_API_KEY_HEADER_NAME, edcProperties.getApiAuthKey()) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java index f50fab55d5..3af860511f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/properties/EdcProperties.java @@ -52,12 +52,8 @@ public class EdcProperties { private String providerEdcUrl; @NotBlank - @Value("${edc.parts-provider-edc-controlplane-url}") - private String partsProviderEdcControlplaneUrl; - - @NotBlank - @Value("${edc.parts-provider-edc-dataplane-url}") - private String partsProviderEdcDataplaneUrl; + @Value("${edc.provider-dataplane-edc-url}") + private String providerDataplaneEdcUrl; @NotBlank @Value("${edc.api-auth-key}") diff --git a/tx-backend/src/main/resources/application-integration-spring-boot.yml b/tx-backend/src/main/resources/application-integration-spring-boot.yml index 00cff22885..0e89b7222b 100644 --- a/tx-backend/src/main/resources/application-integration-spring-boot.yml +++ b/tx-backend/src/main/resources/application-integration-spring-boot.yml @@ -35,8 +35,8 @@ registry: edc: api-auth-key: "integration-tests" - parts-provider-edc-controlplane-url: "http://127.0.0.1" - parts-provider-edc-dataplane-url: "http://127.0.0.1" + provider-edc-url: "http://127.0.0.1" + provider-dataplane-edc-url: "http://127.0.0.1" spring: security: diff --git a/tx-backend/src/main/resources/application.yml b/tx-backend/src/main/resources/application.yml index b01a0e7324..56c4c8b05f 100644 --- a/tx-backend/src/main/resources/application.yml +++ b/tx-backend/src/main/resources/application.yml @@ -47,8 +47,7 @@ edc: api-auth-key: ${EDC_API_KEY} bpn-provider-url-mappings: { } provider-edc-url: ${EDC_PROVIDER_URL} - parts-provider-edc-controlplane-url: ${EDC_PARTS_PROVIDER_CONTROLPLANE_URL:https://provider-edc-controlplane.net} - parts-provider-edc-dataplane-url: ${EDC_PARTS_PROVIDER_DATAPLANE_URL:https://provider-edc-dataplane.net} + provider-dataplane-edc-url: ${EDC_PROVIDER_DATAPLANE_URL} callback-urls: ${EDC_CALLBACK_URL} From 39964cfe94351d14156664b80364e92be5280531 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Mon, 11 Mar 2024 12:13:16 +0100 Subject: [PATCH 19/44] feature(tx-backend): #536 remove test classes --- .../service/EdcAssetCreationService.java | 5 +- .../common/config/ApplicationConfig.java | 4 +- .../config/TestContractDefinitionService.java | 83 ------------- .../common/config/TestEdcAssetService.java | 104 ----------------- .../config/TestPolicyDefinitionService.java | 109 ------------------ 5 files changed, 4 insertions(+), 301 deletions(-) delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index c98a8d6896..5df8d2521b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -21,6 +21,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.irs.edc.client.asset.EdcAssetService; import org.eclipse.tractusx.irs.edc.client.asset.model.exception.CreateEdcAssetException; import org.eclipse.tractusx.irs.edc.client.asset.model.exception.EdcAssetAlreadyExistsException; import org.eclipse.tractusx.irs.edc.client.contract.model.exception.CreateEdcContractDefinitionException; @@ -28,8 +29,6 @@ import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; import org.eclipse.tractusx.irs.edc.client.policy.model.exception.EdcPolicyDefinitionAlreadyExists; import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; -import org.eclipse.tractusx.traceability.assets.application.importpoc.PolicyService; -import org.eclipse.tractusx.traceability.common.config.TestEdcAssetService; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -41,7 +40,7 @@ @RequiredArgsConstructor public class EdcAssetCreationService { private static final String REGISTRY_ASSET_ID = "registry-asset"; - private final TestEdcAssetService edcDtrAssetService; + private final EdcAssetService edcDtrAssetService; private final EdcPolicyDefinitionService edcDtrPolicyDefinitionService; private final EdcContractDefinitionService edcDtrContractDefinitionService; private final TraceabilityProperties traceabilityProperties; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java index a5c35ece57..38e7dd3b1f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java @@ -236,8 +236,8 @@ public EdcContractDefinitionService edcContractDefinitionService(EdcConfiguratio } @Bean - public TestEdcAssetService edcDtrAssetService(EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcDtrAssetRestTemplate) { - return new TestEdcAssetService(edcTransformer, edcConfiguration, edcDtrAssetRestTemplate); + public EdcAssetService edcDtrAssetService(EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcDtrAssetRestTemplate) { + return new EdcAssetService(edcTransformer, edcConfiguration, edcDtrAssetRestTemplate); } @Bean diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java deleted file mode 100644 index 4baeca7140..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestContractDefinitionService.java +++ /dev/null @@ -1,83 +0,0 @@ -/******************************************************************************** - * Copyright (c) 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.traceability.common.config; - -import lombok.Generated; -import org.eclipse.tractusx.irs.edc.client.EdcConfiguration; -import org.eclipse.tractusx.irs.edc.client.asset.model.EdcContext; -import org.eclipse.tractusx.irs.edc.client.contract.model.EdcContractDefinitionCriteria; -import org.eclipse.tractusx.irs.edc.client.contract.model.EdcCreateContractDefinitionRequest; -import org.eclipse.tractusx.irs.edc.client.contract.model.exception.CreateEdcContractDefinitionException; -import org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractDefinitionService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpStatus; -import org.springframework.http.HttpStatusCode; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestClientException; -import org.springframework.web.client.RestTemplate; - -import java.util.UUID; - -public class TestContractDefinitionService { - @Generated - private static final Logger log = LoggerFactory.getLogger(EdcContractDefinitionService.class); - private static final String ASSET_SELECTOR_ID = "https://w3id.org/edc/v0.0.1/ns/id"; - private static final String ASSET_SELECTOR_EQUALITY_OPERATOR = "="; - private static final String ASSET_SELECTOR_TYPE = "CriterionDto"; - private static final String CONTRACT_DEFINITION_TYPE = "ContractDefinition"; - private final EdcConfiguration config; - private final RestTemplate restTemplate; - - public String createContractDefinition(String assetId, String policyId) throws CreateEdcContractDefinitionException { - final String contractId = UUID.randomUUID().toString(); - EdcCreateContractDefinitionRequest createContractDefinitionRequest = this.createContractDefinitionRequest(assetId, policyId, contractId); - - try { - ResponseEntity createContractDefinitionResponse = this.restTemplate.postForEntity(this.config.getControlplane().getEndpoint().getContractDefinition(), createContractDefinitionRequest, String.class, new Object[0]); - HttpStatusCode responseCode = createContractDefinitionResponse.getStatusCode(); - if (responseCode.value() == HttpStatus.OK.value()) { - return contractId; - } else { - throw new CreateEdcContractDefinitionException("Failed to create EDC contract definition for %s notification asset id".formatted(assetId)); - } - } catch (HttpClientErrorException var6) { - if (var6.getStatusCode().value() == HttpStatus.CONFLICT.value()) { - log.info("{} contract definition already exists in the EDC", policyId); - return contractId; - } - log.error("Failed to create edc contract definition for {} notification asset and {} policy definition id. Reason: ", new Object[]{assetId, policyId, var6}); - throw new CreateEdcContractDefinitionException(var6); - } - } - - public EdcCreateContractDefinitionRequest createContractDefinitionRequest(String assetId, String accessPolicyId, String contractId) { - EdcContractDefinitionCriteria edcContractDefinitionCriteria = EdcContractDefinitionCriteria.builder().type("CriterionDto").operandLeft("https://w3id.org/edc/v0.0.1/ns/id").operandRight(assetId).operator("=").build(); - EdcContext edcContext = EdcContext.builder().edc("https://w3id.org/edc/v0.0.1/ns/").build(); - return EdcCreateContractDefinitionRequest.builder().contractPolicyId(accessPolicyId).edcContext(edcContext).type("ContractDefinition").accessPolicyId(accessPolicyId).contractDefinitionId(contractId).assetsSelector(edcContractDefinitionCriteria).build(); - } - - @Generated - public TestContractDefinitionService(EdcConfiguration config, RestTemplate restTemplate) { - this.config = config; - this.restTemplate = restTemplate; - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java deleted file mode 100644 index 444c5b9d2b..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestEdcAssetService.java +++ /dev/null @@ -1,104 +0,0 @@ -/******************************************************************************** - * Copyright (c) 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.traceability.common.config; - -import jakarta.json.JsonObject; -import lombok.Generated; -import lombok.RequiredArgsConstructor; -import org.eclipse.edc.spi.types.domain.DataAddress; -import org.eclipse.edc.spi.types.domain.asset.Asset; -import org.eclipse.tractusx.irs.edc.client.EdcConfiguration; -import org.eclipse.tractusx.irs.edc.client.asset.model.exception.CreateEdcAssetException; -import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpStatus; -import org.springframework.http.HttpStatusCode; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; - -import java.util.Map; - -@RequiredArgsConstructor -public class TestEdcAssetService { - @Generated - private static final Logger log = LoggerFactory.getLogger(TestEdcAssetService.class); - private static final String DEFAULT_CONTENT_TYPE = "application/json"; - private static final String DEFAULT_POLICY_ID = "use-eu"; - private static final String DEFAULT_METHOD = "POST"; - private static final String ASSET_CREATION_DATA_ADDRESS_BASE_URL = "https://w3id.org/edc/v0.0.1/ns/baseUrl"; - private static final String ASSET_CREATION_DATA_ADDRESS_PROXY_METHOD = "https://w3id.org/edc/v0.0.1/ns/proxyMethod"; - private static final String ASSET_CREATION_DATA_ADDRESS_PROXY_BODY = "https://w3id.org/edc/v0.0.1/ns/proxyBody"; - private static final String ASSET_CREATION_DATA_ADDRESS_PROXY_PATH = "https://w3id.org/edc/v0.0.1/ns/proxyPath"; - private static final String ASSET_CREATION_DATA_ADDRESS_PROXY_QUERY_PARAMS = "https://w3id.org/edc/v0.0.1/ns/proxyQueryParams"; - private static final String ASSET_CREATION_DATA_ADDRESS_METHOD = "https://w3id.org/edc/v0.0.1/ns/method"; - private static final String ASSET_CREATION_PROPERTY_DESCRIPTION = "https://w3id.org/edc/v0.0.1/ns/description"; - private static final String ASSET_CREATION_PROPERTY_CONTENT_TYPE = "https://w3id.org/edc/v0.0.1/ns/contenttype"; - private static final String ASSET_CREATION_PROPERTY_POLICY_ID = "https://w3id.org/edc/v0.0.1/ns/policy-id"; - private static final String ASSET_CREATION_PROPERTY_TYPE = "https://w3id.org/edc/v0.0.1/ns/type"; - private static final String ASSET_CREATION_PROPERTY_NOTIFICATION_TYPE = "https://w3id.org/edc/v0.0.1/ns/notificationtype"; - private static final String ASSET_CREATION_PROPERTY_NOTIFICATION_METHOD = "https://w3id.org/edc/v0.0.1/ns/notificationmethod"; - private final EdcTransformer edcTransformer; - private final EdcConfiguration config; - private final RestTemplate restTemplate; - - public String createDtrAsset(String baseUrl, String assetId) throws CreateEdcAssetException { - Asset request = this.createDtrAssetRequest(assetId, baseUrl); - return this.sendRequest(request); - } - - public String createSubmodelAsset(String baseUrl, String assetId) throws CreateEdcAssetException { - Asset request = this.createSubmodelAssetRequest(assetId, baseUrl); - return this.sendRequest(request); - } - - private String sendRequest(Asset request) throws CreateEdcAssetException { - JsonObject transformedPayload = this.edcTransformer.transformAssetToJson(request); - - try { - ResponseEntity createEdcDataAssetResponse = this.restTemplate.postForEntity(this.config.getControlplane().getEndpoint().getAsset(), transformedPayload.toString(), String.class, new Object[0]); - HttpStatusCode responseCode = createEdcDataAssetResponse.getStatusCode(); - - if (responseCode.value() == HttpStatus.OK.value()) { - return request.getId(); - } - } catch (HttpClientErrorException var5) { - if (var5.getStatusCode().value() == HttpStatus.CONFLICT.value()) { - return request.getId(); - } - throw new CreateEdcAssetException(var5); - } - - throw new CreateEdcAssetException("Failed to create asset %s".formatted(request.getId())); - } - - private Asset createDtrAssetRequest(String assetId, String baseUrl) { - Map properties = Map.of("https://w3id.org/edc/v0.0.1/ns/description", "Digital Twin Registry Asset", "https://w3id.org/edc/v0.0.1/ns/type", "data.core.digitalTwinRegistry"); - DataAddress dataAddress = DataAddress.Builder.newInstance().type("DataAddress").property("https://w3id.org/edc/v0.0.1/ns/type", "HttpData").property("https://w3id.org/edc/v0.0.1/ns/baseUrl", baseUrl).property("https://w3id.org/edc/v0.0.1/ns/proxyMethod", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyBody", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyPath", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyQueryParams", Boolean.TRUE.toString()).build(); - return org.eclipse.edc.spi.types.domain.asset.Asset.Builder.newInstance().id(assetId).contentType("Asset").properties(properties).dataAddress(dataAddress).build(); - } - - private Asset createSubmodelAssetRequest(String assetId, String baseUrl) { - Map properties = Map.of("https://w3id.org/edc/v0.0.1/ns/description", "Submodel Server Asset"); - DataAddress dataAddress = DataAddress.Builder.newInstance().type("DataAddress").property("https://w3id.org/edc/v0.0.1/ns/type", "HttpData").property("https://w3id.org/edc/v0.0.1/ns/baseUrl", baseUrl).property("https://w3id.org/edc/v0.0.1/ns/proxyMethod", Boolean.FALSE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyBody", Boolean.FALSE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyPath", Boolean.TRUE.toString()).property("https://w3id.org/edc/v0.0.1/ns/proxyQueryParams", Boolean.FALSE.toString()).build(); - return org.eclipse.edc.spi.types.domain.asset.Asset.Builder.newInstance().id(assetId).contentType("Asset").properties(properties).dataAddress(dataAddress).build(); - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java deleted file mode 100644 index c8a29c222c..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/TestPolicyDefinitionService.java +++ /dev/null @@ -1,109 +0,0 @@ -/******************************************************************************** - * Copyright (c) 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.traceability.common.config; - -import lombok.Generated; -import org.eclipse.tractusx.irs.edc.client.EdcConfiguration; -import org.eclipse.tractusx.irs.edc.client.asset.model.OdrlContext; -import org.eclipse.tractusx.irs.edc.client.contract.model.EdcOperator; -import org.eclipse.tractusx.irs.edc.client.policy.model.EdcCreatePolicyDefinitionRequest; -import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicy; -import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermission; -import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermissionConstraint; -import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermissionConstraintExpression; -import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.HttpStatus; -import org.springframework.http.HttpStatusCode; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; - -import java.util.List; -import java.util.UUID; - -public class TestPolicyDefinitionService { - @Generated - private static final Logger log = LoggerFactory.getLogger(TestPolicyDefinitionService.class); - private static final String USE_ACTION = "USE"; - private static final String POLICY_TYPE = "Policy"; - private static final String POLICY_DEFINITION_TYPE = "PolicyDefinitionRequestDto"; - private static final String ATOMIC_CONSTRAINT = "AtomicConstraint"; - private static final String CONSTRAINT = "Constraint"; - private static final String OPERATOR_PREFIX = "odrl:"; - private final EdcConfiguration config; - private final RestTemplate restTemplate; - - public String createAccessPolicy(String policyName) throws CreateEdcPolicyDefinitionException { - String accessPolicyId = UUID.randomUUID().toString(); - return this.createAccessPolicy(policyName, accessPolicyId); - } - - public String createAccessPolicy(String policyName, String policyId) throws CreateEdcPolicyDefinitionException { - EdcCreatePolicyDefinitionRequest request = this.createPolicyDefinition(policyName, policyId); - return this.createAccessPolicy(request); - } - - public String createAccessPolicy(EdcCreatePolicyDefinitionRequest policyRequest) throws CreateEdcPolicyDefinitionException { - ResponseEntity createPolicyDefinitionResponse; - try { - createPolicyDefinitionResponse = this.restTemplate.postForEntity(this.config.getControlplane().getEndpoint().getPolicyDefinition(), policyRequest, String.class, new Object[0]); - } catch (HttpClientErrorException var4) { - if (var4.getStatusCode().value() == HttpStatus.CONFLICT.value()) { - log.info("Notification asset policy definition already exists in the EDC"); - return policyRequest.getPolicyDefinitionId(); - } - log.error("Failed to create EDC notification asset policy. Reason: ", var4); - throw new CreateEdcPolicyDefinitionException(var4); - } - - HttpStatusCode responseCode = createPolicyDefinitionResponse.getStatusCode(); - if (responseCode.value() == HttpStatus.OK.value()) { - return policyRequest.getPolicyDefinitionId(); - } else { - throw new CreateEdcPolicyDefinitionException("Failed to create EDC policy definition for asset"); - } - } - - public EdcCreatePolicyDefinitionRequest createPolicyDefinition(String policyName, String accessPolicyId) { - EdcPolicyPermissionConstraintExpression constraint = - EdcPolicyPermissionConstraintExpression.builder() - .leftOperand("PURPOSE") - .rightOperand(policyName) - .operator(new EdcOperator("odrl:eq")) - .type("Constraint") - .build(); - EdcPolicyPermissionConstraint edcPolicyPermissionConstraint = EdcPolicyPermissionConstraint.builder() - .orExpressions(List.of(constraint)) - .type("AtomicConstraint").build(); - EdcPolicyPermission odrlPermissions = EdcPolicyPermission.builder().action("USE") - .edcPolicyPermissionConstraints(edcPolicyPermissionConstraint).build(); - EdcPolicy edcPolicy = EdcPolicy.builder().odrlPermissions(List.of(odrlPermissions)).type("Policy").build(); - OdrlContext odrlContext = OdrlContext.builder().odrl("http://www.w3.org/ns/odrl/2/").build(); - return EdcCreatePolicyDefinitionRequest.builder().policyDefinitionId(accessPolicyId).policy(edcPolicy).odrlContext(odrlContext).type("PolicyDefinitionRequestDto").build(); - } - - @Generated - public TestPolicyDefinitionService(EdcConfiguration config, RestTemplate restTemplate) { - this.config = config; - this.restTemplate = restTemplate; - } -} From b4042818cee56dd5dc765ae0a0708c041d74fa3e Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 12 Mar 2024 11:52:36 +0100 Subject: [PATCH 20/44] feature(tx-backend): #536 adjustments to the flow --- .../base/service/AssetBaseService.java | 3 + .../application/importpoc/PublishService.java | 4 ++ .../assets/domain/base/AssetRepository.java | 5 ++ .../assets/domain/base/model/ImportNote.java | 2 +- .../assets/domain/base/model/ImportState.java | 7 +- .../service/AbstractAssetBaseService.java | 5 ++ .../domain/importpoc/PublishAssetsJob.java | 56 ++++++++++++++++ .../service/AsyncPublishService.java | 65 +++++++++++++++++++ .../domain/importpoc/service/DtrService.java | 5 +- .../importpoc/service/PublishServiceImpl.java | 36 +++++----- .../AssetAsBuiltRepositoryImpl.java | 16 ++++- .../repository/JpaAssetAsBuiltRepository.java | 3 + .../AssetAsPlannedRepositoryImpl.java | 16 ++++- .../JpaAssetAsPlannedRepository.java | 3 + .../common/config/AssetsAsyncConfig.java | 11 ++++ .../service/DecentralRegistryServiceImpl.java | 15 +++-- .../AssetAsBuiltControllerFilterValuesIT.java | 2 +- ...ssetAsPlannedControllerFilterValuesIT.java | 3 +- .../repository/AssetAsBuiltRepositoryIT.java | 25 +++++++ .../importdata/ImportControllerIT.java | 45 ++++++++----- 20 files changed, 280 insertions(+), 47 deletions(-) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/service/AssetBaseService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/service/AssetBaseService.java index 1ba141dcec..f6ee033c21 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/service/AssetBaseService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/base/service/AssetBaseService.java @@ -19,6 +19,7 @@ package org.eclipse.tractusx.traceability.assets.application.base.service; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; import org.eclipse.tractusx.traceability.assets.domain.base.model.QualityType; import org.eclipse.tractusx.traceability.common.model.PageResult; @@ -47,4 +48,6 @@ public interface AssetBaseService { AssetBase updateQualityType(String assetId, QualityType qualityType); List getDistinctFilterValues(String fieldName, String startWith, Integer size, Owner owner); + + List getAssetIdsInImportState(ImportState... importStates); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java index 27cc7b368c..8b26a65d57 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java @@ -18,9 +18,13 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.assets.application.importpoc; +import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; + import java.util.List; public interface PublishService { void publishAssets(String policyId, List assetIds); + + void publishAssetsToCx(List assets); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java index f9fc1a7d66..8d21c93bae 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java @@ -20,6 +20,7 @@ package org.eclipse.tractusx.traceability.assets.domain.base; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; import java.util.List; @@ -46,4 +47,8 @@ public interface AssetRepository { long countAssetsByOwner(Owner owner); List getFieldValues(String fieldName, String startWith, Integer resultLimit, Owner owner); + + List findByImportStateIn(ImportState... importStates); + + void updateImportStateForAssets(ImportState importState, List assetIds); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java index 969e71ab18..61382968c8 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java @@ -24,5 +24,5 @@ public class ImportNote { public static final String PERSISTENT_NO_UPDATE = "Asset in sync with digital twin registry. Twin will not be updated."; public static final String PERSISTED = "Asset created/updated successfully in persistant state."; public static final String IN_SYNCHRONIZATION = "Twin in sync with digital twin registry. Twin will not be updated."; - + public static final String PUBLISHED_TO_CX = "Assets Pubilshed to network"; } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java index 82e83a9fd7..e465cf0410 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java @@ -20,5 +20,10 @@ public enum ImportState { - TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, UNSET + TRANSIENT, + PERSISTENT, + ERROR, + IN_SYNCHRONIZATION, + PUBLISHED_TO_CX, + UNSET } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/service/AbstractAssetBaseService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/service/AbstractAssetBaseService.java index cf058248ca..b004fc72ad 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/service/AbstractAssetBaseService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/service/AbstractAssetBaseService.java @@ -126,6 +126,11 @@ public List getDistinctFilterValues(String fieldName, String startWith, return getAssetRepository().getFieldValues(fieldName, startWith, resultSize, owner); } + @Override + public List getAssetIdsInImportState(ImportState... importStates) { + return getAssetRepository().findByImportStateIn(importStates).stream().map(AssetBase::getId).toList(); + } + private boolean isSupportedEnumType(String fieldName) { return SUPPORTED_ENUM_FIELDS.contains(fieldName); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java new file mode 100644 index 0000000000..5dd07db3c5 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java @@ -0,0 +1,56 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.assets.domain.importpoc; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.traceability.assets.application.importpoc.PublishService; +import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; +import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; +import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; +import org.eclipse.tractusx.traceability.common.config.ApplicationProfiles; +import org.springframework.context.annotation.Profile; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.stream.Stream; + +@Slf4j +@Component +@EnableScheduling +@Profile(ApplicationProfiles.NOT_TESTS) +@RequiredArgsConstructor +public class PublishAssetsJob { + + private final AssetAsBuiltRepository assetAsBuiltRepository; + private final AssetAsPlannedRepository assetAsPlannedRepository; + private final PublishService publishService; + + @Scheduled(cron = "0 30 1 * * ?", zone = "Europe/Berlin") + public void publishAssets() { + List assetsAsBuiltInSync = assetAsBuiltRepository.findByImportStateIn(ImportState.IN_SYNCHRONIZATION); + List assetsAsPlannedInSync = assetAsPlannedRepository.findByImportStateIn(ImportState.IN_SYNCHRONIZATION); + List allInSyncAssets = Stream.concat(assetsAsPlannedInSync.stream(), assetsAsBuiltInSync.stream()).toList(); + publishService.publishAssetsToCx(allInSyncAssets); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java new file mode 100644 index 0000000000..3d8776ccda --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java @@ -0,0 +1,65 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.assets.domain.importpoc.service; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.irs.registryclient.decentral.exception.CreateDtrShellException; +import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; +import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; +import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; +import org.eclipse.tractusx.traceability.common.config.AssetsAsyncConfig; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Slf4j +@RequiredArgsConstructor +@Service +public class AsyncPublishService { + + private final AssetAsPlannedRepository assetAsPlannedRepository; + private final AssetAsBuiltRepository assetAsBuiltRepository; + private final EdcAssetCreationService edcAssetCreationService; + private final DtrService dtrService; + @Async(value = AssetsAsyncConfig.PUBLISH_ASSETS_EXECUTOR) + public void publishAssetsToCx(List assets) { + Map> assetsByPolicyId = assets.stream().collect(Collectors.groupingBy(AssetBase::getPolicyId)); + + List createdShellsAssetIds = new java.util.ArrayList<>(List.of()); + assetsByPolicyId.forEach((key, value) -> { + String submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(key); + value.forEach(assetBase -> { + try { + String assetId = dtrService.createShellInDtr(assetBase, submodelServerAssetId); + createdShellsAssetIds.add(assetId); + } catch (CreateDtrShellException e) { + log.error("Failed to create shell in dtr for asset with id %s".formatted(assetBase.getId()), e); + } + }); + }); + assetAsBuiltRepository.updateImportStateForAssets(ImportState.PUBLISHED_TO_CX, createdShellsAssetIds); + assetAsPlannedRepository.updateImportStateForAssets(ImportState.PUBLISHED_TO_CX, createdShellsAssetIds); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 1a87271d90..0d0b39ac3a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -34,7 +34,6 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.SubmodelPayloadRepository; import org.eclipse.tractusx.traceability.common.properties.EdcProperties; -import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.eclipse.tractusx.traceability.submodel.domain.repository.SubmodelServerRepository; import org.springframework.stereotype.Service; @@ -54,10 +53,9 @@ public class DtrService { private final SubmodelPayloadRepository submodelPayloadRepository; private final SubmodelServerRepository submodelServerRepository; private final EdcProperties edcProperties; - private final TraceabilityProperties traceabilityProperties; - public void createShellInDtr(final AssetBase assetBase, String submodelServerAssetId) throws CreateDtrShellException { + public String createShellInDtr(final AssetBase assetBase, String submodelServerAssetId) throws CreateDtrShellException { Map payloadByAspectType = submodelPayloadRepository.getTypesAndPayloadsByAssetId(assetBase.getId()); Map createdSubmodelIdByAspectType = payloadByAspectType.entrySet().stream() .map(this::createSubmodel) @@ -66,6 +64,7 @@ public void createShellInDtr(final AssetBase assetBase, String submodelServerAss List descriptors = toSubmodelDescriptors(createdSubmodelIdByAspectType, submodelServerAssetId); dtrCreateShellService.createShell(aasFrom(assetBase, descriptors)); + return assetBase.getId(); } private List toSubmodelDescriptors(Map createdSubmodelIdByAspectType, String submodelServerAssetId) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java index 5ed114c1fe..98843e223f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java @@ -20,7 +20,6 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.irs.registryclient.decentral.exception.CreateDtrShellException; import org.eclipse.tractusx.traceability.assets.application.importpoc.PublishService; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; @@ -30,9 +29,11 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.PublishAssetException; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.stream.Collectors; +import java.util.stream.Stream; @Slf4j @@ -42,25 +43,26 @@ public class PublishServiceImpl implements PublishService { private final AssetAsPlannedRepository assetAsPlannedRepository; private final AssetAsBuiltRepository assetAsBuiltRepository; - private final DtrService dtrService; - private final EdcAssetCreationService edcAssetCreationService; + private final AsyncPublishService asyncPublishService; @Override + @Transactional public void publishAssets(String policyId, List assetIds) { assetIds.forEach(this::throwIfNotExists); - String submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(policyId); - //Update assets with policy id - try { - log.info("Updating status of asPlannedAssets."); - updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsPlannedRepository, submodelServerAssetId); - log.info("Updating status of asBuiltAssets."); - updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsBuiltRepository, submodelServerAssetId); - } catch (CreateDtrShellException e) { - throw new RuntimeException(e); - } + log.info("Updating status of asPlannedAssets."); + List updatedAsPlannedAssets = updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsPlannedRepository); + log.info("Updating status of asBuiltAssets."); + List updatedAsBuiltAssets = updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsBuiltRepository); + + //Publish to CS network + publishAssetsToCx(Stream.concat(updatedAsPlannedAssets.stream(), updatedAsBuiltAssets.stream()).toList()); + } + @Override + public void publishAssetsToCx(List assets) { + asyncPublishService.publishAssetsToCx(assets); } private void throwIfNotExists(String assetId) { @@ -69,8 +71,7 @@ private void throwIfNotExists(String assetId) { } } - - private void updateAssetWithStatusAndPolicy(String policyId, List assetIds, AssetRepository repository, String submodelServerAssetId) throws CreateDtrShellException { + private List updateAssetWithStatusAndPolicy(String policyId, List assetIds, AssetRepository repository) { List assetList = repository.getAssetsById(assetIds); List saveList = assetList.stream() .filter(this::validTransientState) @@ -81,13 +82,10 @@ private void updateAssetWithStatusAndPolicy(String policyId, List assetI return asset; }).toList(); - for (AssetBase assetBase : saveList) { - dtrService.createShellInDtr(assetBase, submodelServerAssetId); - } - List assetBases = repository.saveAll(saveList); log.info("Successfully set {} in status IN_SYNCHRONIZATION", assetBases.stream().map(AssetBase::getId).collect(Collectors.joining(", "))); + return assetBases; } private boolean validTransientState(AssetBase assetBase) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java index abd6841d3b..cce7487809 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java @@ -109,7 +109,7 @@ public List saveAll(List assets) { @Override @Transactional public List saveAllIfNotInIRSSyncAndUpdateImportStateAndNote(List assets) { - if(Objects.isNull(assets)) { + if (Objects.isNull(assets)) { return List.of(); } List toPersist = assets.stream().map(assetToPersist -> new AbstractMap.SimpleEntry(assetToPersist, jpaAssetAsBuiltRepository.findById(assetToPersist.getId()).orElse(null))) @@ -132,6 +132,20 @@ private boolean entityIsTransientOrNotExistent(AbstractMap.SimpleEntry findByImportStateIn(ImportState... importStates) { + return jpaAssetAsBuiltRepository.findByImportStateIn(importStates).stream() + .map(AssetAsBuiltEntity::toDomain).toList(); + } + + @Override + public void updateImportStateForAssets(ImportState importState, List assetIds) { + List foundAssets = jpaAssetAsBuiltRepository.findByIdIn(assetIds); + foundAssets.forEach(assetAsBuilt -> assetAsBuilt.setImportState(importState)); + jpaAssetAsBuiltRepository.saveAll(foundAssets); + } + @Override public Optional findById(String assetId) { return jpaAssetAsBuiltRepository.findById(assetId) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/JpaAssetAsBuiltRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/JpaAssetAsBuiltRepository.java index 6d592c574f..37be95412b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/JpaAssetAsBuiltRepository.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/JpaAssetAsBuiltRepository.java @@ -21,6 +21,7 @@ package org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.repository; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.model.AssetAsBuiltEntity; import org.springframework.data.jpa.repository.JpaRepository; @@ -37,4 +38,6 @@ public interface JpaAssetAsBuiltRepository extends JpaRepository findByImportStateIn(ImportState... importState); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java index 0fa9fd260d..ae63d466b7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java @@ -109,7 +109,7 @@ public List saveAll(List assets) { @Override @Transactional public List saveAllIfNotInIRSSyncAndUpdateImportStateAndNote(List assets) { - if(Objects.isNull(assets)) { + if (Objects.isNull(assets)) { return List.of(); } List toPersist = assets.stream().map(assetToPersist -> @@ -157,4 +157,18 @@ public long countAssetsByOwner(Owner owner) { public List getFieldValues(String fieldName, String startWith, Integer resultLimit, Owner owner) { return CriteriaUtility.getDistinctAssetFieldValues(fieldName, startWith, resultLimit, owner, AssetAsPlannedEntity.class, entityManager); } + + @Transactional + @Override + public List findByImportStateIn(ImportState... importStates) { + return jpaAssetAsPlannedRepository.findByImportStateIn(importStates).stream() + .map(AssetAsPlannedEntity::toDomain).toList(); + } + + @Override + public void updateImportStateForAssets(ImportState importState, List assetIds) { + List foundAssets = jpaAssetAsPlannedRepository.findByIdIn(assetIds); + foundAssets.forEach(assetAsPlanned -> assetAsPlanned.setImportState(importState)); + jpaAssetAsPlannedRepository.saveAll(foundAssets); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/JpaAssetAsPlannedRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/JpaAssetAsPlannedRepository.java index bcbfcfa074..0b27472848 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/JpaAssetAsPlannedRepository.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/JpaAssetAsPlannedRepository.java @@ -18,6 +18,7 @@ ********************************************************************************/ package org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.repository; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; import org.eclipse.tractusx.traceability.assets.infrastructure.asplanned.model.AssetAsPlannedEntity; import org.springframework.data.jpa.repository.JpaRepository; @@ -32,4 +33,6 @@ public interface JpaAssetAsPlannedRepository extends JpaRepository findByImportStateIn(ImportState... importState); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/AssetsAsyncConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/AssetsAsyncConfig.java index 6cda52de84..77bffd1201 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/AssetsAsyncConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/AssetsAsyncConfig.java @@ -32,6 +32,17 @@ public class AssetsAsyncConfig { public static final String LOAD_SHELL_DESCRIPTORS_EXECUTOR = "load-shell-descriptors-executor"; public static final String UPDATE_NOTIFICATION_EXECUTOR = "update-notification-executor"; + public static final String PUBLISH_ASSETS_EXECUTOR = "publish-assets-executor"; + + @Bean(name = PUBLISH_ASSETS_EXECUTOR) + public ThreadPoolTaskExecutor publishAssetsExecutor() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(10); + executor.setMaxPoolSize(100); + executor.setThreadNamePrefix("%s-".formatted(PUBLISH_ASSETS_EXECUTOR)); + return executor; + } + @Bean(name = SYNCHRONIZE_ASSETS_EXECUTOR) public ThreadPoolTaskExecutor synchronizeAssetsExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java index 7e216ab4f2..6cdc2add75 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java @@ -27,6 +27,7 @@ import org.eclipse.tractusx.irs.component.assetadministrationshell.AssetAdministrationShellDescriptor; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.service.AssetAsBuiltServiceImpl; import org.eclipse.tractusx.traceability.assets.domain.asplanned.service.AssetAsPlannedServiceImpl; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.common.config.AssetsAsyncConfig; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.eclipse.tractusx.traceability.shelldescriptor.application.DecentralRegistryService; @@ -59,11 +60,17 @@ public class DecentralRegistryServiceImpl implements DecentralRegistryService { @Async(value = AssetsAsyncConfig.LOAD_SHELL_DESCRIPTORS_EXECUTOR) public void synchronizeAssets() { Collection shellDescriptors = decentralRegistryRepository.retrieveShellDescriptorsByBpn(traceabilityProperties.getBpn().toString()); - Collection asBuiltShellDescriptors = shellDescriptors.stream().map(Shell::payload).filter(this::isAsBuilt).toList(); - Collection asPlannedShellDescriptors = shellDescriptors.stream().map(Shell::payload).filter(this::isAsPlanned).toList(); + Collection asBuiltAssetIds = shellDescriptors.stream().map(Shell::payload).filter(this::isAsBuilt).map(AssetAdministrationShellDescriptor::getGlobalAssetId).toList(); + Collection asPlannedAssetIds = shellDescriptors.stream().map(Shell::payload).filter(this::isAsPlanned).map(AssetAdministrationShellDescriptor::getGlobalAssetId).toList(); - asBuiltShellDescriptors.forEach(shellDescriptor -> assetAsBuiltService.synchronizeAssetsAsync(shellDescriptor.getGlobalAssetId())); - asPlannedShellDescriptors.forEach(shellDescriptor -> assetAsPlannedService.synchronizeAssetsAsync(shellDescriptor.getGlobalAssetId())); + Collection existingAsBuiltInSyncAndTransientStates = assetAsBuiltService.getAssetIdsInImportState(ImportState.TRANSIENT, ImportState.IN_SYNCHRONIZATION); + Collection existingAsPlannedInSyncAndTransientStates = assetAsPlannedService.getAssetIdsInImportState(ImportState.TRANSIENT, ImportState.IN_SYNCHRONIZATION); + + Collection asBuiltAssetsToSync = asBuiltAssetIds.stream().filter(assetId -> !existingAsBuiltInSyncAndTransientStates.contains(assetId)).toList(); + Collection asPlannedAssetsToSync = asPlannedAssetIds.stream().filter(assetId -> !existingAsPlannedInSyncAndTransientStates.contains(assetId)).toList(); + + asBuiltAssetsToSync.forEach(assetAsBuiltService::synchronizeAssetsAsync); + asPlannedAssetsToSync.forEach(assetAsPlannedService::synchronizeAssetsAsync); } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerFilterValuesIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerFilterValuesIT.java index fd99996bf1..7c08f27a59 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerFilterValuesIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsBuiltControllerFilterValuesIT.java @@ -275,7 +275,7 @@ void givenEnumTypeFieldNameImportState_whenCallDistinctFilterValues_thenProperRe .log().all() .statusCode(200) .assertThat() - .body("size()", is(5)); + .body("size()", is(6)); } private static Stream fieldNameTestProvider() { diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerFilterValuesIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerFilterValuesIT.java index fcad08c2ce..06a935961b 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerFilterValuesIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/AssetAsPlannedControllerFilterValuesIT.java @@ -218,6 +218,7 @@ void givenNotEnumTypeFieldNameAndSizeAndOwnerSupplier_whenCallDistinctFilterValu .assertThat() .body("size()", is(1)); } + @Test void givenEnumTypeFieldNameImportState_whenCallDistinctFilterValues_thenProperResponse() throws JoseException { // given @@ -240,7 +241,7 @@ void givenEnumTypeFieldNameImportState_whenCallDistinctFilterValues_thenProperRe .log().all() .statusCode(200) .assertThat() - .body("size()", is(5)); + .body("size()", is(6)); } private static Stream fieldNameTestProvider() { diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/asbuilt/infrastructure/repository/AssetAsBuiltRepositoryIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/asbuilt/infrastructure/repository/AssetAsBuiltRepositoryIT.java index 3bb1d759bc..50d1e54f3e 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/asbuilt/infrastructure/repository/AssetAsBuiltRepositoryIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/assets/asbuilt/infrastructure/repository/AssetAsBuiltRepositoryIT.java @@ -20,8 +20,13 @@ package org.eclipse.tractusx.traceability.integration.assets.asbuilt.infrastructure.repository; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; +import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; +import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.model.AssetAsBuiltEntity; +import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.repository.JpaAssetAsBuiltRepository; import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.AssetsSupport; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -40,6 +45,9 @@ class AssetAsBuiltRepositoryIT extends IntegrationTestSpecification { @Autowired AssetsSupport assetsSupport; + @Autowired + JpaAssetAsBuiltRepository jpaAssetAsBuiltRepository; + @ParameterizedTest @MethodSource("fieldNameTestProvider") void givenIdField_whenGetFieldValues_thenSorted( @@ -60,6 +68,23 @@ void givenIdField_whenGetFieldValues_thenSorted( .hasSize(expectedSize); } + @Test + void givenAssets_whenGetByImportStateIn_thenReturnProperAssets() { + // given + assetsSupport.defaultAssetsStored(); + AssetAsBuiltEntity entityInSyncState = jpaAssetAsBuiltRepository.findById("urn:uuid:d387fa8e-603c-42bd-98c3-4d87fef8d2bb").get(); + entityInSyncState.setImportState(ImportState.IN_SYNCHRONIZATION); + AssetAsBuiltEntity entityTransientState = jpaAssetAsBuiltRepository.findById("urn:uuid:6dafbcec-2fce-4cbb-a5a9-b3b32aa5cffc").get(); + entityTransientState.setImportState(ImportState.TRANSIENT); + jpaAssetAsBuiltRepository.saveAll(List.of(entityInSyncState, entityTransientState)); + + // when + List result = assetAsBuiltRepository.findByImportStateIn(ImportState.TRANSIENT, ImportState.IN_SYNCHRONIZATION); + + // then + assertThat(result).hasSize(2); + } + private static Stream fieldNameTestProvider() { return Stream.of( Arguments.of("id", "urn:uuid:1", 10, 3), diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index e6338e4c7c..b3359aa4b7 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -42,8 +42,8 @@ import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.Test; +import org.opentest4j.AssertionFailedError; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.mock.mockito.MockBean; import java.io.File; import java.util.List; @@ -394,7 +394,7 @@ void givenInvalidAspect_whenImportData_thenValidationShouldNotPass() throws Jose } @Test - void givenValidFile_whenPublishData_thenStatusShouldChangeToInSynchronization() throws JoseException { + void givenValidFile_whenPublishData_thenStatusShouldChangeToInPublishedToCX() throws JoseException, InterruptedException { // given String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); File file = new File(path); @@ -427,14 +427,18 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInSynchronization() .statusCode(201); // then - AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); - assertThat("Trace-X policy").isEqualTo(asset.getPolicyId()); - assertThat(ImportState.IN_SYNCHRONIZATION).isEqualTo(asset.getImportState()); - dtrApiSupport.verifyDtrCreateShellCalledTimes(1); + eventually(() -> { + AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); + assertThat(asset.getPolicyId()).isEqualTo("Trace-X policy"); + assertThat(asset.getImportState()).isEqualTo(ImportState.PUBLISHED_TO_CX); + dtrApiSupport.verifyDtrCreateShellCalledTimes(1); + return true; + }); + } @Test - void givenValidFile2_whenPublishData_thenStatusShouldChangeToInSynchronization() throws JoseException { + void givenValidFile2_whenPublishData_thenStatusShouldChangeToPublishedToCx() throws JoseException, InterruptedException { // given String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); File file = new File(path); @@ -468,14 +472,21 @@ void givenValidFile2_whenPublishData_thenStatusShouldChangeToInSynchronization() .statusCode(201); // then - AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); - assertThat("Trace-X policy").isEqualTo(asset.getPolicyId()); - assertThat(ImportState.IN_SYNCHRONIZATION).isEqualTo(asset.getImportState()); - dtrApiSupport.verifyDtrCreateShellCalledTimes(1); + eventually(() -> { + try { + AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); + assertThat(asset.getPolicyId()).isEqualTo("Trace-X policy"); + assertThat(asset.getImportState()).isEqualTo(ImportState.PUBLISHED_TO_CX); + dtrApiSupport.verifyDtrCreateShellCalledTimes(1); + } catch (AssertionFailedError exception) { + return false; + } + return true; + }); } @Test - void givenInvalidAssetID_whenPublishData_thenStatusCode404() throws JoseException { + void givenInvalidAssetID_whenPublishData_thenStatusCode404() throws JoseException, InterruptedException { // given String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); File file = new File(path); @@ -503,9 +514,13 @@ void givenInvalidAssetID_whenPublishData_thenStatusCode404() throws JoseExceptio .statusCode(404); //then - AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); - assertNull(asset.getPolicyId()); - assertEquals(asset.getImportState(), ImportState.TRANSIENT); + eventually(() -> { + AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); + assertNull(asset.getPolicyId()); + assertEquals(asset.getImportState(), ImportState.TRANSIENT); + return true; + }); + } @Test From 0d0221855b6bf4c9aef244cda1fde002197f36d0 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 12 Mar 2024 15:17:33 +0100 Subject: [PATCH 21/44] feature(tx-backend): #536 adjust code to create policies from policy store --- .../assets/domain/base/AssetRepository.java | 3 +- .../service/AsyncPublishService.java | 12 ++-- .../service/EdcAssetCreationService.java | 56 ++++++++++++++++++- .../AssetAsBuiltRepositoryImpl.java | 7 ++- .../AssetAsPlannedRepositoryImpl.java | 7 ++- .../infrastructure/base/irs/IrsClient.java | 10 ++-- tx-backend/src/main/resources/application.yml | 1 + .../importdata/ImportControllerIT.java | 15 +++-- .../policy/PolicyControllerIT.java | 3 + .../importpoc/OperatorTypeResponse.java | 2 + 10 files changed, 95 insertions(+), 21 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java index 8d21c93bae..31c229ca2b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java @@ -20,6 +20,7 @@ package org.eclipse.tractusx.traceability.assets.domain.base; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportNote; import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; @@ -50,5 +51,5 @@ public interface AssetRepository { List findByImportStateIn(ImportState... importStates); - void updateImportStateForAssets(ImportState importState, List assetIds); + void updateImportStateAndNoteForAssets(ImportState importState, String importNote, List assetIds); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java index 3d8776ccda..4506138b95 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java @@ -25,6 +25,7 @@ import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; +import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportNote; import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.common.config.AssetsAsyncConfig; import org.springframework.scheduling.annotation.Async; @@ -43,14 +44,15 @@ public class AsyncPublishService { private final AssetAsBuiltRepository assetAsBuiltRepository; private final EdcAssetCreationService edcAssetCreationService; private final DtrService dtrService; + @Async(value = AssetsAsyncConfig.PUBLISH_ASSETS_EXECUTOR) public void publishAssetsToCx(List assets) { Map> assetsByPolicyId = assets.stream().collect(Collectors.groupingBy(AssetBase::getPolicyId)); List createdShellsAssetIds = new java.util.ArrayList<>(List.of()); - assetsByPolicyId.forEach((key, value) -> { - String submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(key); - value.forEach(assetBase -> { + assetsByPolicyId.forEach((policyId, assetsForPolicy) -> { + String submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(policyId); + assetsForPolicy.forEach(assetBase -> { try { String assetId = dtrService.createShellInDtr(assetBase, submodelServerAssetId); createdShellsAssetIds.add(assetId); @@ -59,7 +61,7 @@ public void publishAssetsToCx(List assets) { } }); }); - assetAsBuiltRepository.updateImportStateForAssets(ImportState.PUBLISHED_TO_CX, createdShellsAssetIds); - assetAsPlannedRepository.updateImportStateForAssets(ImportState.PUBLISHED_TO_CX, createdShellsAssetIds); + assetAsBuiltRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CX, ImportNote.PUBLISHED_TO_CX, createdShellsAssetIds); + assetAsPlannedRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CX, ImportNote.PUBLISHED_TO_CX, createdShellsAssetIds); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index 5df8d2521b..b563093852 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -19,20 +19,33 @@ package org.eclipse.tractusx.traceability.assets.domain.importpoc.service; +import assets.importpoc.ConstraintResponse; +import assets.importpoc.ConstraintsResponse; +import assets.importpoc.PermissionResponse; +import assets.importpoc.PolicyResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.irs.edc.client.asset.EdcAssetService; +import org.eclipse.tractusx.irs.edc.client.asset.model.OdrlContext; import org.eclipse.tractusx.irs.edc.client.asset.model.exception.CreateEdcAssetException; import org.eclipse.tractusx.irs.edc.client.asset.model.exception.EdcAssetAlreadyExistsException; +import org.eclipse.tractusx.irs.edc.client.contract.model.EdcOperator; import org.eclipse.tractusx.irs.edc.client.contract.model.exception.CreateEdcContractDefinitionException; import org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractDefinitionService; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcCreatePolicyDefinitionRequest; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicy; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermission; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermissionConstraint; +import org.eclipse.tractusx.irs.edc.client.policy.model.EdcPolicyPermissionConstraintExpression; import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; import org.eclipse.tractusx.irs.edc.client.policy.model.exception.EdcPolicyDefinitionAlreadyExists; import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; +import org.eclipse.tractusx.traceability.assets.application.importpoc.PolicyService; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import java.util.List; import java.util.UUID; @Slf4j @@ -44,14 +57,15 @@ public class EdcAssetCreationService { private final EdcPolicyDefinitionService edcDtrPolicyDefinitionService; private final EdcContractDefinitionService edcDtrContractDefinitionService; private final TraceabilityProperties traceabilityProperties; + private final PolicyService policyService; @Value("${registry.urlWithPath}") String registryUrlWithPath = null; public String createDtrAndSubmodelAssets(String policyId) { + PolicyResponse policy = policyService.getPolicyById(policyId); String createdPolicyId; try { - // TODO: get policy from policyService ( IRS policy store ) and map it to request - createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy(traceabilityProperties.getRightOperand(), policyId); + createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy(mapToEdcPolicyRequest(policy)); log.info("DTR Policy Id created :{}", createdPolicyId); } catch (CreateEdcPolicyDefinitionException e) { throw new RuntimeException(e); @@ -101,4 +115,42 @@ public String createDtrAndSubmodelAssets(String policyId) { log.info("Submodel Contract Id created :{}", submodelContractId); return submodelAssetId; } + + private EdcCreatePolicyDefinitionRequest mapToEdcPolicyRequest(PolicyResponse policy) { + OdrlContext odrlContext = OdrlContext.builder().odrl("http://www.w3.org/ns/odrl/2/").build(); + EdcPolicy edcPolicy = EdcPolicy.builder().odrlPermissions(mapToPermissions(policy.permissions())).type("Policy").build(); + return EdcCreatePolicyDefinitionRequest.builder() + .policyDefinitionId(policy.policyId()) + .policy(edcPolicy) + .odrlContext(odrlContext) + .type("PolicyDefinitionRequestDto") + .build(); + } + + private List mapToPermissions(List permissions) { + return permissions.stream().map(permission -> EdcPolicyPermission.builder() + .action(permission.action().name()) + .edcPolicyPermissionConstraints(mapToConstraint(permission.constraints())) + .build() + ).toList(); + } + + private EdcPolicyPermissionConstraint mapToConstraint(ConstraintsResponse constraintsResponse) { + return EdcPolicyPermissionConstraint.builder() + .type("AtomicConstraint") + .orExpressions(mapToConstraintExpression(constraintsResponse.or())) + .build(); + } + + private List mapToConstraintExpression(List constraints) { + return constraints.stream().map(constraint -> EdcPolicyPermissionConstraintExpression.builder() + .type("Constraint") + .leftOperand(constraint.leftOperand()) + .rightOperand(constraint.rightOperand()) + .operator(EdcOperator.builder() + .operatorId("odrl:" + constraint.operatorTypeResponse().getCode()) + .build()) + .build()) + .toList(); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java index cce7487809..374bdf3d95 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java @@ -140,9 +140,12 @@ public List findByImportStateIn(ImportState... importStates) { } @Override - public void updateImportStateForAssets(ImportState importState, List assetIds) { + public void updateImportStateAndNoteForAssets(ImportState importState, String importNote, List assetIds) { List foundAssets = jpaAssetAsBuiltRepository.findByIdIn(assetIds); - foundAssets.forEach(assetAsBuilt -> assetAsBuilt.setImportState(importState)); + foundAssets.forEach(assetAsBuilt -> { + assetAsBuilt.setImportState(importState); + assetAsBuilt.setImportNote(importNote); + }); jpaAssetAsBuiltRepository.saveAll(foundAssets); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java index ae63d466b7..9ec86732ce 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java @@ -166,9 +166,12 @@ public List findByImportStateIn(ImportState... importStates) { } @Override - public void updateImportStateForAssets(ImportState importState, List assetIds) { + public void updateImportStateAndNoteForAssets(ImportState importState, String importNote, List assetIds) { List foundAssets = jpaAssetAsPlannedRepository.findByIdIn(assetIds); - foundAssets.forEach(assetAsPlanned -> assetAsPlanned.setImportState(importState)); + foundAssets.forEach(assetAsPlanned -> { + assetAsPlanned.setImportState(importState); + assetAsPlanned.setImportNote(importNote); + }); jpaAssetAsPlannedRepository.saveAll(foundAssets); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java index 57f983bf2e..4e62e4a92f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/IrsClient.java @@ -34,6 +34,7 @@ import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.Payload; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.jetbrains.annotations.Nullable; +import org.springframework.beans.factory.annotation.Value; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; @@ -56,7 +57,8 @@ public class IrsClient { private final TraceabilityProperties traceabilityProperties; - private static final String POLICY_PATH = "/irs/policies"; + @Value("${traceability.irsPoliciesPath}") + String policiesPath = null; public IrsClient(RestTemplate irsAdminTemplate, RestTemplate irsRegularTemplate, @@ -67,12 +69,12 @@ public IrsClient(RestTemplate irsAdminTemplate, } public List getPolicies() { - return irsAdminTemplate.exchange(POLICY_PATH, HttpMethod.GET, null, new ParameterizedTypeReference>() { + return irsAdminTemplate.exchange(policiesPath, HttpMethod.GET, null, new ParameterizedTypeReference>() { }).getBody(); } public void deletePolicy() { - irsAdminTemplate.exchange(POLICY_PATH + "/" + traceabilityProperties.getRightOperand(), HttpMethod.DELETE, null, new ParameterizedTypeReference<>() { + irsAdminTemplate.exchange(policiesPath + "/" + traceabilityProperties.getRightOperand(), HttpMethod.DELETE, null, new ParameterizedTypeReference<>() { }); } @@ -97,7 +99,7 @@ public void registerPolicy() { Payload payload = new Payload(context, policyId, policy); RegisterPolicyRequest registerPolicyRequest = new RegisterPolicyRequest(validUntil.toInstant(), payload); - irsAdminTemplate.exchange(POLICY_PATH, HttpMethod.POST, new HttpEntity<>(registerPolicyRequest), Void.class); + irsAdminTemplate.exchange(policiesPath, HttpMethod.POST, new HttpEntity<>(registerPolicyRequest), Void.class); } public void registerJob(RegisterJobRequest registerJobRequest) { diff --git a/tx-backend/src/main/resources/application.yml b/tx-backend/src/main/resources/application.yml index 56c4c8b05f..6b7d2cf6e9 100644 --- a/tx-backend/src/main/resources/application.yml +++ b/tx-backend/src/main/resources/application.yml @@ -28,6 +28,7 @@ traceability: adminApiKey: ${IRS_ADMIN_API_KEY} regularApiKey: ${IRS_REGULAR_API_KEY} irsBase: ${IRS_URL} + irsPoliciesPath: "/irs/policies" submodelBase: ${SUBMODEL_URL} edc: diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index b3359aa4b7..36775ea48c 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -38,6 +38,7 @@ import org.eclipse.tractusx.traceability.integration.IntegrationTestSpecification; import org.eclipse.tractusx.traceability.integration.common.support.DtrApiSupport; import org.eclipse.tractusx.traceability.integration.common.support.EdcSupport; +import org.eclipse.tractusx.traceability.integration.common.support.IrsApiSupport; import org.eclipse.tractusx.traceability.integration.common.support.OAuth2ApiSupport; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; @@ -73,6 +74,9 @@ class ImportControllerIT extends IntegrationTestSpecification { @Autowired DtrApiSupport dtrApiSupport; + @Autowired + IrsApiSupport irsApiSupport; + @Test void givenValidFile_whenImportData_thenValidationShouldPass() throws JoseException { // given @@ -408,7 +412,8 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInPublishedToCX() th .statusCode(200) .extract().as(ImportResponse.class); - RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("Trace-X policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); + RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("default-policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); + irsApiSupport.irsApiReturnsPolicies(); edcApiSupport.edcWillCreatePolicyDefinition(); edcApiSupport.edcWillCreateAsset(); edcApiSupport.edcWillCreateContractDefinition(); @@ -429,7 +434,7 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInPublishedToCX() th // then eventually(() -> { AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); - assertThat(asset.getPolicyId()).isEqualTo("Trace-X policy"); + assertThat(asset.getPolicyId()).isEqualTo("default-policy"); assertThat(asset.getImportState()).isEqualTo(ImportState.PUBLISHED_TO_CX); dtrApiSupport.verifyDtrCreateShellCalledTimes(1); return true; @@ -452,8 +457,8 @@ void givenValidFile2_whenPublishData_thenStatusShouldChangeToPublishedToCx() thr .statusCode(200) .extract().as(ImportResponse.class); - RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("Trace-X policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); - + RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("default-policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); + irsApiSupport.irsApiReturnsPolicies(); edcApiSupport.edcWillReturnConflictWhenCreatePolicyDefinition(); edcApiSupport.edcWillCreateAsset(); edcApiSupport.edcWillCreateContractDefinition(); @@ -475,7 +480,7 @@ void givenValidFile2_whenPublishData_thenStatusShouldChangeToPublishedToCx() thr eventually(() -> { try { AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); - assertThat(asset.getPolicyId()).isEqualTo("Trace-X policy"); + assertThat(asset.getPolicyId()).isEqualTo("default-policy"); assertThat(asset.getImportState()).isEqualTo(ImportState.PUBLISHED_TO_CX); dtrApiSupport.verifyDtrCreateShellCalledTimes(1); } catch (AssertionFailedError exception) { diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/policy/PolicyControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/policy/PolicyControllerIT.java index fd2c0c3a19..3c824e5e50 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/policy/PolicyControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/policy/PolicyControllerIT.java @@ -27,6 +27,8 @@ import static io.restassured.RestAssured.given; import static org.eclipse.tractusx.traceability.common.security.JwtRole.ADMIN; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.is; class PolicyControllerIT extends IntegrationTestSpecification { @Autowired @@ -45,6 +47,7 @@ void shouldReturnPolicy() throws JoseException { .get("/api/policies") .then() .statusCode(200) + .body("size()", is(1)) .log().all(); } diff --git a/tx-models/src/main/java/assets/importpoc/OperatorTypeResponse.java b/tx-models/src/main/java/assets/importpoc/OperatorTypeResponse.java index d1a4d66bd3..eb360f9ac5 100644 --- a/tx-models/src/main/java/assets/importpoc/OperatorTypeResponse.java +++ b/tx-models/src/main/java/assets/importpoc/OperatorTypeResponse.java @@ -21,11 +21,13 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Getter; @JsonSerialize( using = ToStringSerializer.class ) +@Getter public enum OperatorTypeResponse { EQ("eq", "Equals to"), From a7a6f0f345394747ff5ac5e72e265454e2e967d1 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 12 Mar 2024 22:08:39 +0100 Subject: [PATCH 22/44] feature(tx-backend): #536 cleanup code and adjust for testing externalSubjectIds with own bpn only --- .../assets/domain/base/AssetRepository.java | 1 - .../domain/importpoc/service/DtrService.java | 33 +++++++------------ .../service/MainAspectAsBuiltStrategy.java | 1 - .../importdata/ImportControllerIT.java | 4 --- 4 files changed, 11 insertions(+), 28 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java index 31c229ca2b..5bce90ee48 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/AssetRepository.java @@ -20,7 +20,6 @@ package org.eclipse.tractusx.traceability.assets.domain.base; import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; -import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportNote; import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.assets.domain.base.model.Owner; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 0d0b39ac3a..d4e52ff79b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -34,6 +34,7 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.SubmodelPayloadRepository; import org.eclipse.tractusx.traceability.common.properties.EdcProperties; +import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.eclipse.tractusx.traceability.submodel.domain.repository.SubmodelServerRepository; import org.springframework.stereotype.Service; @@ -53,7 +54,7 @@ public class DtrService { private final SubmodelPayloadRepository submodelPayloadRepository; private final SubmodelServerRepository submodelServerRepository; private final EdcProperties edcProperties; - + private final TraceabilityProperties traceabilityProperties; public String createShellInDtr(final AssetBase assetBase, String submodelServerAssetId) throws CreateDtrShellException { Map payloadByAspectType = submodelPayloadRepository.getTypesAndPayloadsByAssetId(assetBase.getId()); @@ -110,7 +111,7 @@ private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodel } private String getSubProtocol(String submodelServerAssetId) { - final String edcProviderControlplaneUrl = edcProperties.getProviderEdcUrl(); // "https://trace-x-test-edc.dev.demo.catena-x.net" + final String edcProviderControlplaneUrl = edcProperties.getProviderEdcUrl(); return "id=%s;dspEndpoint=%s".formatted(submodelServerAssetId, edcProviderControlplaneUrl); } @@ -131,7 +132,7 @@ private AssetAdministrationShellDescriptor aasFrom(AssetBase assetBase, List aasIdentifiersFromAsset(AssetBase assetBase) { .keys(getExternalSubjectIds()) .build()) .build() - // Python script creates also partInstanceId like below where do I get partInstanceId information ?? -// ,IdentifierKeyValuePair.builder() -// .name("partInstanceId") -// .value(assetBase.getManufacturerPartId()) -// .subjectId(// TODO: for now IRS lib does not support exterrnalSubjectId needs to be implemented -// Reference.builder() -// .type("ExternalReference") -// .keys(getExternalSubjectIds()) -// .build()) -// .build() ); } @@ -178,16 +169,14 @@ private List getExternalSubjectIds() { .build(), SemanticId.builder() .type(GLOBAL_REFERENCE) -// .value(traceabilityProperties.getBpn().toString()) - .value("BPNL00000003CML1") - .build(), - SemanticId.builder() - .type(GLOBAL_REFERENCE) -// .value(traceabilityProperties.getBpn().toString()) - .value("BPNL00000003CNKC") + .value(traceabilityProperties.getBpn().toString()) +// .value("BPNL00000003CML1") .build() - // TODO: Test if it works python script creates GlobalReferences for both instances BPN - // TODO: Last time we used python script with only own bpn in global references other instance could not retrieve assets +// SemanticId.builder() +// .type(GLOBAL_REFERENCE) +//// .value(traceabilityProperties.getBpn().toString()) +// .value("BPNL00000003CNKC") +// .build() // our usage of python script generates following // { // "type": "GlobalReference", diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/MainAspectAsBuiltStrategy.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/MainAspectAsBuiltStrategy.java index 9ed4ae2933..15f09f3393 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/MainAspectAsBuiltStrategy.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/MainAspectAsBuiltStrategy.java @@ -132,7 +132,6 @@ public AssetBase mapToAssetBase(ImportRequest.AssetImportRequest assetImportRequ return AssetBase.builder() .id(assetImportRequestV2.assetMetaInfoRequest().catenaXId()) - //TODO: ASK: We need Id short for shell creation otherways we are not able to map it Back to system from IRS after creating shells with java .semanticModelId(semanticModelId.get()) .detailAspectModels(detailAspectModels) .manufacturerId(manufacturerId.get()) diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index 36775ea48c..601d5b3db4 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -39,7 +39,6 @@ import org.eclipse.tractusx.traceability.integration.common.support.DtrApiSupport; import org.eclipse.tractusx.traceability.integration.common.support.EdcSupport; import org.eclipse.tractusx.traceability.integration.common.support.IrsApiSupport; -import org.eclipse.tractusx.traceability.integration.common.support.OAuth2ApiSupport; import org.hamcrest.Matchers; import org.jose4j.lang.JoseException; import org.junit.jupiter.api.Test; @@ -68,9 +67,6 @@ class ImportControllerIT extends IntegrationTestSpecification { @Autowired EdcSupport edcApiSupport; - @Autowired - OAuth2ApiSupport oAuth2ApiSupport; - @Autowired DtrApiSupport dtrApiSupport; From c78367ae1c24f10ff818df7f291b6dde49fc6ffd Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 12 Mar 2024 22:54:39 +0100 Subject: [PATCH 23/44] feature(tx-backend): #536 remove comment --- .../assets/domain/importpoc/service/DtrService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index d4e52ff79b..b21c33903d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -79,7 +79,7 @@ private List toSubmodelDescriptors(Map created private SubmodelDescriptor toSubmodelDescriptor(String aspectType, UUID submodelServerIdReference, String submodelServerAssetId) { return SubmodelDescriptor.builder() .description(List.of()) - .idShort(aspectTypeToSimpleSubmodelName(aspectType)) // example SingleLevelUsageAsBuilt + .idShort(aspectTypeToSimpleSubmodelName(aspectType)) .id(submodelServerIdReference.toString()) .semanticId( Reference.builder() @@ -127,7 +127,6 @@ private Map.Entry createSubmodel(Map.Entry payload return Map.entry(payloadByAspectType.getKey(), submodelId); } - // Do we have partInstanceId ? python script is generating specificAssetId with part instance id in it private AssetAdministrationShellDescriptor aasFrom(AssetBase assetBase, List descriptors) { return AssetAdministrationShellDescriptor.builder() .globalAssetId(assetBase.getId()) From 0ca983b7b9a1859d8d9d01f966cfb60948243988 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 12 Mar 2024 23:07:31 +0100 Subject: [PATCH 24/44] feature(tx-backend): #536 Missing import state in Import State Response --- .../assets/response/base/response/ImportStateResponse.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java b/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java index a84b2580c4..2d0710c592 100644 --- a/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java +++ b/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java @@ -22,6 +22,5 @@ @ApiModel public enum ImportStateResponse { - TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, UNSET; - + TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, PUBLISHED_TO_CX, UNSET } From 4777ec6c32fcc09d0c2329c4c360d658bab6d7e8 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Tue, 12 Mar 2024 23:55:53 +0100 Subject: [PATCH 25/44] feature(tx-backend): #536 Missing import state in Import State Response --- .../base/irs/model/response/mapping/submodel/MapperHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/mapping/submodel/MapperHelper.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/mapping/submodel/MapperHelper.java index f7bb57e292..121c4c0c75 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/mapping/submodel/MapperHelper.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/base/irs/model/response/mapping/submodel/MapperHelper.java @@ -45,7 +45,7 @@ public static String getShortId(List shells, String globalAssetId) { public static String getContractAgreementId(List shells, String globalAssetId) { return shells.stream() - .filter(shell -> shell.payload().globalAssetId().equals(globalAssetId)) + .filter(shell -> globalAssetId.equals(shell.payload().globalAssetId())) .map(Shell::contractAgreementId) .findFirst() .orElse(null); From 91febf242c9d8f8c4f4f9b2b8f508ce945af0610 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 00:03:36 +0100 Subject: [PATCH 26/44] feature(tx-backend): #536 test --- .../traceability/assets/domain/importpoc/service/DtrService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index b21c33903d..7c4699ac53 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -171,6 +171,7 @@ private List getExternalSubjectIds() { .value(traceabilityProperties.getBpn().toString()) // .value("BPNL00000003CML1") .build() + // TODO: issue with resolving other assets with only one bpn set here !! // SemanticId.builder() // .type(GLOBAL_REFERENCE) //// .value(traceabilityProperties.getBpn().toString()) From aaac1754441178c269a62b8887d692ad542cd6e8 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 00:05:14 +0100 Subject: [PATCH 27/44] feature(tx-backend): #536 test --- .../traceability/assets/domain/importpoc/service/DtrService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 7c4699ac53..7050682fda 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -65,6 +65,7 @@ public String createShellInDtr(final AssetBase assetBase, String submodelServerA List descriptors = toSubmodelDescriptors(createdSubmodelIdByAspectType, submodelServerAssetId); dtrCreateShellService.createShell(aasFrom(assetBase, descriptors)); + return assetBase.getId(); } From 713287465ea364b8e2227d57b97872a4fa913a80 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 00:13:45 +0100 Subject: [PATCH 28/44] feature(tx-backend): #536 test --- .../domain/importpoc/service/DtrService.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 7050682fda..46b29068b8 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -169,15 +169,15 @@ private List getExternalSubjectIds() { .build(), SemanticId.builder() .type(GLOBAL_REFERENCE) - .value(traceabilityProperties.getBpn().toString()) -// .value("BPNL00000003CML1") - .build() +// .value(traceabilityProperties.getBpn().toString()) + .value("BPNL00000003CML1") + .build(), // TODO: issue with resolving other assets with only one bpn set here !! -// SemanticId.builder() -// .type(GLOBAL_REFERENCE) -//// .value(traceabilityProperties.getBpn().toString()) -// .value("BPNL00000003CNKC") -// .build() + SemanticId.builder() + .type(GLOBAL_REFERENCE) +// .value(traceabilityProperties.getBpn().toString()) + .value("BPNL00000003CNKC") + .build() // our usage of python script generates following // { // "type": "GlobalReference", From 2ace6cc2c7f170a8bddf6c502a422989554dc831 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 00:14:53 +0100 Subject: [PATCH 29/44] feature(tx-backend): #536 test specified external subjects --- .../traceability/assets/domain/importpoc/service/DtrService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 46b29068b8..dc6771d80f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -173,6 +173,7 @@ private List getExternalSubjectIds() { .value("BPNL00000003CML1") .build(), // TODO: issue with resolving other assets with only one bpn set here !! + SemanticId.builder() .type(GLOBAL_REFERENCE) // .value(traceabilityProperties.getBpn().toString()) From 516e42c3a1b15018c9f495b0fc45d1b5d46a173d Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 09:46:45 +0100 Subject: [PATCH 30/44] feature(tx-backend): #536 adjust code to create externalSubjectIds from registry.allowedBpns --- .../domain/importpoc/service/DtrService.java | 56 ++++++++----------- tx-backend/src/main/resources/application.yml | 1 + 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index dc6771d80f..4901dc2528 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -34,14 +34,16 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.AssetBase; import org.eclipse.tractusx.traceability.assets.domain.importpoc.repository.SubmodelPayloadRepository; import org.eclipse.tractusx.traceability.common.properties.EdcProperties; -import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.eclipse.tractusx.traceability.submodel.domain.repository.SubmodelServerRepository; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.UUID; import java.util.stream.Collectors; +import java.util.stream.Stream; @Slf4j @Service @@ -54,7 +56,9 @@ public class DtrService { private final SubmodelPayloadRepository submodelPayloadRepository; private final SubmodelServerRepository submodelServerRepository; private final EdcProperties edcProperties; - private final TraceabilityProperties traceabilityProperties; + + @Value("${registry.allowedBpns}") + private final String allowedBpns; public String createShellInDtr(final AssetBase assetBase, String submodelServerAssetId) throws CreateDtrShellException { Map payloadByAspectType = submodelPayloadRepository.getTypesAndPayloadsByAssetId(assetBase.getId()); @@ -162,36 +166,24 @@ List aasIdentifiersFromAsset(AssetBase assetBase) { } private List getExternalSubjectIds() { - return List.of( - SemanticId.builder() - .type(GLOBAL_REFERENCE) - .value("PUBLIC_READABLE") - .build(), - SemanticId.builder() - .type(GLOBAL_REFERENCE) -// .value(traceabilityProperties.getBpn().toString()) - .value("BPNL00000003CML1") - .build(), - // TODO: issue with resolving other assets with only one bpn set here !! + List externalSubjectIds = List.of(SemanticId.builder() + .type(GLOBAL_REFERENCE) + .value("PUBLIC_READABLE") + .build()); + List configurationExternalSubjectIds = getAllowedBpns().stream() + .map(allowedBpn -> + SemanticId.builder() + .type(GLOBAL_REFERENCE) + .value(allowedBpn) + .build() + ) + .toList(); - SemanticId.builder() - .type(GLOBAL_REFERENCE) -// .value(traceabilityProperties.getBpn().toString()) - .value("BPNL00000003CNKC") - .build() - // our usage of python script generates following -// { -// "type": "GlobalReference", -// "value": "PUBLIC_READABLE" -// }, -// { -// "type": "GlobalReference", -// "value": "BPNL00000003CML1" -// }, -// { -// "type": "GlobalReference", -// "value": "BPNL00000003CNKC" -// } - ); + return Stream.concat(externalSubjectIds.stream(), configurationExternalSubjectIds.stream()).toList(); + } + + // TODO: Issue #740 will handle and decide how to avoid having allowed bpns in config ( should be managed by policy to access data ) needs investigation + public List getAllowedBpns() { + return Arrays.stream(allowedBpns.split(",")).toList(); } } diff --git a/tx-backend/src/main/resources/application.yml b/tx-backend/src/main/resources/application.yml index 6b7d2cf6e9..fadf74af7b 100644 --- a/tx-backend/src/main/resources/application.yml +++ b/tx-backend/src/main/resources/application.yml @@ -161,6 +161,7 @@ cors: registry: urlWithPath: ${REGISTRY_URL_WITH_PATH:https://registry.net/semantics/registry/api/v3.0} shellDescriptorUrl: /shell-descriptors + allowedBpns: ${REGISTRY_ALLOWED_BPNS:BPNL00000003CML1,BPNL00000003CNKC} digitalTwinRegistryClient: shellDescriptorTemplate: /shell-descriptors/{aasIdentifier} # The path to retrieve AAS descriptors from the decentral DTR, must contain the placeholder {aasIdentifier} From 41f4b3d4f879ee1a523f169917360a7907e4ed02 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 10:15:14 +0100 Subject: [PATCH 31/44] feature(tx-backend): #536 fix Value injection on allowedBpns --- .../assets/domain/importpoc/service/DtrService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index 4901dc2528..ec8f4847fe 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -58,7 +58,7 @@ public class DtrService { private final EdcProperties edcProperties; @Value("${registry.allowedBpns}") - private final String allowedBpns; + String allowedBpns; public String createShellInDtr(final AssetBase assetBase, String submodelServerAssetId) throws CreateDtrShellException { Map payloadByAspectType = submodelPayloadRepository.getTypesAndPayloadsByAssetId(assetBase.getId()); From c619b984f68615472a559a34270ad17a31ca6002 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 10:58:17 +0100 Subject: [PATCH 32/44] feature(tx-backend): #536 add allowed BPNS to deployment to map from values files --- .../traceability-foss/charts/backend/templates/deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index cd53b7076b..903b4caea3 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -102,6 +102,8 @@ spec: value: {{ .Values.edc.providerDataplaneUrl | quote }} - name: REGISTRY_URL_WITH_PATH value: {{ .Values.registry.urlWithPath | quote }} + - name: REGISTRY_ALLOWED_BPNS + value: { { .Values.registry.allowedBpns | quote } } - name: SUBMODEL_URL value: {{ .Values.submodel.baseUrl | quote }} - name: IRS_URL From 3af89eb0f7a548fd82045ce58dd43d67d6cf6152 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 12:01:32 +0100 Subject: [PATCH 33/44] feature(tx-backend): #536 call synchronize assets after publishing --- .../domain/importpoc/service/AsyncPublishService.java | 3 +++ .../importpoc/service/EdcAssetCreationService.java | 11 ++++++----- .../traceability/common/config/AssetsAsyncConfig.java | 8 ++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java index 4506138b95..6a931e3d58 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java @@ -28,6 +28,7 @@ import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportNote; import org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState; import org.eclipse.tractusx.traceability.common.config.AssetsAsyncConfig; +import org.eclipse.tractusx.traceability.shelldescriptor.domain.service.DecentralRegistryServiceImpl; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -44,6 +45,7 @@ public class AsyncPublishService { private final AssetAsBuiltRepository assetAsBuiltRepository; private final EdcAssetCreationService edcAssetCreationService; private final DtrService dtrService; + private final DecentralRegistryServiceImpl decentralRegistryService; @Async(value = AssetsAsyncConfig.PUBLISH_ASSETS_EXECUTOR) public void publishAssetsToCx(List assets) { @@ -63,5 +65,6 @@ public void publishAssetsToCx(List assets) { }); assetAsBuiltRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CX, ImportNote.PUBLISHED_TO_CX, createdShellsAssetIds); assetAsPlannedRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CX, ImportNote.PUBLISHED_TO_CX, createdShellsAssetIds); + decentralRegistryService.synchronizeAssets(); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index b563093852..f26019b5e8 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -41,6 +41,7 @@ import org.eclipse.tractusx.irs.edc.client.policy.model.exception.EdcPolicyDefinitionAlreadyExists; import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; import org.eclipse.tractusx.traceability.assets.application.importpoc.PolicyService; +import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.CreateEdcResourcesException; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -68,7 +69,7 @@ public String createDtrAndSubmodelAssets(String policyId) { createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy(mapToEdcPolicyRequest(policy)); log.info("DTR Policy Id created :{}", createdPolicyId); } catch (CreateEdcPolicyDefinitionException e) { - throw new RuntimeException(e); + throw new CreateEdcResourcesException(e); } catch (EdcPolicyDefinitionAlreadyExists e) { createdPolicyId = policyId; } @@ -79,7 +80,7 @@ public String createDtrAndSubmodelAssets(String policyId) { dtrAssetId = edcDtrAssetService.createDtrAsset(registryUrlWithPath, REGISTRY_ASSET_ID); log.info("DTR Asset Id created :{}", dtrAssetId); } catch (CreateEdcAssetException e) { - throw new RuntimeException(e); + throw new CreateEdcResourcesException(e); } catch (EdcAssetAlreadyExistsException e) { dtrAssetId = REGISTRY_ASSET_ID; } @@ -90,7 +91,7 @@ public String createDtrAndSubmodelAssets(String policyId) { dtrContractId = edcDtrContractDefinitionService.createContractDefinition(dtrAssetId, createdPolicyId); log.info("DTR Contract Id created :{}", dtrContractId); } catch (CreateEdcContractDefinitionException e) { - throw new RuntimeException(e); + throw new CreateEdcResourcesException(e); } @@ -100,7 +101,7 @@ public String createDtrAndSubmodelAssets(String policyId) { submodelAssetId = edcDtrAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase() + "/api/submodel", submodelAssetIdToCreate); log.info("Submodel Asset Id created :{}", submodelAssetId); } catch (CreateEdcAssetException e) { - throw new RuntimeException(e); + throw new CreateEdcResourcesException(e); } catch (EdcAssetAlreadyExistsException e) { submodelAssetId = submodelAssetIdToCreate; } @@ -110,7 +111,7 @@ public String createDtrAndSubmodelAssets(String policyId) { try { submodelContractId = edcDtrContractDefinitionService.createContractDefinition(submodelAssetId, createdPolicyId); } catch (CreateEdcContractDefinitionException e) { - throw new RuntimeException(e); + throw new CreateEdcResourcesException(e); } log.info("Submodel Contract Id created :{}", submodelContractId); return submodelAssetId; diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/AssetsAsyncConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/AssetsAsyncConfig.java index 77bffd1201..7280534a8c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/AssetsAsyncConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/AssetsAsyncConfig.java @@ -28,11 +28,11 @@ @Configuration public class AssetsAsyncConfig { - public static final String SYNCHRONIZE_ASSETS_EXECUTOR = "synchronize-assets-executor"; - public static final String LOAD_SHELL_DESCRIPTORS_EXECUTOR = "load-shell-descriptors-executor"; - public static final String UPDATE_NOTIFICATION_EXECUTOR = "update-notification-executor"; + public static final String SYNCHRONIZE_ASSETS_EXECUTOR = "synchronizeAssetsExecutor"; + public static final String LOAD_SHELL_DESCRIPTORS_EXECUTOR = "loadShellDescriptorsExecutor"; + public static final String UPDATE_NOTIFICATION_EXECUTOR = "updateNotificationExecutor"; - public static final String PUBLISH_ASSETS_EXECUTOR = "publish-assets-executor"; + public static final String PUBLISH_ASSETS_EXECUTOR = "publishAssetsExecutor"; @Bean(name = PUBLISH_ASSETS_EXECUTOR) public ThreadPoolTaskExecutor publishAssetsExecutor() { From a799f49d90b6d8e2770453790a48180215d455f3 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 12:01:53 +0100 Subject: [PATCH 34/44] feature(tx-backend): #536 commit new exception --- .../CreateEdcResourcesException.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/CreateEdcResourcesException.java diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/CreateEdcResourcesException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/CreateEdcResourcesException.java new file mode 100644 index 0000000000..1b79d77c2a --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/CreateEdcResourcesException.java @@ -0,0 +1,26 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.assets.domain.importpoc.exception; + +public class CreateEdcResourcesException extends RuntimeException{ + public CreateEdcResourcesException(Throwable throwable) { + super(throwable); + } +} From 24b7fedb7f6e7b4d531e19ba13c341abb5963350 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 12:15:12 +0100 Subject: [PATCH 35/44] feature(tx-backend): #536 added more logging to cron job --- .../assets/domain/importpoc/PublishAssetsJob.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java index 5dd07db3c5..bf4e7227d6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java @@ -46,11 +46,13 @@ public class PublishAssetsJob { private final AssetAsPlannedRepository assetAsPlannedRepository; private final PublishService publishService; - @Scheduled(cron = "0 30 1 * * ?", zone = "Europe/Berlin") + @Scheduled(cron = "* 30 */1 * * ?", zone = "Europe/Berlin") public void publishAssets() { + log.info("Start publish assets cron job"); List assetsAsBuiltInSync = assetAsBuiltRepository.findByImportStateIn(ImportState.IN_SYNCHRONIZATION); List assetsAsPlannedInSync = assetAsPlannedRepository.findByImportStateIn(ImportState.IN_SYNCHRONIZATION); List allInSyncAssets = Stream.concat(assetsAsPlannedInSync.stream(), assetsAsBuiltInSync.stream()).toList(); + log.info("Found following assets in state IN_SYNCHRONIZATION to publish {}", allInSyncAssets.stream().map(AssetBase::getId).toList()); publishService.publishAssetsToCx(allInSyncAssets); } } From b8352ed95644704ebb9b895ec277c432a66ac401 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 15:32:27 +0100 Subject: [PATCH 36/44] feature(tx-backend): #536 documentation and adjustment to controller to be able to turn off assets synchronization after publishing to CX --- .../arc42/runtime-view/data-provisioning.adoc | 6 +- .../data-provisioning/publish-assets.adoc | 13 + docs/src/docs/user/user-manual.adoc | 5 +- .../data-consumption-process.puml | 2 +- .../data-provisioning/publish-assets.puml | 21 + ...data-import-interface-modul2-sequence.puml | 22 +- ...data-import-interface-modul3-sequence.puml | 36 +- .../openapi/traceability-foss-backend.json | 8166 +---------------- .../application/importpoc/PublishService.java | 4 +- .../importpoc/rest/ImportController.java | 6 +- .../domain/importpoc/PublishAssetsJob.java | 3 +- .../service/AsyncPublishService.java | 6 +- .../importpoc/service/PublishServiceImpl.java | 11 +- .../importdata/ImportControllerIT.java | 2 +- 14 files changed, 98 insertions(+), 8205 deletions(-) create mode 100644 docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets.adoc create mode 100644 docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets.puml diff --git a/docs/src/docs/arc42/runtime-view/data-provisioning.adoc b/docs/src/docs/arc42/runtime-view/data-provisioning.adoc index 7c331d2046..b32ea7e371 100644 --- a/docs/src/docs/arc42/runtime-view/data-provisioning.adoc +++ b/docs/src/docs/arc42/runtime-view/data-provisioning.adoc @@ -13,7 +13,7 @@ The raw data which is needed for the shared services (DTR / EDC) will be persist include::../../../uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul1-sequence.puml[] .... -Modul 2 - DRAFT +Modul 2 The frontend is able to select assets and publish / syncronize them with the shared services. DTR / EDC / Submodel API. @@ -23,7 +23,7 @@ The frontend is able to select assets and publish / syncronize them with the sha include::../../../uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul2-sequence.puml[] .... -Modul 3 - DRAFT +Modul 3 The backend is able to persist the data in the DTR / EDC and allows to use IRS for resolving assets. @@ -36,3 +36,5 @@ include::../../../uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data TODO: Add all scenarios for data-provisioning include::data-provisioning/return-import-report.adoc[leveloffset=+1] + +include::data-provisioning/publish-assets.adoc[leveloffset=+1] diff --git a/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets.adoc b/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets.adoc new file mode 100644 index 0000000000..7b0dc448bd --- /dev/null +++ b/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets.adoc @@ -0,0 +1,13 @@ += Scenario 2: Publish assets + +This section describes user interaction when publishing assets + +[plantuml,target=import-report-receive,format=svg] +.... +include::../../../../uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets.puml[] +.... + +== Overview + +When a user publishes assets, TraceX-FOSS checks if the user has an adequate role ('ROLE_ADMIN'). +If yes, then endpoint starts to publish assets to network. diff --git a/docs/src/docs/user/user-manual.adoc b/docs/src/docs/user/user-manual.adoc index 78dc45f3a7..a0f5c78d42 100644 --- a/docs/src/docs/user/user-manual.adoc +++ b/docs/src/docs/user/user-manual.adoc @@ -191,7 +191,10 @@ The following table explains the different import state an asset can have: |Asset is uploaded but not synchronized with the Item Relationship Service (IRS). |in_synchronization -|Asset is in the process of synchronizing with the IRS. +|Asset is ready to be published. + +|published_to_cx +|Asset is published, EDC assets, DTR shell, Submodel are created |persistent |Asset is successfully synchronized with the IRS. diff --git a/docs/src/uml-diagrams/arc42/runtime-view/data-consumption-process.puml b/docs/src/uml-diagrams/arc42/runtime-view/data-consumption-process.puml index d2a1543f78..81e4c40908 100644 --- a/docs/src/uml-diagrams/arc42/runtime-view/data-consumption-process.puml +++ b/docs/src/uml-diagrams/arc42/runtime-view/data-consumption-process.puml @@ -24,7 +24,7 @@ TraceX -> TraceX: Extract globalAssetId as CatenaX UUID TraceX -> TraceX: Filter for new CX UUIDs loop for each new CX_UUID - TraceX -> IRS: Register job to get submodel data + TraceX -> IRS: Register job for assets not in TRANSIENT or IN_SYNC import states to get submodel data rnote right TraceX aspects, globalAssetId, bomLifecycle, collectAspects, direction, depth end rnote diff --git a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets.puml b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets.puml new file mode 100644 index 0000000000..4136d80469 --- /dev/null +++ b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets.puml @@ -0,0 +1,21 @@ +@startuml +skinparam monochrome true +skinparam shadowing false +autonumber "[000]" + +actor TraceXApiConsumer +activate TraceXApiConsumer + +box "Trace-X FOSS" #LightGrey +participant TraceX +activate TraceX + +TraceXApiConsumer -> TraceX : POST /assets/publish +TraceX -> TraceX : Module 2 +TraceXApiConsumer -> TraceXApiConsumer : GET /assets + + + + + +@enduml diff --git a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul2-sequence.puml b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul2-sequence.puml index 9dcb7459b4..1526c43747 100644 --- a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul2-sequence.puml +++ b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul2-sequence.puml @@ -1,15 +1,17 @@ @startuml participant FE participant BE +autonumber "[000]" -FE -> BE: [001] request assets: GET/assetsAsxxx -BE --> FE: [002] return assets_as_built OR assets_as_planned -FE -> FE: [003] present assets -FE -> BE: [004] select assets to synchronize: GET/policies -BE --> FE: [005] return policies -FE -> FE: [006] open detailview & assign policy (via dropdown) -FE -> BE: [007] register assets for publishing: POST/assets/sync -BE --> FE: [008] update asset state to IN_SYNC -BE -> BE: [008] trigger 'publish AAS Workflow' (Job scheduler) -FE -> FE: [009] refresh of FE view +FE -> BE: request assets: GET/assetsAsxxx +BE --> FE: return assets_as_built OR assets_as_planned +FE -> FE: present assets +FE -> BE: select assets to synchronize: GET/policies +BE --> FE: return policies +FE -> FE: open detailview & assign policy (via dropdown) +FE -> BE: register assets for publishing: POST/assets/publish +BE -> BE: update asset state to IN_SYNC +BE -> BE: trigger 'publish AAS Workflow' (Job scheduler) +BE -> BE: trigger 'data consumption process' +FE -> FE: refresh of FE view @enduml diff --git a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml index e3902ed4ed..29cf139971 100644 --- a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml +++ b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml @@ -3,19 +3,27 @@ participant BE participant EDC participant Registry participant Submodels +participant Irs +autonumber "[000]" -BE ->> BE: [001] scheduler job -BE ->> BE: [002] receive list of IN_SYNC_assets -BE ->> EDC: [003] create asset in EDC: POST/create/asset -EDC -->> BE: [004] response -BE ->> EDC: [005] create policy in EDC: POST/create/policy -EDC -->> BE: [006] response -BE ->> EDC: [007] create contract in EDC: POST/create/contract -EDC -->> BE: [008] response -BE ->> Submodels: [009] create submodel: POST/submodel -Submodels -->> BE: [010] -BE ->> Registry: [011] register shell in registry: POST/semantics/registry -Registry -->> BE: [012] -BE ->> BE: [013] update asset state PUBLISHED_TO_CX -BE ->> BE: [014] trigger IRS sync +BE ->> BE: scheduler job +BE ->> BE: receive list of IN_SYNC assets +BE ->> Irs: get policy for assets from policy store : GET/irs/policies +Irs -->> BE: response +BE ->> EDC: create policy in EDC: POST/create/policy +EDC -->> BE: response +BE ->> EDC: create DTR asset in EDC: POST/create/asset +EDC -->> BE: response +BE ->> EDC: create DTR contract in EDC: POST/create/contract +EDC -->> BE: response +BE ->> EDC: create Submodel asset in EDC: POST/create/asset +EDC -->> BE: response +BE ->> EDC: create Submodel contract in EDC: POST/create/contract +EDC -->> BE: response +BE ->> Submodels: create submodel: POST/submodel +Submodels -->> BE: +BE ->> Registry: [017] register shell in registry: POST/semantics/registry +Registry -->> BE: +BE ->> BE: update asset state PUBLISHED_TO_CX +BE ->> BE: trigger IRS sync @enduml diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index bedc0e26e6..5edd0220e3 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -1,8165 +1 @@ -{ - "openapi" : "3.0.1", - "info" : { - "title" : "Trace-FOSS - OpenAPI Documentation", - "description" : "Trace-FOSS is a system for tracking parts along the supply chain. A high level of transparency across the supplier network enables faster intervention based on a recorded event in the supply chain. This saves costs by seamlessly tracking parts and creates trust through clearly defined and secure data access by the companies and persons involved in the process.", - "license" : { - "name" : "License: Apache 2.0" - }, - "version" : "1.0.0" - }, - "servers" : [ - { - "url" : "http://localhost:9998/api", - "description" : "Generated server url" - } - ], - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ], - "tags" : [ - { - "name" : "Investigations", - "description" : "Operations on Investigation Notification" - } - ], - "paths" : { - "/bpn-config" : { - "get" : { - "tags" : [ - "BpnEdcMapping" - ], - "summary" : "Get BPN EDC URL mappings", - "description" : "The endpoint returns a result of BPN EDC URL mappings.", - "operationId" : "getBpnEdcs", - "responses" : { - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnEdcMappingResponse" - } - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "put" : { - "tags" : [ - "BpnEdcMapping" - ], - "summary" : "Updates BPN EDC URL mappings", - "description" : "The endpoint updates BPN EDC URL mappings", - "operationId" : "updateBpnEdcMappings", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnMappingRequest" - } - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnEdcMappingResponse" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "post" : { - "tags" : [ - "BpnEdcMapping" - ], - "summary" : "Creates BPN EDC URL mappings", - "description" : "The endpoint creates BPN EDC URL mappings", - "operationId" : "createBpnEdcUrlMappings", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnMappingRequest" - } - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnEdcMappingResponse" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/submodel/data/{submodelId}" : { - "get" : { - "tags" : [ - "Submodel" - ], - "summary" : "Gets Submodel by its id", - "description" : "The endpoint returns Submodel for given id. Used for data providing functionality", - "operationId" : "getSubmodelById", - "parameters" : [ - { - "name" : "submodelId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "post" : { - "tags" : [ - "Submodel" - ], - "summary" : "Save Submodel", - "description" : "This endpoint allows you to save a Submodel identified by its ID.", - "operationId" : "saveSubmodel", - "parameters" : [ - { - "name" : "submodelId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "No Content.", - "content" : { - "application/json" : {} - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok.", - "content" : { - "application/json" : {} - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Start investigations by part ids", - "description" : "The endpoint starts investigations based on part ids provided.", - "operationId" : "investigateAssets", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/StartQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/update" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Update investigations by id", - "description" : "The endpoint updates investigations by their id.", - "operationId" : "updateInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "No content." - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/close" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Close investigations by id", - "description" : "The endpoint closes investigations by their id.", - "operationId" : "closeInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CloseQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "No content." - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/cancel" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Cancles investigations by id", - "description" : "The endpoint cancles investigations by their id.", - "operationId" : "cancelInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/approve" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Approves investigations by id", - "description" : "The endpoint approves investigations by their id.", - "operationId" : "approveInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/filter" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Filter investigations defined by the request body", - "description" : "The endpoint returns investigations as paged result.", - "operationId" : "filterInvestigations", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PageableFilterRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maximum" : 255, - "minimum" : 0, - "maxLength" : 255, - "type" : "integer", - "format" : "int64", - "example" : 66 - }, - "status" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "CREATED", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "DescriptionText" - }, - "createdBy" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "createdByName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "createdDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2023-02-21T21:27:10.734950Z" - }, - "assetIds" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]" - } - }, - "channel" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "SENDER", - "enum" : [ - "SENDER", - "RECEIVER" - ] - }, - "reason" : { - "$ref" : "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "sendToName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "severity" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "MINOR", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "errorMessage" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "EDC not reachable" - }, - "qualityNotificationMessageResponseList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/QualityNotificationMessageResponse" - } - } - } - } - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/edc/notification/contract" : { - "post" : { - "tags" : [ - "Notifications" - ], - "summary" : "Triggers EDC notification contract", - "description" : "The endpoint Triggers EDC notification contract based on notification type and method", - "operationId" : "createNotificationContract", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/publish" : { - "post" : { - "tags" : [ - "AssetsImport", - "AssetsPublish" - ], - "summary" : "asset publish", - "description" : "This endpoint publishes assets to the Catena-X network.", - "operationId" : "publishAssets", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RegisterAssetRequest" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "No Content." - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/import" : { - "post" : { - "tags" : [ - "AssetsImport" - ], - "summary" : "asset upload", - "description" : "This endpoint stores assets in the application. Those can be later published in the Catena-X network.", - "operationId" : "importJson", - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "required" : [ - "file" - ], - "type" : "object", - "properties" : { - "file" : { - "type" : "string", - "format" : "binary" - } - } - } - } - } - }, - "responses" : { - "204" : { - "description" : "No Content." - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/sync" : { - "post" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Synchronizes assets from IRS", - "description" : "The endpoint synchronizes the assets from irs.", - "operationId" : "sync", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncAssetsRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created." - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/detail-information" : { - "post" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Searches for assets by ids.", - "description" : "The endpoint searchs for assets by id and returns a list of them.", - "operationId" : "getDetailInformation", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetDetailInformationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/sync" : { - "post" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Synchronizes assets from IRS", - "description" : "The endpoint synchronizes the assets from irs.", - "operationId" : "sync_1", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncAssetsRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created." - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/detail-information" : { - "post" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Searches for assets by ids.", - "description" : "The endpoint searchs for assets by id and returns a list of them.", - "operationId" : "getDetailInformation_1", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetDetailInformationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Start alert by part ids", - "description" : "The endpoint starts alert based on part ids provided.", - "operationId" : "alertAssets", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/StartQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/update" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Update alert by id", - "description" : "The endpoint updates alert by their id.", - "operationId" : "updateAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "No content." - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/close" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Close alert by id", - "description" : "The endpoint closes alert by id.", - "operationId" : "closeAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CloseQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "No content." - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/cancel" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Cancels alert by id", - "description" : "The endpoint cancels alert by id.", - "operationId" : "cancelAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/approve" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Approves alert by id", - "description" : "The endpoint approves alert by id.", - "operationId" : "approveAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/filter" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Filter alerts defined by the request body", - "description" : "The endpoint returns alerts as paged result.", - "operationId" : "filterAlerts", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PageableFilterRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maximum" : 255, - "minimum" : 0, - "maxLength" : 255, - "type" : "integer", - "format" : "int64", - "example" : 66 - }, - "status" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "CREATED", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "DescriptionText" - }, - "createdBy" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "createdByName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "createdDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2023-02-21T21:27:10.734950Z" - }, - "assetIds" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]" - } - }, - "channel" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "SENDER", - "enum" : [ - "SENDER", - "RECEIVER" - ] - }, - "reason" : { - "$ref" : "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "sendToName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "severity" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "MINOR", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "errorMessage" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "EDC not reachable" - }, - "qualityNotificationMessageResponseList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/QualityNotificationMessageResponse" - } - } - } - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/{assetId}" : { - "get" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Get asset by id", - "description" : "The endpoint returns an asset filtered by id .", - "operationId" : "assetById", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the assets found", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "patch" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Updates asset", - "description" : "The endpoint updates asset by provided quality type.", - "operationId" : "updateAsset", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateAssetRequest" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "description" : "Returns the updated asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/{assetId}" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get asset by id", - "description" : "The endpoint returns an asset filtered by id .", - "operationId" : "assetById_1", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the assets found", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "patch" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Updates asset", - "description" : "The endpoint updates asset by provided quality type.", - "operationId" : "updateAsset_1", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateAssetRequest" - } - } - }, - "required" : true - }, - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the updated asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/registry/reload" : { - "get" : { - "tags" : [ - "Registry" - ], - "summary" : "Triggers reload of shell descriptors", - "description" : "The endpoint Triggers reload of shell descriptors.", - "operationId" : "reload", - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "202" : { - "description" : "Created registry reload job." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/policies" : { - "get" : { - "tags" : [ - "Policies" - ], - "summary" : "Get all policies ", - "description" : "The endpoint returns all policies .", - "operationId" : "policy", - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the policies", - "content" : { - "*/*" : { - "schema" : { - "$ref" : "#/components/schemas/PolicyResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}" : { - "get" : { - "tags" : [ - "Investigations" - ], - "summary" : "Gets investigations by id", - "description" : "The endpoint returns investigations as paged result by their id.", - "operationId" : "getInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "$ref" : "#/components/schemas/InvestigationResponse" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/distinctFilterValues" : { - "get" : { - "tags" : [ - "Assets", - "Investigations" - ], - "summary" : "getDistinctFilterValues", - "description" : "The endpoint returns a distinct filter values for given fieldName.", - "operationId" : "distinctFilterValues", - "parameters" : [ - { - "name" : "fieldName", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "size", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, - { - "name" : "startWith", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "channel", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ - "SENDER", - "RECEIVER" - ] - } - } - ], - "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/dashboard" : { - "get" : { - "tags" : [ - "Dashboard" - ], - "summary" : "Returns dashboard related data", - "description" : "The endpoint can return limited data based on the user role", - "operationId" : "dashboard", - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns dashboard data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/import/report/{importJobId}" : { - "get" : { - "tags" : [ - "ImportReport", - "AssetsImport" - ], - "summary" : "report of the imported assets", - "description" : "This endpoint returns information about the imported assets to Trace-X.", - "operationId" : "importReport", - "parameters" : [ - { - "name" : "importJobId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "204" : { - "description" : "No Content." - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ImportReportResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned" : { - "get" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Get assets by pagination", - "description" : "The endpoint returns a paged result of assets.", - "operationId" : "AssetsAsPlanned", - "parameters" : [ - { - "name" : "pageable", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/OwnPageable" - } - }, - { - "name" : "filter", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/distinctFilterValues" : { - "get" : { - "tags" : [ - "Assets", - "AssetsAsPlanned" - ], - "summary" : "getDistinctFilterValues", - "description" : "The endpoint returns a distinct filter values for given fieldName.", - "operationId" : "distinctFilterValues_1", - "parameters" : [ - { - "name" : "fieldName", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "size", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, - { - "name" : "startWith", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "owner", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - } - } - ], - "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/*/children/{childId}" : { - "get" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Get asset by child id", - "description" : "The endpoint returns an asset filtered by child id.", - "operationId" : "assetByChildIdAndAssetId", - "parameters" : [ - { - "name" : "childId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the asset by childId", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get assets by pagination", - "description" : "The endpoint returns a paged result of assets.", - "operationId" : "assets", - "parameters" : [ - { - "name" : "pageable", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/OwnPageable" - } - }, - { - "name" : "searchCriteriaRequestParam", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/distinctFilterValues" : { - "get" : { - "tags" : [ - "AssetsAsBuilt", - "Assets" - ], - "summary" : "getDistinctFilterValues", - "description" : "The endpoint returns a distinct filter values for given fieldName.", - "operationId" : "distinctFilterValues_2", - "parameters" : [ - { - "name" : "fieldName", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "size", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, - { - "name" : "startWith", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "owner", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - } - } - ], - "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/countries" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get map of assets", - "description" : "The endpoint returns a map for assets consumed by the map.", - "operationId" : "assetsCountryMap", - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the assets found", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/*/children/{childId}" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get asset by child id", - "description" : "The endpoint returns an asset filtered by child id.", - "operationId" : "assetByChildId", - "parameters" : [ - { - "name" : "childId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the asset by childId", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - } - } - } - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}" : { - "get" : { - "tags" : [ - "Alerts" - ], - "summary" : "Gets Alert by id", - "description" : "The endpoint returns alert by id.", - "operationId" : "getAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "$ref" : "#/components/schemas/AlertResponse" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/distinctFilterValues" : { - "get" : { - "tags" : [ - "Assets", - "Alerts" - ], - "summary" : "getDistinctFilterValues", - "description" : "The endpoint returns a distinct filter values for given fieldName.", - "operationId" : "distinctFilterValues_3", - "parameters" : [ - { - "name" : "fieldName", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "size", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, - { - "name" : "startWith", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "channel", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ - "SENDER", - "RECEIVER" - ] - } - } - ], - "responses" : { - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/submodel/data" : { - "delete" : { - "tags" : [ - "Submodel" - ], - "summary" : "Delete All Submodels", - "description" : "Deletes all submodels from the system.", - "operationId" : "deleteSubmodels", - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No Content." - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/bpn-config/{bpn}" : { - "delete" : { - "tags" : [ - "BpnEdcMapping" - ], - "summary" : "Deletes BPN EDC URL mappings", - "description" : "The endpoint deletes BPN EDC URL mappings", - "operationId" : "deleteBpnEdcUrlMappings", - "parameters" : [ - { - "name" : "bpn", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "Deleted." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Okay" - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - } - }, - "components" : { - "schemas" : { - "BpnMappingRequest" : { - "required" : [ - "bpn", - "url" - ], - "type" : "object", - "properties" : { - "bpn" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "url" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string" - } - } - }, - "ErrorResponse" : { - "type" : "object", - "properties" : { - "message" : { - "maxLength" : 1000, - "minLength" : 0, - "pattern" : "^.*$", - "type" : "string", - "example" : "Access Denied" - } - } - }, - "BpnEdcMappingResponse" : { - "type" : "object", - "properties" : { - "bpn" : { - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "url" : { - "type" : "string", - "example" : "https://trace-x-test-edc.dev.demo.catena-x.net/a1" - } - } - }, - "StartQualityNotificationRequest" : { - "required" : [ - "severity" - ], - "type" : "object", - "properties" : { - "partIds" : { - "maxLength" : 100, - "minLength" : 1, - "maxItems" : 50, - "minItems" : 1, - "type" : "array", - "example" : [ - "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978" - ], - "items" : { - "maxLength" : 100, - "minLength" : 1, - "type" : "string", - "example" : "[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]" - } - }, - "description" : { - "maxLength" : 1000, - "minLength" : 15, - "type" : "string", - "example" : "The description" - }, - "targetDate" : { - "type" : "string", - "format" : "date-time", - "example" : "2099-03-11T22:44:06.333826952Z" - }, - "severity" : { - "type" : "string", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE_THREATENING" - ] - }, - "receiverBpn" : { - "type" : "string", - "example" : "BPN00001123123AS" - }, - "asBuilt" : { - "type" : "boolean" - } - } - }, - "QualityNotificationIdResponse" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - } - }, - "UpdateQualityNotificationRequest" : { - "required" : [ - "status" - ], - "type" : "object", - "properties" : { - "status" : { - "type" : "string", - "description" : "The UpdateInvestigationStatus", - "enum" : [ - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED" - ] - }, - "reason" : { - "type" : "string", - "example" : "The reason." - } - } - }, - "CloseQualityNotificationRequest" : { - "type" : "object", - "properties" : { - "reason" : { - "maxLength" : 1000, - "minLength" : 15, - "type" : "string", - "example" : "The reason." - } - } - }, - "OwnPageable" : { - "type" : "object", - "properties" : { - "page" : { - "type" : "integer", - "format" : "int32" - }, - "size" : { - "type" : "integer", - "format" : "int32" - }, - "sort" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Content of Assets PageResults", - "example" : "manufacturerPartId,desc", - "items" : { - "type" : "string" - } - } - } - }, - "PageableFilterRequest" : { - "type" : "object", - "properties" : { - "pageAble" : { - "$ref" : "#/components/schemas/OwnPageable" - }, - "searchCriteria" : { - "$ref" : "#/components/schemas/SearchCriteriaRequestParam" - } - } - }, - "SearchCriteriaRequestParam" : { - "type" : "object", - "properties" : { - "filter" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Filter Criteria", - "example" : "owner,EQUAL,OWN", - "items" : { - "type" : "string" - } - } - } - }, - "InvestigationResponse" : { - "type" : "object", - "properties" : { - "id" : { - "maximum" : 255, - "minimum" : 0, - "maxLength" : 255, - "type" : "integer", - "format" : "int64", - "example" : 66 - }, - "status" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "CREATED", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "DescriptionText" - }, - "createdBy" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "createdByName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "createdDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2023-02-21T21:27:10.734950Z" - }, - "assetIds" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]" - } - }, - "channel" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "SENDER", - "enum" : [ - "SENDER", - "RECEIVER" - ] - }, - "reason" : { - "$ref" : "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "sendToName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "severity" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "MINOR", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "errorMessage" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "EDC not reachable" - }, - "qualityNotificationMessageResponseList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/QualityNotificationMessageResponse" - } - } - } - }, - "QualityNotificationMessageResponse" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string" - }, - "createdBy" : { - "type" : "string" - }, - "createdByName" : { - "type" : "string" - }, - "sendTo" : { - "type" : "string" - }, - "sendToName" : { - "type" : "string" - }, - "edcUrl" : { - "type" : "string" - }, - "contractAgreementId" : { - "type" : "string" - }, - "notificationReferenceId" : { - "type" : "string" - }, - "targetDate" : { - "type" : "string", - "format" : "date-time" - }, - "severity" : { - "type" : "string", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "edcNotificationId" : { - "type" : "string" - }, - "created" : { - "type" : "string", - "format" : "date-time" - }, - "updated" : { - "type" : "string", - "format" : "date-time" - }, - "messageId" : { - "type" : "string" - }, - "isInitial" : { - "type" : "boolean" - }, - "status" : { - "type" : "string", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "errorMessage" : { - "type" : "string" - } - } - }, - "QualityNotificationReasonResponse" : { - "type" : "object", - "properties" : { - "close" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "description of closing reason" - }, - "accept" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "description of accepting reason" - }, - "decline" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "description of declining reason" - } - } - }, - "CreateNotificationContractRequest" : { - "required" : [ - "notificationMethod", - "notificationType" - ], - "type" : "object", - "properties" : { - "notificationType" : { - "type" : "string", - "enum" : [ - "QUALITY_INVESTIGATION", - "QUALITY_ALERT" - ] - }, - "notificationMethod" : { - "type" : "string", - "enum" : [ - "RECEIVE", - "UPDATE", - "RESOLVE" - ] - } - } - }, - "CreateNotificationContractResponse" : { - "type" : "object", - "properties" : { - "notificationAssetId" : { - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "accessPolicyId" : { - "type" : "string", - "example" : "123" - }, - "contractDefinitionId" : { - "type" : "string", - "example" : "456" - } - } - }, - "RegisterAssetRequest" : { - "required" : [ - "assetIds", - "policyId" - ], - "type" : "object", - "properties" : { - "policyId" : { - "type" : "string", - "example" : "a644a7cb-3de5-493b-9259-f01db315a46e" - }, - "assetIds" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "SyncAssetsRequest" : { - "type" : "object", - "properties" : { - "globalAssetIds" : { - "maxItems" : 100, - "minItems" : 1, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]" - } - } - } - }, - "GetDetailInformationRequest" : { - "type" : "object", - "properties" : { - "assetIds" : { - "maxLength" : 50, - "minLength" : 1, - "maxItems" : 50, - "minItems" : 1, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - ], - "items" : { - "maxLength" : 50, - "minLength" : 1, - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]" - } - } - } - }, - "DescriptionsResponse" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:a4a26b9c-9460-4cc5-8645-85916b86adb0" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - } - } - }, - "DetailAspectDataAsBuiltResponse" : { - "type" : "object", - "properties" : { - "partId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "95657762-59" - }, - "customerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "01697F7-65" - }, - "nameAtCustomer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Door front-left" - }, - "manufacturingCountry" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "DEU" - }, - "manufacturingDate" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "2022-02-04T13:48:54Z" - } - } - }, - "DetailAspectDataAsPlannedResponse" : { - "type" : "object", - "properties" : { - "validityPeriodFrom" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "2022-09-26T12:43:51.079Z" - }, - "validityPeriodTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "20232-07-13T12:00:00.000Z" - } - } - }, - "DetailAspectDataResponse" : { - "type" : "object", - "oneOf" : [ - { - "$ref" : "#/components/schemas/DetailAspectDataAsBuiltResponse" - }, - { - "$ref" : "#/components/schemas/DetailAspectDataAsPlannedResponse" - }, - { - "$ref" : "#/components/schemas/PartSiteInformationAsPlannedResponse" - }, - { - "$ref" : "#/components/schemas/DetailAspectDataTractionBatteryCodeResponse" - } - ] - }, - "DetailAspectDataTractionBatteryCodeResponse" : { - "type" : "object", - "properties" : { - "productType" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "pack" - }, - "tractionBatteryCode" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "X12MCPM27KLPCLX2M2382320" - }, - "subcomponents" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectDataTractionBatteryCodeSubcomponentResponse" - } - } - } - }, - "DetailAspectDataTractionBatteryCodeSubcomponentResponse" : { - "type" : "object", - "properties" : { - "productType" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "pack" - }, - "tractionBatteryCode" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "X12MCPM27KLPCLX2M2382320" - } - } - }, - "DetailAspectModelResponse" : { - "type" : "object", - "properties" : { - "type" : { - "type" : "string", - "example" : "PART_SITE_INFORMATION_AS_PLANNED", - "enum" : [ - "AS_BUILT", - "AS_PLANNED", - "TRACTION_BATTERY_CODE", - "SINGLE_LEVEL_BOM_AS_BUILT", - "SINGLE_LEVEL_USAGE_AS_BUILT", - "SINGLE_LEVEL_BOM_AS_PLANNED", - "PART_SITE_INFORMATION_AS_PLANNED" - ] - }, - "data" : { - "$ref" : "#/components/schemas/DetailAspectDataResponse" - } - } - }, - "PartSiteInformationAsPlannedResponse" : { - "type" : "object", - "properties" : { - "functionValidUntil" : { - "type" : "string", - "example" : "2025-02-08T04:30:48.000Z" - }, - "function" : { - "type" : "string", - "example" : "production" - }, - "functionValidFrom" : { - "type" : "string", - "example" : "2023-10-13T14:30:45+01:00" - }, - "catenaXSiteId" : { - "type" : "string", - "example" : "urn:uuid:0fed587c-7ab4-4597-9841-1718e9693003" - } - } - }, - "AlertResponse" : { - "type" : "object", - "properties" : { - "id" : { - "maximum" : 255, - "minimum" : 0, - "maxLength" : 255, - "type" : "integer", - "format" : "int64", - "example" : 66 - }, - "status" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "CREATED", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "DescriptionText" - }, - "createdBy" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "createdByName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "createdDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2023-02-21T21:27:10.734950Z" - }, - "assetIds" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]" - } - }, - "channel" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "SENDER", - "enum" : [ - "SENDER", - "RECEIVER" - ] - }, - "reason" : { - "$ref" : "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "sendToName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "severity" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "MINOR", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "errorMessage" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "EDC not reachable" - }, - "qualityNotificationMessageResponseList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/QualityNotificationMessageResponse" - } - } - } - }, - "UpdateAssetRequest" : { - "required" : [ - "qualityType" - ], - "type" : "object", - "properties" : { - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - } - } - }, - "ConstraintResponse" : { - "type" : "object", - "properties" : { - "leftOperand" : { - "type" : "string", - "example" : "PURPOSE" - }, - "operatorTypeResponse" : { - "type" : "string", - "enum" : [ - "EQ", - "NEQ", - "LT", - "GT", - "IN", - "LTEQ", - "GTEQ", - "ISA", - "HASPART", - "ISPARTOF", - "ISONEOF", - "ISALLOF", - "ISNONEOF" - ] - }, - "rightOperands" : { - "type" : "array", - "example" : "ID Trace 3.1", - "items" : { - "type" : "string", - "example" : "ID Trace 3.1" - } - } - } - }, - "ConstraintsResponse" : { - "type" : "object", - "properties" : { - "and" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConstraintResponse" - } - }, - "or" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConstraintResponse" - } - } - } - }, - "PermissionResponse" : { - "type" : "object", - "properties" : { - "action" : { - "type" : "string", - "example" : "USE", - "enum" : [ - "ACCESS", - "USE" - ] - }, - "constraints" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConstraintsResponse" - } - } - } - }, - "PolicyResponse" : { - "type" : "object", - "properties" : { - "policyId" : { - "type" : "string", - "example" : "5a00bb50-0253-405f-b9f1-1a3150b9d51d" - }, - "createdOn" : { - "type" : "string", - "format" : "date-time" - }, - "validUntil" : { - "type" : "string", - "format" : "date-time" - }, - "permissions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PermissionResponse" - } - } - } - }, - "DashboardResponse" : { - "type" : "object", - "properties" : { - "asBuiltCustomerParts" : { - "type" : "integer", - "format" : "int64", - "example" : 5 - }, - "asPlannedCustomerParts" : { - "type" : "integer", - "format" : "int64", - "example" : 10 - }, - "asBuiltSupplierParts" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "asPlannedSupplierParts" : { - "type" : "integer", - "format" : "int64", - "example" : 3 - }, - "asBuiltOwnParts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "asPlannedOwnParts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "myPartsWithOpenAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "myPartsWithOpenInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "supplierPartsWithOpenAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "customerPartsWithOpenAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "supplierPartsWithOpenInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "customerPartsWithOpenInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "receivedActiveAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "receivedActiveInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "sentActiveAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "sentActiveInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - } - }, - "ImportJobResponse" : { - "type" : "object", - "properties" : { - "importJobStatus" : { - "type" : "string", - "enum" : [ - "INITIALIZING", - "RUNNING", - "ERROR", - "COMPLETED" - ] - }, - "importId" : { - "type" : "string", - "example" : "456a952e-05eb-40dc-a6f2-9c2cb9c1387f" - }, - "startedOn" : { - "maxLength" : 50, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "completedOn" : { - "maxLength" : 50, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - } - } - }, - "ImportReportResponse" : { - "type" : "object", - "properties" : { - "importJob" : { - "$ref" : "#/components/schemas/ImportJobResponse" - }, - "importedAsset" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ImportedAssetResponse" - } - } - } - }, - "ImportedAssetResponse" : { - "type" : "object", - "properties" : { - "importState" : { - "type" : "string", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "UNSET" - ] - }, - "catenaxId" : { - "type" : "string", - "example" : "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd}" - }, - "importedOn" : { - "maxLength" : 50, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "importMessage" : { - "type" : "string", - "example" : "Asset created successfully in transient state." - } - } - } - }, - "securitySchemes" : { - "oAuth2" : { - "type" : "oauth2", - "flows" : { - "clientCredentials" : { - "tokenUrl" : "localhost", - "scopes" : { - "profile email" : "" - } - } - } - } - } - } -} +{"openapi":"3.0.1","info":{"title":"Trace-FOSS - OpenAPI Documentation","description":"Trace-FOSS is a system for tracking parts along the supply chain. A high level of transparency across the supplier network enables faster intervention based on a recorded event in the supply chain. This saves costs by seamlessly tracking parts and creates trust through clearly defined and secure data access by the companies and persons involved in the process.","license":{"name":"License: Apache 2.0"},"version":"1.0.0"},"servers":[{"url":"http://localhost:9998/api","description":"Generated server url"}],"security":[{"oAuth2":["profile email"]}],"tags":[{"name":"Investigations","description":"Operations on Investigation Notification"}],"paths":{"/bpn-config":{"get":{"tags":["BpnEdcMapping"],"summary":"Get BPN EDC URL mappings","description":"The endpoint returns a result of BPN EDC URL mappings.","operationId":"getBpnEdcs","responses":{"200":{"description":"Returns the paged result found","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"put":{"tags":["BpnEdcMapping"],"summary":"Updates BPN EDC URL mappings","description":"The endpoint updates BPN EDC URL mappings","operationId":"updateBpnEdcMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["BpnEdcMapping"],"summary":"Creates BPN EDC URL mappings","description":"The endpoint creates BPN EDC URL mappings","operationId":"createBpnEdcUrlMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data/{submodelId}":{"get":{"tags":["Submodel"],"summary":"Gets Submodel by its id","description":"The endpoint returns Submodel for given id. Used for data providing functionality","operationId":"getSubmodelById","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found","content":{"application/json":{}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["Submodel"],"summary":"Save Submodel","description":"This endpoint allows you to save a Submodel identified by its ID.","operationId":"saveSubmodel","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"204":{"description":"No Content.","content":{"application/json":{}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok.","content":{"application/json":{}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations":{"post":{"tags":["Investigations"],"summary":"Start investigations by part ids","description":"The endpoint starts investigations based on part ids provided.","operationId":"investigateAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/update":{"post":{"tags":["Investigations"],"summary":"Update investigations by id","description":"The endpoint updates investigations by their id.","operationId":"updateInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/close":{"post":{"tags":["Investigations"],"summary":"Close investigations by id","description":"The endpoint closes investigations by their id.","operationId":"closeInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/cancel":{"post":{"tags":["Investigations"],"summary":"Cancles investigations by id","description":"The endpoint cancles investigations by their id.","operationId":"cancelInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/approve":{"post":{"tags":["Investigations"],"summary":"Approves investigations by id","description":"The endpoint approves investigations by their id.","operationId":"approveInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/filter":{"post":{"tags":["Investigations"],"summary":"Filter investigations defined by the request body","description":"The endpoint returns investigations as paged result.","operationId":"filterInvestigations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"minItems":-2147483648,"type":"array","description":"Investigations","items":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}}}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/edc/notification/contract":{"post":{"tags":["Notifications"],"summary":"Triggers EDC notification contract","description":"The endpoint Triggers EDC notification contract based on notification type and method","operationId":"createNotificationContract","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/contracts":{"post":{"tags":["getContracts","Contracts"],"summary":"All contract agreements for all assets","description":"This endpoint returns all contract agreements for alls assets in Trace-X","operationId":"contracts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","description":"PageResults","items":{"$ref":"#/components/schemas/PageResultContractResponse"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/publish":{"post":{"tags":["AssetsImport","AssetsPublish"],"summary":"asset publish","description":"This endpoint publishes assets to the Catena-X network.","operationId":"publishAssets","parameters":[{"name":"triggerSynchronizeAssets","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAssetRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/import":{"post":{"tags":["AssetsImport"],"summary":"asset upload","description":"This endpoint stores assets in the application. Those can be later published in the Catena-X network.","operationId":"importJson","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/sync":{"post":{"tags":["AssetsAsPlanned"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/detail-information":{"post":{"tags":["AssetsAsPlanned"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/sync":{"post":{"tags":["AssetsAsBuilt"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/detail-information":{"post":{"tags":["AssetsAsBuilt"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts":{"post":{"tags":["Alerts"],"summary":"Start alert by part ids","description":"The endpoint starts alert based on part ids provided.","operationId":"alertAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/update":{"post":{"tags":["Alerts"],"summary":"Update alert by id","description":"The endpoint updates alert by their id.","operationId":"updateAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/close":{"post":{"tags":["Alerts"],"summary":"Close alert by id","description":"The endpoint closes alert by id.","operationId":"closeAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/cancel":{"post":{"tags":["Alerts"],"summary":"Cancels alert by id","description":"The endpoint cancels alert by id.","operationId":"cancelAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/approve":{"post":{"tags":["Alerts"],"summary":"Approves alert by id","description":"The endpoint approves alert by id.","operationId":"approveAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/filter":{"post":{"tags":["Alerts"],"summary":"Filter alerts defined by the request body","description":"The endpoint returns alerts as paged result.","operationId":"filterAlerts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Alerts","items":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/{assetId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsPlanned"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/{assetId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsBuilt"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/registry/reload":{"get":{"tags":["Registry"],"summary":"Triggers reload of shell descriptors","description":"The endpoint Triggers reload of shell descriptors.","operationId":"reload","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"202":{"description":"Created registry reload job."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/policies":{"get":{"tags":["Policies"],"summary":"Get all policies ","description":"The endpoint returns all policies .","operationId":"policy","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the policies","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}":{"get":{"tags":["Investigations"],"summary":"Gets investigations by id","description":"The endpoint returns investigations as paged result by their id.","operationId":"getInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":-2147483648,"type":"array","description":"Investigations","items":{"$ref":"#/components/schemas/InvestigationResponse"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/distinctFilterValues":{"get":{"tags":["Assets","Investigations"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/dashboard":{"get":{"tags":["Dashboard"],"summary":"Returns dashboard related data","description":"The endpoint can return limited data based on the user role","operationId":"dashboard","responses":{"200":{"description":"Returns dashboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/import/report/{importJobId}":{"get":{"tags":["ImportReport","AssetsImport"],"summary":"report of the imported assets","description":"This endpoint returns information about the imported assets to Trace-X.","operationId":"importReport","parameters":[{"name":"importJobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportReportResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"AssetsAsPlanned","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"filter","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/distinctFilterValues":{"get":{"tags":["Assets","AssetsAsPlanned"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_1","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/*/children/{childId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildIdAndAssetId","parameters":[{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"assets","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"searchCriteriaRequestParam","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/distinctFilterValues":{"get":{"tags":["AssetsAsBuilt","Assets"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_2","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/countries":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get map of assets","description":"The endpoint returns a map for assets consumed by the map.","operationId":"assetsCountryMap","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/*/children/{childId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildId","parameters":[{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}":{"get":{"tags":["Alerts"],"summary":"Gets Alert by id","description":"The endpoint returns alert by id.","operationId":"getAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Alerts","items":{"$ref":"#/components/schemas/AlertResponse"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/distinctFilterValues":{"get":{"tags":["Assets","Alerts"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_3","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data":{"delete":{"tags":["Submodel"],"summary":"Delete All Submodels","description":"Deletes all submodels from the system.","operationId":"deleteSubmodels","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/bpn-config/{bpn}":{"delete":{"tags":["BpnEdcMapping"],"summary":"Deletes BPN EDC URL mappings","description":"The endpoint deletes BPN EDC URL mappings","operationId":"deleteBpnEdcUrlMappings","parameters":[{"name":"bpn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Deleted."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Okay"},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}}},"components":{"schemas":{"BpnMappingRequest":{"required":["bpn","url"],"type":"object","properties":{"bpn":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"url":{"maxLength":255,"minLength":0,"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"maxLength":1000,"minLength":0,"pattern":"^.*$","type":"string","example":"Access Denied"}}},"BpnEdcMappingResponse":{"type":"object","properties":{"bpn":{"type":"string","example":"BPNL00000003CSGV"},"url":{"type":"string","example":"https://trace-x-test-edc.dev.demo.catena-x.net/a1"}}},"StartQualityNotificationRequest":{"required":["severity"],"type":"object","properties":{"partIds":{"maxLength":100,"minLength":1,"maxItems":50,"minItems":1,"type":"array","example":["urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"],"items":{"maxLength":100,"minLength":1,"type":"string","example":"[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]"}},"description":{"maxLength":1000,"minLength":15,"type":"string","example":"The description"},"targetDate":{"type":"string","format":"date-time","example":"2099-03-11T22:44:06.333826952Z"},"severity":{"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE_THREATENING"]},"receiverBpn":{"type":"string","example":"BPN00001123123AS"},"asBuilt":{"type":"boolean"}}},"QualityNotificationIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1}}},"UpdateQualityNotificationRequest":{"required":["status"],"type":"object","properties":{"status":{"type":"string","description":"The UpdateInvestigationStatus","enum":["ACKNOWLEDGED","ACCEPTED","DECLINED"]},"reason":{"type":"string","example":"The reason."}}},"CloseQualityNotificationRequest":{"type":"object","properties":{"reason":{"maxLength":1000,"minLength":15,"type":"string","example":"The reason."}}},"OwnPageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"sort":{"maxItems":2147483647,"type":"array","description":"Content of Assets PageResults","example":"manufacturerPartId,desc","items":{"type":"string"}}}},"PageableFilterRequest":{"type":"object","properties":{"pageAble":{"$ref":"#/components/schemas/OwnPageable"},"searchCriteria":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}},"SearchCriteriaRequestParam":{"type":"object","properties":{"filter":{"maxItems":2147483647,"type":"array","description":"Filter Criteria","example":"owner,EQUAL,OWN","items":{"type":"string"}}}},"InvestigationResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}},"QualityNotificationMessageResponse":{"type":"object","properties":{"id":{"type":"string"},"createdBy":{"type":"string"},"createdByName":{"type":"string"},"sendTo":{"type":"string"},"sendToName":{"type":"string"},"edcUrl":{"type":"string"},"contractAgreementId":{"type":"string"},"notificationReferenceId":{"type":"string"},"targetDate":{"type":"string","format":"date-time"},"severity":{"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"edcNotificationId":{"type":"string"},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"messageId":{"type":"string"},"isInitial":{"type":"boolean"},"status":{"type":"string","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"errorMessage":{"type":"string"}}},"QualityNotificationReasonResponse":{"type":"object","properties":{"close":{"maxLength":1000,"minLength":0,"type":"string","example":"description of closing reason"},"accept":{"maxLength":1000,"minLength":0,"type":"string","example":"description of accepting reason"},"decline":{"maxLength":1000,"minLength":0,"type":"string","example":"description of declining reason"}}},"CreateNotificationContractRequest":{"required":["notificationMethod","notificationType"],"type":"object","properties":{"notificationType":{"type":"string","enum":["QUALITY_INVESTIGATION","QUALITY_ALERT"]},"notificationMethod":{"type":"string","enum":["RECEIVE","UPDATE","RESOLVE"]}}},"CreateNotificationContractResponse":{"type":"object","properties":{"notificationAssetId":{"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"accessPolicyId":{"type":"string","example":"123"},"contractDefinitionId":{"type":"string","example":"456"}}},"ContractResponse":{"type":"object","properties":{"contractId":{"maxLength":255,"type":"string","example":"66"},"counterpartyAddress":{"maxLength":255,"type":"string","example":"https://trace-x-edc-e2e-a.dev.demo.catena-x.net/api/v1/dsp"},"creationDate":{"maxLength":255,"type":"string","format":"date-time","example":"2023-02-21T21:27:10.73495Z"},"endDate":{"maxLength":255,"type":"string","format":"date-time","example":"2023-02-21T21:27:10.73495Z"},"state":{"maxLength":255,"type":"string","example":"FINALIZED"},"policy":{"maxLength":255,"type":"string","example":"{\\\"@id\\\":\\\"eb0c8486-914a-4d36-84c0-b4971cbc52e4\\\",\\\"@type\\\":\\\"odrl:Set\\\",\\\"odrl:permission\\\":{\\\"odrl:target\\\":\\\"registry-asset\\\",\\\"odrl:action\\\":{\\\"odrl:type\\\":\\\"USE\\\"},\\\"odrl:constraint\\\":{\\\"odrl:or\\\":{\\\"odrl:leftOperand\\\":\\\"PURPOSE\\\",\\\"odrl:operator\\\":{\\\"@id\\\":\\\"odrl:eq\\\"},\\\"odrl:rightOperand\\\":\\\"ID 3.0 Trace\\\"}}},\\\"odrl:prohibition\\\":[],\\\"odrl:obligation\\\":[],\\\"odrl:target\\\":\\\"registry-asset\\\"}"}}},"PageResultContractResponse":{"type":"object","properties":{"content":{"maxItems":2147483647,"minItems":0,"type":"array","description":"Content of PageResults","items":{"$ref":"#/components/schemas/ContractResponse"}},"page":{"type":"integer","format":"int32","example":1},"pageCount":{"type":"integer","format":"int32","example":15},"pageSize":{"type":"integer","format":"int32","example":10},"totalItems":{"type":"integer","format":"int64","example":2}}},"RegisterAssetRequest":{"required":["assetIds","policyId"],"type":"object","properties":{"policyId":{"type":"string","example":"a644a7cb-3de5-493b-9259-f01db315a46e"},"assetIds":{"type":"array","items":{"type":"string"}}}},"SyncAssetsRequest":{"type":"object","properties":{"globalAssetIds":{"maxItems":100,"minItems":1,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]"}}}},"GetDetailInformationRequest":{"type":"object","properties":{"assetIds":{"maxLength":50,"minLength":1,"maxItems":50,"minItems":1,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"],"items":{"maxLength":50,"minLength":1,"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]"}}}},"DescriptionsResponse":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:a4a26b9c-9460-4cc5-8645-85916b86adb0"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"}}},"DetailAspectDataAsBuiltResponse":{"type":"object","properties":{"partId":{"maxLength":255,"minLength":0,"type":"string","example":"95657762-59"},"customerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"01697F7-65"},"nameAtCustomer":{"maxLength":255,"minLength":0,"type":"string","example":"Door front-left"},"manufacturingCountry":{"maxLength":255,"minLength":0,"type":"string","example":"DEU"},"manufacturingDate":{"maxLength":255,"minLength":0,"type":"string","example":"2022-02-04T13:48:54Z"}}},"DetailAspectDataAsPlannedResponse":{"type":"object","properties":{"validityPeriodFrom":{"maxLength":255,"minLength":0,"type":"string","example":"2022-09-26T12:43:51.079Z"},"validityPeriodTo":{"maxLength":255,"minLength":0,"type":"string","example":"20232-07-13T12:00:00.000Z"}}},"DetailAspectDataResponse":{"type":"object","oneOf":[{"$ref":"#/components/schemas/DetailAspectDataAsBuiltResponse"},{"$ref":"#/components/schemas/DetailAspectDataAsPlannedResponse"},{"$ref":"#/components/schemas/PartSiteInformationAsPlannedResponse"},{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeResponse"}]},"DetailAspectDataTractionBatteryCodeResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string","example":"pack"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string","example":"X12MCPM27KLPCLX2M2382320"},"subcomponents":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeSubcomponentResponse"}}}},"DetailAspectDataTractionBatteryCodeSubcomponentResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string","example":"pack"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string","example":"X12MCPM27KLPCLX2M2382320"}}},"DetailAspectModelResponse":{"type":"object","properties":{"type":{"type":"string","example":"PART_SITE_INFORMATION_AS_PLANNED","enum":["AS_BUILT","AS_PLANNED","TRACTION_BATTERY_CODE","SINGLE_LEVEL_BOM_AS_BUILT","SINGLE_LEVEL_USAGE_AS_BUILT","SINGLE_LEVEL_BOM_AS_PLANNED","PART_SITE_INFORMATION_AS_PLANNED"]},"data":{"$ref":"#/components/schemas/DetailAspectDataResponse"}}},"PartSiteInformationAsPlannedResponse":{"type":"object","properties":{"functionValidUntil":{"type":"string","example":"2025-02-08T04:30:48.000Z"},"function":{"type":"string","example":"production"},"functionValidFrom":{"type":"string","example":"2023-10-13T14:30:45+01:00"},"catenaXSiteId":{"type":"string","example":"urn:uuid:0fed587c-7ab4-4597-9841-1718e9693003"}}},"AlertResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}},"UpdateAssetRequest":{"required":["qualityType"],"type":"object","properties":{"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]}}},"ConstraintResponse":{"type":"object","properties":{"leftOperand":{"type":"string","example":"PURPOSE"},"operatorTypeResponse":{"type":"string","enum":["EQ","NEQ","LT","GT","IN","LTEQ","GTEQ","ISA","HASPART","ISPARTOF","ISONEOF","ISALLOF","ISNONEOF"]},"rightOperand":{"type":"string","example":"ID Trace 3.1"}}},"ConstraintsResponse":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/ConstraintResponse"}},"or":{"type":"array","items":{"$ref":"#/components/schemas/ConstraintResponse"}}}},"PermissionResponse":{"type":"object","properties":{"action":{"type":"string","example":"USE","enum":["ACCESS","USE"]},"constraints":{"$ref":"#/components/schemas/ConstraintsResponse"}}},"PolicyResponse":{"type":"object","properties":{"policyId":{"type":"string","example":"5a00bb50-0253-405f-b9f1-1a3150b9d51d"},"createdOn":{"type":"string","format":"date-time"},"validUntil":{"type":"string","format":"date-time"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionResponse"}}}},"DashboardResponse":{"type":"object","properties":{"asBuiltCustomerParts":{"type":"integer","format":"int64","example":5},"asPlannedCustomerParts":{"type":"integer","format":"int64","example":10},"asBuiltSupplierParts":{"type":"integer","format":"int64","example":2},"asPlannedSupplierParts":{"type":"integer","format":"int64","example":3},"asBuiltOwnParts":{"type":"integer","format":"int64","example":1},"asPlannedOwnParts":{"type":"integer","format":"int64","example":1},"myPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"myPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":1},"supplierPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"customerPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"supplierPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":2},"customerPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":2},"receivedActiveAlerts":{"type":"integer","format":"int64","example":2},"receivedActiveInvestigations":{"type":"integer","format":"int64","example":2},"sentActiveAlerts":{"type":"integer","format":"int64","example":2},"sentActiveInvestigations":{"type":"integer","format":"int64","example":2}}},"ImportJobResponse":{"type":"object","properties":{"importJobStatus":{"type":"string","enum":["INITIALIZING","RUNNING","ERROR","COMPLETED"]},"importId":{"type":"string","example":"456a952e-05eb-40dc-a6f2-9c2cb9c1387f"},"startedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"completedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"}}},"ImportReportResponse":{"type":"object","properties":{"importJob":{"$ref":"#/components/schemas/ImportJobResponse"},"importedAsset":{"type":"array","items":{"$ref":"#/components/schemas/ImportedAssetResponse"}}}},"ImportedAssetResponse":{"type":"object","properties":{"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CX","UNSET"]},"catenaxId":{"type":"string","example":"urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd}"},"importedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"importMessage":{"type":"string","example":"Asset created successfully in transient state."}}}},"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"localhost","scopes":{"profile email":""}}}}}}} \ No newline at end of file diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java index 8b26a65d57..4a147dcf8d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java @@ -24,7 +24,7 @@ public interface PublishService { - void publishAssets(String policyId, List assetIds); + void publishAssets(String policyId, List assetIds, boolean triggerSynchronizeAssets); - void publishAssetsToCx(List assets); + void publishAssetsToCx(List assets, boolean triggerSynchronizeAssets); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java index 0a1064cf5e..9704dafa93 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/rest/ImportController.java @@ -33,6 +33,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.ws.rs.PathParam; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.eclipse.tractusx.traceability.assets.application.importpoc.ImportService; @@ -51,6 +52,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -300,8 +302,8 @@ public ResponseEntity getImportReport(@PathVariable("impor schema = @Schema(implementation = ErrorResponse.class)))}) @PostMapping(value = "/publish", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public ResponseEntity registerAssetsForPublishing(@RequestBody RegisterAssetRequest registerAssetRequest) { - publishService.publishAssets(registerAssetRequest.policyId(), registerAssetRequest.assetIds()); + public ResponseEntity registerAssetsForPublishing(@RequestBody RegisterAssetRequest registerAssetRequest, @RequestParam(name = "triggerSynchronizeAssets", defaultValue = "true") boolean triggerSynchronizeAssets) { + publishService.publishAssets(registerAssetRequest.policyId(), registerAssetRequest.assetIds(), triggerSynchronizeAssets); return ResponseEntity.status(HttpStatus.CREATED).build(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java index bf4e7227d6..3c891cdfe2 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java @@ -53,6 +53,7 @@ public void publishAssets() { List assetsAsPlannedInSync = assetAsPlannedRepository.findByImportStateIn(ImportState.IN_SYNCHRONIZATION); List allInSyncAssets = Stream.concat(assetsAsPlannedInSync.stream(), assetsAsBuiltInSync.stream()).toList(); log.info("Found following assets in state IN_SYNCHRONIZATION to publish {}", allInSyncAssets.stream().map(AssetBase::getId).toList()); - publishService.publishAssetsToCx(allInSyncAssets); + boolean triggerSynchronizeAssets = true; + publishService.publishAssetsToCx(allInSyncAssets, triggerSynchronizeAssets); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java index 6a931e3d58..cb5291f6c3 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java @@ -48,7 +48,7 @@ public class AsyncPublishService { private final DecentralRegistryServiceImpl decentralRegistryService; @Async(value = AssetsAsyncConfig.PUBLISH_ASSETS_EXECUTOR) - public void publishAssetsToCx(List assets) { + public void publishAssetsToCx(List assets, boolean triggerSynchronizeAssets) { Map> assetsByPolicyId = assets.stream().collect(Collectors.groupingBy(AssetBase::getPolicyId)); List createdShellsAssetIds = new java.util.ArrayList<>(List.of()); @@ -65,6 +65,8 @@ public void publishAssetsToCx(List assets) { }); assetAsBuiltRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CX, ImportNote.PUBLISHED_TO_CX, createdShellsAssetIds); assetAsPlannedRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CX, ImportNote.PUBLISHED_TO_CX, createdShellsAssetIds); - decentralRegistryService.synchronizeAssets(); + if(triggerSynchronizeAssets) { + decentralRegistryService.synchronizeAssets(); + } } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java index 98843e223f..d5f5c932be 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java @@ -47,7 +47,7 @@ public class PublishServiceImpl implements PublishService { @Override @Transactional - public void publishAssets(String policyId, List assetIds) { + public void publishAssets(String policyId, List assetIds, boolean triggerSynchronizeAssets) { assetIds.forEach(this::throwIfNotExists); //Update assets with policy id @@ -57,12 +57,15 @@ public void publishAssets(String policyId, List assetIds) { List updatedAsBuiltAssets = updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsBuiltRepository); //Publish to CS network - publishAssetsToCx(Stream.concat(updatedAsPlannedAssets.stream(), updatedAsBuiltAssets.stream()).toList()); + publishAssetsToCx( + Stream.concat(updatedAsPlannedAssets.stream(), updatedAsBuiltAssets.stream()).toList(), + triggerSynchronizeAssets + ); } @Override - public void publishAssetsToCx(List assets) { - asyncPublishService.publishAssetsToCx(assets); + public void publishAssetsToCx(List assets, boolean triggerSynchronizeAssets) { + asyncPublishService.publishAssetsToCx(assets, triggerSynchronizeAssets); } private void throwIfNotExists(String assetId) { diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index 601d5b3db4..00fdecc6ba 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -423,7 +423,7 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInPublishedToCX() th .contentType(ContentType.JSON) .when() .body(registerAssetRequest) - .post("/api/assets/publish") + .post("/api/assets/publish?triggerSynchronizeAssets=false") .then() .statusCode(201); From 33c196ee3eb5b2280bd98f257d65851def9ffff3 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 22:25:19 +0100 Subject: [PATCH 37/44] feature(tx-backend): #536 after review --- CHANGELOG.md | 6 +- charts/traceability-foss/values.yaml | 1 + docs/src/docs/user/user-manual.adoc | 2 +- ...data-import-interface-modul3-sequence.puml | 2 +- .../partsAsBuilt/partsAsBuilt.model.ts | 2 +- .../modules/page/parts/model/parts.model.ts | 4 +- .../components/chip/chip.component.scss | 2 +- frontend/src/assets/locales/de/common.json | 4 +- frontend/src/assets/locales/en/common.json | 4 +- .../openapi/traceability-foss-backend.json | 8428 +---------------- .../application/importpoc/PublishService.java | 2 +- .../assets/domain/base/model/ImportNote.java | 2 +- .../assets/domain/base/model/ImportState.java | 2 +- .../domain/importpoc/PublishAssetsJob.java | 2 +- .../repository/SubmodelPayloadRepository.java | 2 +- .../service/AsyncPublishService.java | 9 +- .../domain/importpoc/service/DtrService.java | 2 +- .../service/EdcAssetCreationService.java | 8 +- .../importpoc/service/PublishServiceImpl.java | 7 +- .../AssetAsBuiltRepositoryImpl.java | 6 +- .../common/config/ApplicationConfig.java | 40 - .../common/config/EdcConfiguration.java | 88 + .../service/DecentralRegistryServiceImpl.java | 14 +- .../SubmodelPayloadRepositoryImpl.java | 2 +- .../V17__set_30_chars_for_import_state.sql | 2 + .../SubmodelPayloadRepositoryIT.java | 4 +- .../importdata/ImportControllerIT.java | 4 +- .../base/response/ImportStateResponse.java | 2 +- 28 files changed, 138 insertions(+), 8515 deletions(-) create mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcConfiguration.java create mode 100644 tx-backend/src/main/resources/db/migration/V17__set_30_chars_for_import_state.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index ac57a479eb..f7fa9aa66d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,12 @@ _**For better traceability add the corresponding GitHub issue number in each cha ### Added - #515 Service Unavailable Response on Notification failure -- #536 Added import state PUBLISHED_TO_CX in frontend +- #536 Added import state PUBLISHED_TO_CORE_SERVICES in frontend - #420 add /contracts api to fetch contract agreement information from EDC for assets - Added a step to the pull-request-backend.yml which checks if the pom.xml(root) properties have some versions ending with -SNAPSHOT - Added a PostConstruct method in PolicyStartUpConfig to allow Integration tests to run without errors in stack traces. -- #536 added new ImportState to asset PUBLISHED_TO_CX indicating edc assets and dtr shells were created for given asset -- #536 added cron job responsible to publish assets in PUBLISHED_TO_CX import state to edc and dtr +- #536 added new ImportState to asset PUBLISHED_TO_CORE_SERVICES indicating edc assets and dtr shells were created for given asset +- #536 added cron job responsible to publish assets in PUBLISHED_TO_CORE_SERVICES import state to edc and dtr ### Changed - Updated RELEASE.md to the latest release guide (added more steps) diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index b8abee4edc..9a63ca1e11 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -303,6 +303,7 @@ backend: baseUrl: "https://replace.me" # https:// registry: urlWithPath: "https://replace.me" # digitalTwinRegistry /semantics/registry/api/v3.0 + allowedBpns: "BPN1,BPN2" # "," separated list of allowed bpns for creating shells portal: baseUrl: "https://replace.me" diff --git a/docs/src/docs/user/user-manual.adoc b/docs/src/docs/user/user-manual.adoc index a0f5c78d42..fa5cdae049 100644 --- a/docs/src/docs/user/user-manual.adoc +++ b/docs/src/docs/user/user-manual.adoc @@ -193,7 +193,7 @@ The following table explains the different import state an asset can have: |in_synchronization |Asset is ready to be published. -|published_to_cx +|published_to_core_services |Asset is published, EDC assets, DTR shell, Submodel are created |persistent diff --git a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml index 29cf139971..a289e69058 100644 --- a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml +++ b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml @@ -24,6 +24,6 @@ BE ->> Submodels: create submodel: POST/submodel Submodels -->> BE: BE ->> Registry: [017] register shell in registry: POST/semantics/registry Registry -->> BE: -BE ->> BE: update asset state PUBLISHED_TO_CX +BE ->> BE: update asset state PUBLISHED_TO_CORE_SERVICES BE ->> BE: trigger IRS sync @enduml diff --git a/frontend/src/app/mocks/services/parts-mock/partsAsBuilt/partsAsBuilt.model.ts b/frontend/src/app/mocks/services/parts-mock/partsAsBuilt/partsAsBuilt.model.ts index 6aa32496ca..6e54c64749 100644 --- a/frontend/src/app/mocks/services/parts-mock/partsAsBuilt/partsAsBuilt.model.ts +++ b/frontend/src/app/mocks/services/parts-mock/partsAsBuilt/partsAsBuilt.model.ts @@ -66,7 +66,7 @@ export const mockBmwAssets = [ 'receivedQualityAlertIdsInStatusActive': [], 'sentQualityInvestigationIdsInStatusActive': [], 'receivedQualityInvestigationIdsInStatusActive': [], - 'importState': 'PUBLISHED_TO_CX', + 'importState': 'PUBLISHED_TO_CORE_SERVICES', 'importNote': 'This is a test import note.' }, { diff --git a/frontend/src/app/modules/page/parts/model/parts.model.ts b/frontend/src/app/modules/page/parts/model/parts.model.ts index b2c8159212..5ffd81fea6 100644 --- a/frontend/src/app/modules/page/parts/model/parts.model.ts +++ b/frontend/src/app/modules/page/parts/model/parts.model.ts @@ -176,7 +176,7 @@ export enum ImportState { IN_SYNCHRONIZATION = "IN_SYNCHRONIZATION", ERROR = "ERROR", UNSET = "UNSET", - PUBLISHED_TO_CX="PUBLISHED_TO_CX" + PUBLISHED_TO_CORE_SERVICES="PUBLISHED_TO_CORE_SERVICES" } export enum ImportStateInCamelCase { @@ -185,7 +185,7 @@ export enum ImportStateInCamelCase { IN_SYNCHRONIZATION = "In Synchronization", ERROR = "Error", UNSET = "Unset", - PUBLISHED_TO_CX="Published to CX" + PUBLISHED_TO_CORE_SERVICES="Published to Core Services" } export enum FilterOperator { diff --git a/frontend/src/app/modules/shared/components/chip/chip.component.scss b/frontend/src/app/modules/shared/components/chip/chip.component.scss index 0dabeaaff6..865cae4828 100644 --- a/frontend/src/app/modules/shared/components/chip/chip.component.scss +++ b/frontend/src/app/modules/shared/components/chip/chip.component.scss @@ -23,7 +23,7 @@ background-color: rgb(255,236,189); } - &__PUBLISHED_TO_CX { + &__PUBLISHED_TO_CORE_SERVICES { background-color: rgb(218, 245, 255); } diff --git a/frontend/src/assets/locales/de/common.json b/frontend/src/assets/locales/de/common.json index 925a61b9f6..91e3ae7c40 100644 --- a/frontend/src/assets/locales/de/common.json +++ b/frontend/src/assets/locales/de/common.json @@ -144,7 +144,7 @@ "IN_SYNCHRONIZATION": "IN SYNCHRONISATION", "ERROR": "FEHLER", "UNSET": "UNDEFINIERT", - "PUBLISHED_TO_CX": "VERÖFFENTLICHT" + "PUBLISHED_TO_CORE_SERVICES": "VERÖFFENTLICHT" }, "severity": { "MINOR": "Gering", @@ -335,7 +335,7 @@ "IN_SYNCHRONIZATION": "In Synchronisation", "ERROR": "Fehler", "UNSET": "Undefiniert", - "PUBLISHED_TO_CX": "Veröffentlicht" + "PUBLISHED_TO_CORE_SERVICES": "Veröffentlicht" } }, "parts": { diff --git a/frontend/src/assets/locales/en/common.json b/frontend/src/assets/locales/en/common.json index 0ce7305b56..85aafdefda 100644 --- a/frontend/src/assets/locales/en/common.json +++ b/frontend/src/assets/locales/en/common.json @@ -142,7 +142,7 @@ "IN_SYNCHRONIZATION": "IN SYNCHRONIZATION", "ERROR": "ERROR", "UNSET": "UNSET", - "PUBLISHED_TO_CX": "PUBLISHED" + "PUBLISHED_TO_CORE_SERVICES": "PUBLISHED" }, "severity": { "MINOR": "Minor", @@ -337,7 +337,7 @@ "IN_SYNCHRONIZATION": "In Synchronization", "ERROR": "Error", "UNSET": "Unset", - "PUBLISHED_TO_CX": "Veröffentlicht" + "PUBLISHED_TO_CORE_SERVICES": "Veröffentlicht" } }, diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 18e4fded34..9068fab789 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -1,8427 +1 @@ -{ - "openapi" : "3.0.1", - "info" : { - "title" : "Trace-FOSS - OpenAPI Documentation", - "description" : "Trace-FOSS is a system for tracking parts along the supply chain. A high level of transparency across the supplier network enables faster intervention based on a recorded event in the supply chain. This saves costs by seamlessly tracking parts and creates trust through clearly defined and secure data access by the companies and persons involved in the process.", - "license" : { - "name" : "License: Apache 2.0" - }, - "version" : "1.0.0" - }, - "servers" : [ - { - "url" : "http://localhost:9998/api", - "description" : "Generated server url" - } - ], - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ], - "tags" : [ - { - "name" : "Investigations", - "description" : "Operations on Investigation Notification" - } - ], - "paths" : { - "/bpn-config" : { - "get" : { - "tags" : [ - "BpnEdcMapping" - ], - "summary" : "Get BPN EDC URL mappings", - "description" : "The endpoint returns a result of BPN EDC URL mappings.", - "operationId" : "getBpnEdcs", - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnEdcMappingResponse" - } - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "put" : { - "tags" : [ - "BpnEdcMapping" - ], - "summary" : "Updates BPN EDC URL mappings", - "description" : "The endpoint updates BPN EDC URL mappings", - "operationId" : "updateBpnEdcMappings", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnMappingRequest" - } - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnEdcMappingResponse" - } - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "post" : { - "tags" : [ - "BpnEdcMapping" - ], - "summary" : "Creates BPN EDC URL mappings", - "description" : "The endpoint creates BPN EDC URL mappings", - "operationId" : "createBpnEdcUrlMappings", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnMappingRequest" - } - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for BpnEdcMapping", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BpnEdcMappingResponse" - } - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/submodel/data/{submodelId}" : { - "get" : { - "tags" : [ - "Submodel" - ], - "summary" : "Gets Submodel by its id", - "description" : "The endpoint returns Submodel for given id. Used for data providing functionality", - "operationId" : "getSubmodelById", - "parameters" : [ - { - "name" : "submodelId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "200" : { - "description" : "Returns the paged result found", - "content" : { - "application/json" : {} - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "post" : { - "tags" : [ - "Submodel" - ], - "summary" : "Save Submodel", - "description" : "This endpoint allows you to save a Submodel identified by its ID.", - "operationId" : "saveSubmodel", - "parameters" : [ - { - "name" : "submodelId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "type" : "string" - } - } - }, - "required" : true - }, - "responses" : { - "204" : { - "description" : "No Content.", - "content" : { - "application/json" : {} - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok.", - "content" : { - "application/json" : {} - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Start investigations by part ids", - "description" : "The endpoint starts investigations based on part ids provided.", - "operationId" : "investigateAssets", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/StartQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/update" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Update investigations by id", - "description" : "The endpoint updates investigations by their id.", - "operationId" : "updateInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/close" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Close investigations by id", - "description" : "The endpoint closes investigations by their id.", - "operationId" : "closeInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CloseQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/cancel" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Cancles investigations by id", - "description" : "The endpoint cancles investigations by their id.", - "operationId" : "cancelInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}/approve" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Approves investigations by id", - "description" : "The endpoint approves investigations by their id.", - "operationId" : "approveInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/filter" : { - "post" : { - "tags" : [ - "Investigations" - ], - "summary" : "Filter investigations defined by the request body", - "description" : "The endpoint returns investigations as paged result.", - "operationId" : "filterInvestigations", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PageableFilterRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maximum" : 255, - "minimum" : 0, - "maxLength" : 255, - "type" : "integer", - "format" : "int64", - "example" : 66 - }, - "status" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "CREATED", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "DescriptionText" - }, - "createdBy" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "createdByName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "createdDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2023-02-21T21:27:10.734950Z" - }, - "assetIds" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]" - } - }, - "channel" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "SENDER", - "enum" : [ - "SENDER", - "RECEIVER" - ] - }, - "reason" : { - "$ref" : "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "sendToName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "severity" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "MINOR", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "errorMessage" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "EDC not reachable" - }, - "qualityNotificationMessageResponseList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/QualityNotificationMessageResponse" - } - } - } - } - } - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/edc/notification/contract" : { - "post" : { - "tags" : [ - "Notifications" - ], - "summary" : "Triggers EDC notification contract", - "description" : "The endpoint Triggers EDC notification contract based on notification type and method", - "operationId" : "createNotificationContract", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CreateNotificationContractResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/contracts" : { - "post" : { - "tags" : [ - "Contracts" - ], - "summary" : "All contract agreements for all assets", - "description" : "This endpoint returns all contract agreements for all assets in Trace-X", - "operationId" : "contracts", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PageableFilterRequest" - } - } - }, - "required" : true - }, - "responses" : { - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "example" : { - "message" : "Bad request." - } - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "example" : { - "message" : "Authorization failed." - } - } - } - } - }, - "200" : { - "description" : "Ok.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "description" : "PageResults", - "items" : { - "$ref" : "#/components/schemas/PageResultContractResponse" - } - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "example" : { - "message" : "Too many requests." - } - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "example" : { - "message" : "Not found." - } - } - } - } - }, - "415" : { - "description" : "Unsupported media type.", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "example" : { - "message" : "Unsupported media type." - } - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "example" : { - "message" : "Internal server error." - } - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "type" : "string", - "example" : { - "message" : "Forbidden." - } - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/publish" : { - "post" : { - "tags" : [ - "AssetsImport", - "AssetsPublish" - ], - "summary" : "asset publish", - "description" : "This endpoint publishes assets to the Catena-X network.", - "operationId" : "publishAssets", - "parameters" : [ - { - "name" : "triggerSynchronizeAssets", - "in" : "query", - "required" : false, - "schema" : { - "type" : "boolean", - "default" : true - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/RegisterAssetRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No Content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/import" : { - "post" : { - "tags" : [ - "AssetsImport" - ], - "summary" : "asset upload", - "description" : "This endpoint stores assets in the application. Those can be later published in the Catena-X network.", - "operationId" : "importJson", - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "required" : [ - "file" - ], - "type" : "object", - "properties" : { - "file" : { - "type" : "string", - "format" : "binary" - } - } - } - } - } - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : {} - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No Content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/sync" : { - "post" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Synchronizes assets from IRS", - "description" : "The endpoint synchronizes the assets from irs.", - "operationId" : "sync", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncAssetsRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created." - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/detail-information" : { - "post" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Searches for assets by ids.", - "description" : "The endpoint searchs for assets by id and returns a list of them.", - "operationId" : "getDetailInformation", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetDetailInformationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/sync" : { - "post" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Synchronizes assets from IRS", - "description" : "The endpoint synchronizes the assets from irs.", - "operationId" : "sync_1", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncAssetsRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created." - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/detail-information" : { - "post" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Searches for assets by ids.", - "description" : "The endpoint searchs for assets by id and returns a list of them.", - "operationId" : "getDetailInformation_1", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/GetDetailInformationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Start alert by part ids", - "description" : "The endpoint starts alert based on part ids provided.", - "operationId" : "alertAssets", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/StartQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "201" : { - "description" : "Created.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/QualityNotificationIdResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/update" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Update alert by id", - "description" : "The endpoint updates alert by their id.", - "operationId" : "updateAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/close" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Close alert by id", - "description" : "The endpoint closes alert by id.", - "operationId" : "closeAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/CloseQualityNotificationRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/cancel" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Cancels alert by id", - "description" : "The endpoint cancels alert by id.", - "operationId" : "cancelAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}/approve" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Approves alert by id", - "description" : "The endpoint approves alert by id.", - "operationId" : "approveAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/filter" : { - "post" : { - "tags" : [ - "Alerts" - ], - "summary" : "Filter alerts defined by the request body", - "description" : "The endpoint returns alerts as paged result.", - "operationId" : "filterAlerts", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PageableFilterRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maximum" : 255, - "minimum" : 0, - "maxLength" : 255, - "type" : "integer", - "format" : "int64", - "example" : 66 - }, - "status" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "CREATED", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "DescriptionText" - }, - "createdBy" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "createdByName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "createdDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2023-02-21T21:27:10.734950Z" - }, - "assetIds" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]" - } - }, - "channel" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "SENDER", - "enum" : [ - "SENDER", - "RECEIVER" - ] - }, - "reason" : { - "$ref" : "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "sendToName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "severity" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "MINOR", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "errorMessage" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "EDC not reachable" - }, - "qualityNotificationMessageResponseList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/QualityNotificationMessageResponse" - } - } - } - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/{assetId}" : { - "get" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Get asset by id", - "description" : "The endpoint returns an asset filtered by id .", - "operationId" : "assetById", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the assets found", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "patch" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Updates asset", - "description" : "The endpoint updates asset by provided quality type.", - "operationId" : "updateAsset", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateAssetRequest" - } - } - }, - "required" : true - }, - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the updated asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/{assetId}" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get asset by id", - "description" : "The endpoint returns an asset filtered by id .", - "operationId" : "assetById_1", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the assets found", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - }, - "patch" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Updates asset", - "description" : "The endpoint updates asset by provided quality type.", - "operationId" : "updateAsset_1", - "parameters" : [ - { - "name" : "assetId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateAssetRequest" - } - } - }, - "required" : true - }, - "responses" : { - "200" : { - "description" : "Returns the updated asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/registry/reload" : { - "get" : { - "tags" : [ - "Registry" - ], - "summary" : "Triggers reload of shell descriptors", - "description" : "The endpoint Triggers reload of shell descriptors.", - "operationId" : "reload", - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "202" : { - "description" : "Created registry reload job." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/policies" : { - "get" : { - "tags" : [ - "Policies" - ], - "summary" : "Get all policies ", - "description" : "The endpoint returns all policies .", - "operationId" : "policy", - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the policies", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/PolicyResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/{investigationId}" : { - "get" : { - "tags" : [ - "Investigations" - ], - "summary" : "Gets investigations by id", - "description" : "The endpoint returns investigations as paged result by their id.", - "operationId" : "getInvestigation", - "parameters" : [ - { - "name" : "investigationId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : -2147483648, - "type" : "array", - "description" : "Investigations", - "items" : { - "$ref" : "#/components/schemas/InvestigationResponse" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/investigations/distinctFilterValues" : { - "get" : { - "tags" : [ - "Assets", - "Investigations" - ], - "summary" : "getDistinctFilterValues", - "description" : "The endpoint returns a distinct filter values for given fieldName.", - "operationId" : "distinctFilterValues", - "parameters" : [ - { - "name" : "fieldName", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "size", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, - { - "name" : "startWith", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "channel", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ - "SENDER", - "RECEIVER" - ] - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/dashboard" : { - "get" : { - "tags" : [ - "Dashboard" - ], - "summary" : "Returns dashboard related data", - "description" : "The endpoint can return limited data based on the user role", - "operationId" : "dashboard", - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns dashboard data", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/DashboardResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/import/report/{importJobId}" : { - "get" : { - "tags" : [ - "ImportReport", - "AssetsImport" - ], - "summary" : "report of the imported assets", - "description" : "This endpoint returns information about the imported assets to Trace-X.", - "operationId" : "importReport", - "parameters" : [ - { - "name" : "importJobId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "200" : { - "description" : "OK.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ImportReportResponse" - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No Content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned" : { - "get" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Get assets by pagination", - "description" : "The endpoint returns a paged result of assets.", - "operationId" : "AssetsAsPlanned", - "parameters" : [ - { - "name" : "pageable", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/OwnPageable" - } - }, - { - "name" : "filter", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses" : { - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/distinctFilterValues" : { - "get" : { - "tags" : [ - "Assets", - "AssetsAsPlanned" - ], - "summary" : "getDistinctFilterValues", - "description" : "The endpoint returns a distinct filter values for given fieldName.", - "operationId" : "distinctFilterValues_1", - "parameters" : [ - { - "name" : "fieldName", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "size", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, - { - "name" : "startWith", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "owner", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-planned/*/children/{childId}" : { - "get" : { - "tags" : [ - "AssetsAsPlanned" - ], - "summary" : "Get asset by child id", - "description" : "The endpoint returns an asset filtered by child id.", - "operationId" : "assetByChildIdAndAssetId", - "parameters" : [ - { - "name" : "childId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the asset by childId", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get assets by pagination", - "description" : "The endpoint returns a paged result of assets.", - "operationId" : "assets", - "parameters" : [ - { - "name" : "pageable", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/OwnPageable" - } - }, - { - "name" : "searchCriteriaRequestParam", - "in" : "query", - "required" : true, - "schema" : { - "$ref" : "#/components/schemas/SearchCriteriaRequestParam" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the paged result found for Asset", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/distinctFilterValues" : { - "get" : { - "tags" : [ - "AssetsAsBuilt", - "Assets" - ], - "summary" : "getDistinctFilterValues", - "description" : "The endpoint returns a distinct filter values for given fieldName.", - "operationId" : "distinctFilterValues_2", - "parameters" : [ - { - "name" : "fieldName", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "size", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, - { - "name" : "startWith", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "owner", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/countries" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get map of assets", - "description" : "The endpoint returns a map for assets consumed by the map.", - "operationId" : "assetsCountryMap", - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns the assets found", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/assets/as-built/*/children/{childId}" : { - "get" : { - "tags" : [ - "AssetsAsBuilt" - ], - "summary" : "Get asset by child id", - "description" : "The endpoint returns an asset filtered by child id.", - "operationId" : "assetByChildId", - "parameters" : [ - { - "name" : "childId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "200" : { - "description" : "Returns the asset by childId", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Assets", - "items" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - }, - "semanticModelId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "NO-246880451848384868750731" - }, - "businessPartner" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "manufacturerName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "nameAtManufacturer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "manufacturerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "owner" : { - "type" : "string", - "example" : "CUSTOMER", - "enum" : [ - "SUPPLIER", - "CUSTOMER", - "OWN", - "UNKNOWN" - ] - }, - "childRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Child relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "parentRelations" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Parent relationships", - "items" : { - "$ref" : "#/components/schemas/DescriptionsResponse" - } - }, - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - }, - "van" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "OMAYSKEITUGNVHKKX" - }, - "semanticDataModel" : { - "type" : "string", - "example" : "BATCH", - "enum" : [ - "BATCH", - "SERIALPART", - "UNKNOWN", - "PARTASPLANNED", - "JUSTINSEQUENCE", - "TOMBSTONEASBUILT", - "TOMBSTONEASPLANNED" - ] - }, - "classification" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "component" - }, - "detailAspectModels" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectModelResponse" - } - }, - "sentQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "receivedQualityAlertIdsInStatusActive" : { - "type" : "array", - "example" : 1, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - }, - "sentQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "receivedQualityInvestigationIdsInStatusActive" : { - "type" : "array", - "example" : 2, - "items" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - }, - "importState" : { - "type" : "string", - "example" : "TRANSIENT", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "importNote" : { - "type" : "string", - "example" : "Asset created successfully in transient state" - }, - "tombstone" : { - "type" : "string", - "example" : " {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n" - }, - "contractAgreementId" : { - "type" : "string", - "example" : "TODO" - } - } - } - } - } - } - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/{alertId}" : { - "get" : { - "tags" : [ - "Alerts" - ], - "summary" : "Gets Alert by id", - "description" : "The endpoint returns alert by id.", - "operationId" : "getAlert", - "parameters" : [ - { - "name" : "alertId", - "in" : "path", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int64" - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "OK.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Alerts", - "items" : { - "$ref" : "#/components/schemas/AlertResponse" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/alerts/distinctFilterValues" : { - "get" : { - "tags" : [ - "Assets", - "Alerts" - ], - "summary" : "getDistinctFilterValues", - "description" : "The endpoint returns a distinct filter values for given fieldName.", - "operationId" : "distinctFilterValues_3", - "parameters" : [ - { - "name" : "fieldName", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "size", - "in" : "query", - "required" : true, - "schema" : { - "type" : "integer", - "format" : "int32" - } - }, - { - "name" : "startWith", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string" - } - }, - { - "name" : "channel", - "in" : "query", - "required" : true, - "schema" : { - "type" : "string", - "enum" : [ - "SENDER", - "RECEIVER" - ] - } - } - ], - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Returns a distinct filter values for given fieldName.", - "content" : { - "application/json" : { - "schema" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "items" : { - "type" : "string" - } - } - } - } - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/submodel/data" : { - "delete" : { - "tags" : [ - "Submodel" - ], - "summary" : "Delete All Submodels", - "description" : "Deletes all submodels from the system.", - "operationId" : "deleteSubmodels", - "responses" : { - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Ok." - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "204" : { - "description" : "No Content." - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - }, - "/bpn-config/{bpn}" : { - "delete" : { - "tags" : [ - "BpnEdcMapping" - ], - "summary" : "Deletes BPN EDC URL mappings", - "description" : "The endpoint deletes BPN EDC URL mappings", - "operationId" : "deleteBpnEdcUrlMappings", - "parameters" : [ - { - "name" : "bpn", - "in" : "path", - "required" : true, - "schema" : { - "type" : "string" - } - } - ], - "responses" : { - "204" : { - "description" : "Deleted." - }, - "401" : { - "description" : "Authorization failed.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "403" : { - "description" : "Forbidden.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "415" : { - "description" : "Unsupported media type", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "200" : { - "description" : "Okay" - }, - "400" : { - "description" : "Bad request.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "429" : { - "description" : "Too many requests.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "500" : { - "description" : "Internal server error.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - }, - "404" : { - "description" : "Not found.", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security" : [ - { - "oAuth2" : [ - "profile email" - ] - } - ] - } - } - }, - "components" : { - "schemas" : { - "BpnMappingRequest" : { - "required" : [ - "bpn", - "url" - ], - "type" : "object", - "properties" : { - "bpn" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "url" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string" - } - } - }, - "ErrorResponse" : { - "type" : "object", - "properties" : { - "message" : { - "maxLength" : 1000, - "minLength" : 0, - "pattern" : "^.*$", - "type" : "string", - "example" : "Access Denied" - } - } - }, - "BpnEdcMappingResponse" : { - "type" : "object", - "properties" : { - "bpn" : { - "type" : "string", - "example" : "BPNL00000003CSGV" - }, - "url" : { - "type" : "string", - "example" : "https://trace-x-test-edc.dev.demo.catena-x.net/a1" - } - } - }, - "StartQualityNotificationRequest" : { - "required" : [ - "severity" - ], - "type" : "object", - "properties" : { - "partIds" : { - "maxLength" : 100, - "minLength" : 1, - "maxItems" : 50, - "minItems" : 1, - "type" : "array", - "example" : [ - "urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978" - ], - "items" : { - "maxLength" : 100, - "minLength" : 1, - "type" : "string", - "example" : "[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]" - } - }, - "description" : { - "maxLength" : 1000, - "minLength" : 15, - "type" : "string", - "example" : "The description" - }, - "targetDate" : { - "type" : "string", - "format" : "date-time", - "example" : "2099-03-11T22:44:06.333826952Z" - }, - "severity" : { - "type" : "string", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE_THREATENING" - ] - }, - "receiverBpn" : { - "type" : "string", - "example" : "BPN00001123123AS" - }, - "asBuilt" : { - "type" : "boolean" - } - } - }, - "QualityNotificationIdResponse" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - } - } - }, - "UpdateQualityNotificationRequest" : { - "required" : [ - "status" - ], - "type" : "object", - "properties" : { - "status" : { - "type" : "string", - "description" : "The UpdateInvestigationStatus", - "enum" : [ - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED" - ] - }, - "reason" : { - "type" : "string", - "example" : "The reason." - } - } - }, - "CloseQualityNotificationRequest" : { - "type" : "object", - "properties" : { - "reason" : { - "maxLength" : 1000, - "minLength" : 15, - "type" : "string", - "example" : "The reason." - } - } - }, - "OwnPageable" : { - "type" : "object", - "properties" : { - "page" : { - "type" : "integer", - "format" : "int32" - }, - "size" : { - "type" : "integer", - "format" : "int32" - }, - "sort" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Content of Assets PageResults", - "example" : "manufacturerPartId,desc", - "items" : { - "type" : "string" - } - } - } - }, - "PageableFilterRequest" : { - "type" : "object", - "properties" : { - "pageAble" : { - "$ref" : "#/components/schemas/OwnPageable" - }, - "searchCriteria" : { - "$ref" : "#/components/schemas/SearchCriteriaRequestParam" - } - } - }, - "SearchCriteriaRequestParam" : { - "type" : "object", - "properties" : { - "filter" : { - "maxItems" : 2147483647, - "type" : "array", - "description" : "Filter Criteria", - "example" : "owner,EQUAL,OWN", - "items" : { - "type" : "string" - } - } - } - }, - "InvestigationResponse" : { - "type" : "object", - "properties" : { - "id" : { - "maximum" : 255, - "minimum" : 0, - "maxLength" : 255, - "type" : "integer", - "format" : "int64", - "example" : 66 - }, - "status" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "CREATED", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "DescriptionText" - }, - "createdBy" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "createdByName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "createdDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2023-02-21T21:27:10.734950Z" - }, - "assetIds" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]" - } - }, - "channel" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "SENDER", - "enum" : [ - "SENDER", - "RECEIVER" - ] - }, - "reason" : { - "$ref" : "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "sendToName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "severity" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "MINOR", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "errorMessage" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "EDC not reachable" - }, - "qualityNotificationMessageResponseList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/QualityNotificationMessageResponse" - } - } - } - }, - "QualityNotificationMessageResponse" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string" - }, - "createdBy" : { - "type" : "string" - }, - "createdByName" : { - "type" : "string" - }, - "sendTo" : { - "type" : "string" - }, - "sendToName" : { - "type" : "string" - }, - "edcUrl" : { - "type" : "string" - }, - "contractAgreementId" : { - "type" : "string" - }, - "notificationReferenceId" : { - "type" : "string" - }, - "targetDate" : { - "type" : "string", - "format" : "date-time" - }, - "severity" : { - "type" : "string", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "edcNotificationId" : { - "type" : "string" - }, - "created" : { - "type" : "string", - "format" : "date-time" - }, - "updated" : { - "type" : "string", - "format" : "date-time" - }, - "messageId" : { - "type" : "string" - }, - "isInitial" : { - "type" : "boolean" - }, - "status" : { - "type" : "string", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "errorMessage" : { - "type" : "string" - } - } - }, - "QualityNotificationReasonResponse" : { - "type" : "object", - "properties" : { - "close" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "description of closing reason" - }, - "accept" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "description of accepting reason" - }, - "decline" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "description of declining reason" - } - } - }, - "CreateNotificationContractRequest" : { - "required" : [ - "notificationMethod", - "notificationType" - ], - "type" : "object", - "properties" : { - "notificationType" : { - "type" : "string", - "enum" : [ - "QUALITY_INVESTIGATION", - "QUALITY_ALERT" - ] - }, - "notificationMethod" : { - "type" : "string", - "enum" : [ - "RECEIVE", - "UPDATE", - "RESOLVE" - ] - } - } - }, - "CreateNotificationContractResponse" : { - "type" : "object", - "properties" : { - "notificationAssetId" : { - "type" : "string", - "example" : "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - }, - "accessPolicyId" : { - "type" : "string", - "example" : "123" - }, - "contractDefinitionId" : { - "type" : "string", - "example" : "456" - } - } - }, - "ContractResponse" : { - "type" : "object", - "properties" : { - "contractId" : { - "maxLength" : 255, - "type" : "string", - "example" : "66" - }, - "counterpartyAddress" : { - "maxLength" : 255, - "type" : "string", - "example" : "https://trace-x-edc-e2e-a.dev.demo.catena-x.net/api/v1/dsp" - }, - "creationDate" : { - "maxLength" : 255, - "type" : "string", - "format" : "date-time", - "example" : "2023-02-21T21:27:10.73495Z" - }, - "endDate" : { - "maxLength" : 255, - "type" : "string", - "format" : "date-time", - "example" : "2023-02-21T21:27:10.73495Z" - }, - "state" : { - "maxLength" : 255, - "type" : "string", - "example" : "FINALIZED" - }, - "policy" : { - "maxLength" : 255, - "type" : "string", - "example" : "{\\\"@id\\\":\\\"eb0c8486-914a-4d36-84c0-b4971cbc52e4\\\",\\\"@type\\\":\\\"odrl:Set\\\",\\\"odrl:permission\\\":{\\\"odrl:target\\\":\\\"registry-asset\\\",\\\"odrl:action\\\":{\\\"odrl:type\\\":\\\"USE\\\"},\\\"odrl:constraint\\\":{\\\"odrl:or\\\":{\\\"odrl:leftOperand\\\":\\\"PURPOSE\\\",\\\"odrl:operator\\\":{\\\"@id\\\":\\\"odrl:eq\\\"},\\\"odrl:rightOperand\\\":\\\"ID 3.0 Trace\\\"}}},\\\"odrl:prohibition\\\":[],\\\"odrl:obligation\\\":[],\\\"odrl:target\\\":\\\"registry-asset\\\"}" - } - } - }, - "PageResultContractResponse" : { - "type" : "object", - "properties" : { - "content" : { - "maxItems" : 2147483647, - "minItems" : 0, - "type" : "array", - "description" : "Content of PageResults", - "items" : { - "$ref" : "#/components/schemas/ContractResponse" - } - }, - "page" : { - "type" : "integer", - "format" : "int32", - "example" : 1 - }, - "pageCount" : { - "type" : "integer", - "format" : "int32", - "example" : 15 - }, - "pageSize" : { - "type" : "integer", - "format" : "int32", - "example" : 10 - }, - "totalItems" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - } - }, - "RegisterAssetRequest" : { - "required" : [ - "assetIds", - "policyId" - ], - "type" : "object", - "properties" : { - "policyId" : { - "type" : "string", - "example" : "a644a7cb-3de5-493b-9259-f01db315a46e" - }, - "assetIds" : { - "type" : "array", - "items" : { - "type" : "string" - } - } - } - }, - "SyncAssetsRequest" : { - "type" : "object", - "properties" : { - "globalAssetIds" : { - "maxItems" : 100, - "minItems" : 1, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]" - } - } - } - }, - "GetDetailInformationRequest" : { - "type" : "object", - "properties" : { - "assetIds" : { - "maxLength" : 50, - "minLength" : 1, - "maxItems" : 50, - "minItems" : 1, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd" - ], - "items" : { - "maxLength" : 50, - "minLength" : 1, - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]" - } - } - } - }, - "DescriptionsResponse" : { - "type" : "object", - "properties" : { - "id" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "urn:uuid:a4a26b9c-9460-4cc5-8645-85916b86adb0" - }, - "idShort" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "assembly-part-relationship" - } - } - }, - "DetailAspectDataAsBuiltResponse" : { - "type" : "object", - "properties" : { - "partId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "95657762-59" - }, - "customerPartId" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "01697F7-65" - }, - "nameAtCustomer" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Door front-left" - }, - "manufacturingCountry" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "DEU" - }, - "manufacturingDate" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "2022-02-04T13:48:54Z" - } - } - }, - "DetailAspectDataAsPlannedResponse" : { - "type" : "object", - "properties" : { - "validityPeriodFrom" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "2022-09-26T12:43:51.079Z" - }, - "validityPeriodTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "20232-07-13T12:00:00.000Z" - } - } - }, - "DetailAspectDataResponse" : { - "type" : "object", - "oneOf" : [ - { - "$ref" : "#/components/schemas/DetailAspectDataAsBuiltResponse" - }, - { - "$ref" : "#/components/schemas/DetailAspectDataAsPlannedResponse" - }, - { - "$ref" : "#/components/schemas/PartSiteInformationAsPlannedResponse" - }, - { - "$ref" : "#/components/schemas/DetailAspectDataTractionBatteryCodeResponse" - } - ] - }, - "DetailAspectDataTractionBatteryCodeResponse" : { - "type" : "object", - "properties" : { - "productType" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "pack" - }, - "tractionBatteryCode" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "X12MCPM27KLPCLX2M2382320" - }, - "subcomponents" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DetailAspectDataTractionBatteryCodeSubcomponentResponse" - } - } - } - }, - "DetailAspectDataTractionBatteryCodeSubcomponentResponse" : { - "type" : "object", - "properties" : { - "productType" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "pack" - }, - "tractionBatteryCode" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "X12MCPM27KLPCLX2M2382320" - } - } - }, - "DetailAspectModelResponse" : { - "type" : "object", - "properties" : { - "type" : { - "type" : "string", - "example" : "PART_SITE_INFORMATION_AS_PLANNED", - "enum" : [ - "AS_BUILT", - "AS_PLANNED", - "TRACTION_BATTERY_CODE", - "SINGLE_LEVEL_BOM_AS_BUILT", - "SINGLE_LEVEL_USAGE_AS_BUILT", - "SINGLE_LEVEL_BOM_AS_PLANNED", - "PART_SITE_INFORMATION_AS_PLANNED" - ] - }, - "data" : { - "$ref" : "#/components/schemas/DetailAspectDataResponse" - } - } - }, - "PartSiteInformationAsPlannedResponse" : { - "type" : "object", - "properties" : { - "functionValidUntil" : { - "type" : "string", - "example" : "2025-02-08T04:30:48.000Z" - }, - "function" : { - "type" : "string", - "example" : "production" - }, - "functionValidFrom" : { - "type" : "string", - "example" : "2023-10-13T14:30:45+01:00" - }, - "catenaXSiteId" : { - "type" : "string", - "example" : "urn:uuid:0fed587c-7ab4-4597-9841-1718e9693003" - } - } - }, - "AlertResponse" : { - "type" : "object", - "properties" : { - "id" : { - "maximum" : 255, - "minimum" : 0, - "maxLength" : 255, - "type" : "integer", - "format" : "int64", - "example" : 66 - }, - "status" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "CREATED", - "enum" : [ - "CREATED", - "SENT", - "RECEIVED", - "ACKNOWLEDGED", - "ACCEPTED", - "DECLINED", - "CANCELED", - "CLOSED" - ] - }, - "description" : { - "maxLength" : 1000, - "minLength" : 0, - "type" : "string", - "example" : "DescriptionText" - }, - "createdBy" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "createdByName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "createdDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2023-02-21T21:27:10.734950Z" - }, - "assetIds" : { - "maxItems" : 1000, - "minItems" : 0, - "type" : "array", - "example" : [ - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd", - "urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd" - ], - "items" : { - "type" : "string", - "example" : "[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]" - } - }, - "channel" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "SENDER", - "enum" : [ - "SENDER", - "RECEIVER" - ] - }, - "reason" : { - "$ref" : "#/components/schemas/QualityNotificationReasonResponse" - }, - "sendTo" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "BPNL00000003AYRE" - }, - "sendToName" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "Tier C" - }, - "severity" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "MINOR", - "enum" : [ - "MINOR", - "MAJOR", - "CRITICAL", - "LIFE-THREATENING" - ] - }, - "targetDate" : { - "maxLength" : 50, - "minLength" : 0, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "errorMessage" : { - "maxLength" : 255, - "minLength" : 0, - "type" : "string", - "example" : "EDC not reachable" - }, - "qualityNotificationMessageResponseList" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/QualityNotificationMessageResponse" - } - } - } - }, - "UpdateAssetRequest" : { - "required" : [ - "qualityType" - ], - "type" : "object", - "properties" : { - "qualityType" : { - "type" : "string", - "example" : "Ok", - "enum" : [ - "Ok", - "Minor", - "Major", - "Critical", - "LifeThreatening" - ] - } - } - }, - "ConstraintResponse" : { - "type" : "object", - "properties" : { - "leftOperand" : { - "type" : "string", - "example" : "PURPOSE" - }, - "operatorTypeResponse" : { - "type" : "string", - "enum" : [ - "EQ", - "NEQ", - "LT", - "GT", - "IN", - "LTEQ", - "GTEQ", - "ISA", - "HASPART", - "ISPARTOF", - "ISONEOF", - "ISALLOF", - "ISNONEOF" - ] - }, - "rightOperand" : { - "type" : "string", - "example" : "ID Trace 3.1" - } - } - }, - "ConstraintsResponse" : { - "type" : "object", - "properties" : { - "and" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConstraintResponse" - } - }, - "or" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ConstraintResponse" - } - } - } - }, - "PermissionResponse" : { - "type" : "object", - "properties" : { - "action" : { - "type" : "string", - "example" : "USE", - "enum" : [ - "ACCESS", - "USE" - ] - }, - "constraints" : { - "$ref" : "#/components/schemas/ConstraintsResponse" - } - } - }, - "PolicyResponse" : { - "type" : "object", - "properties" : { - "policyId" : { - "type" : "string", - "example" : "5a00bb50-0253-405f-b9f1-1a3150b9d51d" - }, - "createdOn" : { - "type" : "string", - "format" : "date-time" - }, - "validUntil" : { - "type" : "string", - "format" : "date-time" - }, - "permissions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PermissionResponse" - } - } - } - }, - "DashboardResponse" : { - "type" : "object", - "properties" : { - "asBuiltCustomerParts" : { - "type" : "integer", - "format" : "int64", - "example" : 5 - }, - "asPlannedCustomerParts" : { - "type" : "integer", - "format" : "int64", - "example" : 10 - }, - "asBuiltSupplierParts" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "asPlannedSupplierParts" : { - "type" : "integer", - "format" : "int64", - "example" : 3 - }, - "asBuiltOwnParts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "asPlannedOwnParts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "myPartsWithOpenAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "myPartsWithOpenInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "supplierPartsWithOpenAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "customerPartsWithOpenAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 1 - }, - "supplierPartsWithOpenInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "customerPartsWithOpenInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "receivedActiveAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "receivedActiveInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "sentActiveAlerts" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - }, - "sentActiveInvestigations" : { - "type" : "integer", - "format" : "int64", - "example" : 2 - } - } - }, - "ImportJobResponse" : { - "type" : "object", - "properties" : { - "importJobStatus" : { - "type" : "string", - "enum" : [ - "INITIALIZING", - "RUNNING", - "ERROR", - "COMPLETED" - ] - }, - "importId" : { - "type" : "string", - "example" : "456a952e-05eb-40dc-a6f2-9c2cb9c1387f" - }, - "startedOn" : { - "maxLength" : 50, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "completedOn" : { - "maxLength" : 50, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - } - } - }, - "ImportReportResponse" : { - "type" : "object", - "properties" : { - "importJob" : { - "$ref" : "#/components/schemas/ImportJobResponse" - }, - "importedAsset" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ImportedAssetResponse" - } - } - } - }, - "ImportedAssetResponse" : { - "type" : "object", - "properties" : { - "importState" : { - "type" : "string", - "enum" : [ - "TRANSIENT", - "PERSISTENT", - "ERROR", - "IN_SYNCHRONIZATION", - "PUBLISHED_TO_CX", - "UNSET" - ] - }, - "catenaxId" : { - "type" : "string", - "example" : "urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd}" - }, - "importedOn" : { - "maxLength" : 50, - "type" : "string", - "example" : "2099-02-21T21:27:10.734950Z" - }, - "importMessage" : { - "type" : "string", - "example" : "Asset created successfully in transient state." - } - } - } - }, - "securitySchemes" : { - "oAuth2" : { - "type" : "oauth2", - "flows" : { - "clientCredentials" : { - "tokenUrl" : "localhost", - "scopes" : { - "profile email" : "" - } - } - } - } - } - } -} +{"openapi":"3.0.1","info":{"title":"Trace-FOSS - OpenAPI Documentation","description":"Trace-FOSS is a system for tracking parts along the supply chain. A high level of transparency across the supplier network enables faster intervention based on a recorded event in the supply chain. This saves costs by seamlessly tracking parts and creates trust through clearly defined and secure data access by the companies and persons involved in the process.","license":{"name":"License: Apache 2.0"},"version":"1.0.0"},"servers":[{"url":"http://localhost:9998/api","description":"Generated server url"}],"security":[{"oAuth2":["profile email"]}],"tags":[{"name":"Investigations","description":"Operations on Investigation Notification"}],"paths":{"/bpn-config":{"get":{"tags":["BpnEdcMapping"],"summary":"Get BPN EDC URL mappings","description":"The endpoint returns a result of BPN EDC URL mappings.","operationId":"getBpnEdcs","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"put":{"tags":["BpnEdcMapping"],"summary":"Updates BPN EDC URL mappings","description":"The endpoint updates BPN EDC URL mappings","operationId":"updateBpnEdcMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["BpnEdcMapping"],"summary":"Creates BPN EDC URL mappings","description":"The endpoint creates BPN EDC URL mappings","operationId":"createBpnEdcUrlMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data/{submodelId}":{"get":{"tags":["Submodel"],"summary":"Gets Submodel by its id","description":"The endpoint returns Submodel for given id. Used for data providing functionality","operationId":"getSubmodelById","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found","content":{"application/json":{}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["Submodel"],"summary":"Save Submodel","description":"This endpoint allows you to save a Submodel identified by its ID.","operationId":"saveSubmodel","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"204":{"description":"No Content.","content":{"application/json":{}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok.","content":{"application/json":{}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations":{"post":{"tags":["Investigations"],"summary":"Start investigations by part ids","description":"The endpoint starts investigations based on part ids provided.","operationId":"investigateAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/update":{"post":{"tags":["Investigations"],"summary":"Update investigations by id","description":"The endpoint updates investigations by their id.","operationId":"updateInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/close":{"post":{"tags":["Investigations"],"summary":"Close investigations by id","description":"The endpoint closes investigations by their id.","operationId":"closeInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/cancel":{"post":{"tags":["Investigations"],"summary":"Cancles investigations by id","description":"The endpoint cancles investigations by their id.","operationId":"cancelInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/approve":{"post":{"tags":["Investigations"],"summary":"Approves investigations by id","description":"The endpoint approves investigations by their id.","operationId":"approveInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/filter":{"post":{"tags":["Investigations"],"summary":"Filter investigations defined by the request body","description":"The endpoint returns investigations as paged result.","operationId":"filterInvestigations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"minItems":-2147483648,"type":"array","description":"Investigations","items":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}}}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/edc/notification/contract":{"post":{"tags":["Notifications"],"summary":"Triggers EDC notification contract","description":"The endpoint Triggers EDC notification contract based on notification type and method","operationId":"createNotificationContract","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/contracts":{"post":{"tags":["Contracts"],"summary":"All contract agreements for all assets","description":"This endpoint returns all contract agreements for all assets in Trace-X","operationId":"contracts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Internal server error."}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Not found."}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Forbidden."}}}}},"200":{"description":"Ok.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","description":"PageResults","items":{"$ref":"#/components/schemas/PageResultContractResponse"}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Too many requests."}}}}},"415":{"description":"Unsupported media type.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Unsupported media type."}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Authorization failed."}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Bad request."}}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/publish":{"post":{"tags":["AssetsImport","AssetsPublish"],"summary":"asset publish","description":"This endpoint publishes assets to the Catena-X network.","operationId":"publishAssets","parameters":[{"name":"triggerSynchronizeAssets","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAssetRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/import":{"post":{"tags":["AssetsImport"],"summary":"asset upload","description":"This endpoint stores assets in the application. Those can be later published in the Catena-X network.","operationId":"importJson","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/sync":{"post":{"tags":["AssetsAsPlanned"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/detail-information":{"post":{"tags":["AssetsAsPlanned"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/sync":{"post":{"tags":["AssetsAsBuilt"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/detail-information":{"post":{"tags":["AssetsAsBuilt"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts":{"post":{"tags":["Alerts"],"summary":"Start alert by part ids","description":"The endpoint starts alert based on part ids provided.","operationId":"alertAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/update":{"post":{"tags":["Alerts"],"summary":"Update alert by id","description":"The endpoint updates alert by their id.","operationId":"updateAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/close":{"post":{"tags":["Alerts"],"summary":"Close alert by id","description":"The endpoint closes alert by id.","operationId":"closeAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/cancel":{"post":{"tags":["Alerts"],"summary":"Cancels alert by id","description":"The endpoint cancels alert by id.","operationId":"cancelAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/approve":{"post":{"tags":["Alerts"],"summary":"Approves alert by id","description":"The endpoint approves alert by id.","operationId":"approveAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/filter":{"post":{"tags":["Alerts"],"summary":"Filter alerts defined by the request body","description":"The endpoint returns alerts as paged result.","operationId":"filterAlerts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Alerts","items":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/{assetId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsPlanned"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/{assetId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsBuilt"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"security":[{"oAuth2":["profile email"]}]}},"/registry/reload":{"get":{"tags":["Registry"],"summary":"Triggers reload of shell descriptors","description":"The endpoint Triggers reload of shell descriptors.","operationId":"reload","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"202":{"description":"Created registry reload job."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/policies":{"get":{"tags":["Policies"],"summary":"Get all policies ","description":"The endpoint returns all policies .","operationId":"policy","responses":{"200":{"description":"Returns the policies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}":{"get":{"tags":["Investigations"],"summary":"Gets investigations by id","description":"The endpoint returns investigations as paged result by their id.","operationId":"getInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":-2147483648,"type":"array","description":"Investigations","items":{"$ref":"#/components/schemas/InvestigationResponse"}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/distinctFilterValues":{"get":{"tags":["Assets","Investigations"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/dashboard":{"get":{"tags":["Dashboard"],"summary":"Returns dashboard related data","description":"The endpoint can return limited data based on the user role","operationId":"dashboard","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns dashboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/import/report/{importJobId}":{"get":{"tags":["ImportReport","AssetsImport"],"summary":"report of the imported assets","description":"This endpoint returns information about the imported assets to Trace-X.","operationId":"importReport","parameters":[{"name":"importJobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportReportResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"AssetsAsPlanned","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"filter","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/distinctFilterValues":{"get":{"tags":["Assets","AssetsAsPlanned"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_1","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/*/children/{childId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildIdAndAssetId","parameters":[{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"assets","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"searchCriteriaRequestParam","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/distinctFilterValues":{"get":{"tags":["AssetsAsBuilt","Assets"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_2","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/countries":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get map of assets","description":"The endpoint returns a map for assets consumed by the map.","operationId":"assetsCountryMap","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/*/children/{childId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildId","parameters":[{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}":{"get":{"tags":["Alerts"],"summary":"Gets Alert by id","description":"The endpoint returns alert by id.","operationId":"getAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Alerts","items":{"$ref":"#/components/schemas/AlertResponse"}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/distinctFilterValues":{"get":{"tags":["Assets","Alerts"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_3","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data":{"delete":{"tags":["Submodel"],"summary":"Delete All Submodels","description":"Deletes all submodels from the system.","operationId":"deleteSubmodels","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/bpn-config/{bpn}":{"delete":{"tags":["BpnEdcMapping"],"summary":"Deletes BPN EDC URL mappings","description":"The endpoint deletes BPN EDC URL mappings","operationId":"deleteBpnEdcUrlMappings","parameters":[{"name":"bpn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Deleted."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Okay"},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}}},"components":{"schemas":{"BpnMappingRequest":{"required":["bpn","url"],"type":"object","properties":{"bpn":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"url":{"maxLength":255,"minLength":0,"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"maxLength":1000,"minLength":0,"pattern":"^.*$","type":"string","example":"Access Denied"}}},"BpnEdcMappingResponse":{"type":"object","properties":{"bpn":{"type":"string","example":"BPNL00000003CSGV"},"url":{"type":"string","example":"https://trace-x-test-edc.dev.demo.catena-x.net/a1"}}},"StartQualityNotificationRequest":{"required":["severity"],"type":"object","properties":{"partIds":{"maxLength":100,"minLength":1,"maxItems":50,"minItems":1,"type":"array","example":["urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"],"items":{"maxLength":100,"minLength":1,"type":"string","example":"[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]"}},"description":{"maxLength":1000,"minLength":15,"type":"string","example":"The description"},"targetDate":{"type":"string","format":"date-time","example":"2099-03-11T22:44:06.333826952Z"},"severity":{"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE_THREATENING"]},"receiverBpn":{"type":"string","example":"BPN00001123123AS"},"asBuilt":{"type":"boolean"}}},"QualityNotificationIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1}}},"UpdateQualityNotificationRequest":{"required":["status"],"type":"object","properties":{"status":{"type":"string","description":"The UpdateInvestigationStatus","enum":["ACKNOWLEDGED","ACCEPTED","DECLINED"]},"reason":{"type":"string","example":"The reason."}}},"CloseQualityNotificationRequest":{"type":"object","properties":{"reason":{"maxLength":1000,"minLength":15,"type":"string","example":"The reason."}}},"OwnPageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"sort":{"maxItems":2147483647,"type":"array","description":"Content of Assets PageResults","example":"manufacturerPartId,desc","items":{"type":"string"}}}},"PageableFilterRequest":{"type":"object","properties":{"pageAble":{"$ref":"#/components/schemas/OwnPageable"},"searchCriteria":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}},"SearchCriteriaRequestParam":{"type":"object","properties":{"filter":{"maxItems":2147483647,"type":"array","description":"Filter Criteria","example":"owner,EQUAL,OWN","items":{"type":"string"}}}},"InvestigationResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}},"QualityNotificationMessageResponse":{"type":"object","properties":{"id":{"type":"string"},"createdBy":{"type":"string"},"createdByName":{"type":"string"},"sendTo":{"type":"string"},"sendToName":{"type":"string"},"edcUrl":{"type":"string"},"contractAgreementId":{"type":"string"},"notificationReferenceId":{"type":"string"},"targetDate":{"type":"string","format":"date-time"},"severity":{"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"edcNotificationId":{"type":"string"},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"messageId":{"type":"string"},"isInitial":{"type":"boolean"},"status":{"type":"string","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"errorMessage":{"type":"string"}}},"QualityNotificationReasonResponse":{"type":"object","properties":{"close":{"maxLength":1000,"minLength":0,"type":"string","example":"description of closing reason"},"accept":{"maxLength":1000,"minLength":0,"type":"string","example":"description of accepting reason"},"decline":{"maxLength":1000,"minLength":0,"type":"string","example":"description of declining reason"}}},"CreateNotificationContractRequest":{"required":["notificationMethod","notificationType"],"type":"object","properties":{"notificationType":{"type":"string","enum":["QUALITY_INVESTIGATION","QUALITY_ALERT"]},"notificationMethod":{"type":"string","enum":["RECEIVE","UPDATE","RESOLVE"]}}},"CreateNotificationContractResponse":{"type":"object","properties":{"notificationAssetId":{"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"accessPolicyId":{"type":"string","example":"123"},"contractDefinitionId":{"type":"string","example":"456"}}},"ContractResponse":{"type":"object","properties":{"contractId":{"maxLength":255,"type":"string","example":"66"},"counterpartyAddress":{"maxLength":255,"type":"string","example":"https://trace-x-edc-e2e-a.dev.demo.catena-x.net/api/v1/dsp"},"creationDate":{"maxLength":255,"type":"string","format":"date-time","example":"2023-02-21T21:27:10.73495Z"},"endDate":{"maxLength":255,"type":"string","format":"date-time","example":"2023-02-21T21:27:10.73495Z"},"state":{"maxLength":255,"type":"string","example":"FINALIZED"},"policy":{"maxLength":255,"type":"string","example":"{\\\"@id\\\":\\\"eb0c8486-914a-4d36-84c0-b4971cbc52e4\\\",\\\"@type\\\":\\\"odrl:Set\\\",\\\"odrl:permission\\\":{\\\"odrl:target\\\":\\\"registry-asset\\\",\\\"odrl:action\\\":{\\\"odrl:type\\\":\\\"USE\\\"},\\\"odrl:constraint\\\":{\\\"odrl:or\\\":{\\\"odrl:leftOperand\\\":\\\"PURPOSE\\\",\\\"odrl:operator\\\":{\\\"@id\\\":\\\"odrl:eq\\\"},\\\"odrl:rightOperand\\\":\\\"ID 3.0 Trace\\\"}}},\\\"odrl:prohibition\\\":[],\\\"odrl:obligation\\\":[],\\\"odrl:target\\\":\\\"registry-asset\\\"}"}}},"PageResultContractResponse":{"type":"object","properties":{"content":{"maxItems":2147483647,"minItems":0,"type":"array","description":"Content of PageResults","items":{"$ref":"#/components/schemas/ContractResponse"}},"page":{"type":"integer","format":"int32","example":1},"pageCount":{"type":"integer","format":"int32","example":15},"pageSize":{"type":"integer","format":"int32","example":10},"totalItems":{"type":"integer","format":"int64","example":2}}},"RegisterAssetRequest":{"required":["assetIds","policyId"],"type":"object","properties":{"policyId":{"type":"string","example":"a644a7cb-3de5-493b-9259-f01db315a46e"},"assetIds":{"type":"array","items":{"type":"string"}}}},"SyncAssetsRequest":{"type":"object","properties":{"globalAssetIds":{"maxItems":100,"minItems":1,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]"}}}},"GetDetailInformationRequest":{"type":"object","properties":{"assetIds":{"maxLength":50,"minLength":1,"maxItems":50,"minItems":1,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"],"items":{"maxLength":50,"minLength":1,"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]"}}}},"DescriptionsResponse":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:a4a26b9c-9460-4cc5-8645-85916b86adb0"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"}}},"DetailAspectDataAsBuiltResponse":{"type":"object","properties":{"partId":{"maxLength":255,"minLength":0,"type":"string","example":"95657762-59"},"customerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"01697F7-65"},"nameAtCustomer":{"maxLength":255,"minLength":0,"type":"string","example":"Door front-left"},"manufacturingCountry":{"maxLength":255,"minLength":0,"type":"string","example":"DEU"},"manufacturingDate":{"maxLength":255,"minLength":0,"type":"string","example":"2022-02-04T13:48:54Z"}}},"DetailAspectDataAsPlannedResponse":{"type":"object","properties":{"validityPeriodFrom":{"maxLength":255,"minLength":0,"type":"string","example":"2022-09-26T12:43:51.079Z"},"validityPeriodTo":{"maxLength":255,"minLength":0,"type":"string","example":"20232-07-13T12:00:00.000Z"}}},"DetailAspectDataResponse":{"type":"object","oneOf":[{"$ref":"#/components/schemas/DetailAspectDataAsBuiltResponse"},{"$ref":"#/components/schemas/DetailAspectDataAsPlannedResponse"},{"$ref":"#/components/schemas/PartSiteInformationAsPlannedResponse"},{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeResponse"}]},"DetailAspectDataTractionBatteryCodeResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string","example":"pack"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string","example":"X12MCPM27KLPCLX2M2382320"},"subcomponents":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeSubcomponentResponse"}}}},"DetailAspectDataTractionBatteryCodeSubcomponentResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string","example":"pack"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string","example":"X12MCPM27KLPCLX2M2382320"}}},"DetailAspectModelResponse":{"type":"object","properties":{"type":{"type":"string","example":"PART_SITE_INFORMATION_AS_PLANNED","enum":["AS_BUILT","AS_PLANNED","TRACTION_BATTERY_CODE","SINGLE_LEVEL_BOM_AS_BUILT","SINGLE_LEVEL_USAGE_AS_BUILT","SINGLE_LEVEL_BOM_AS_PLANNED","PART_SITE_INFORMATION_AS_PLANNED"]},"data":{"$ref":"#/components/schemas/DetailAspectDataResponse"}}},"PartSiteInformationAsPlannedResponse":{"type":"object","properties":{"functionValidUntil":{"type":"string","example":"2025-02-08T04:30:48.000Z"},"function":{"type":"string","example":"production"},"functionValidFrom":{"type":"string","example":"2023-10-13T14:30:45+01:00"},"catenaXSiteId":{"type":"string","example":"urn:uuid:0fed587c-7ab4-4597-9841-1718e9693003"}}},"AlertResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}},"UpdateAssetRequest":{"required":["qualityType"],"type":"object","properties":{"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]}}},"ConstraintResponse":{"type":"object","properties":{"leftOperand":{"type":"string","example":"PURPOSE"},"operatorTypeResponse":{"type":"string","enum":["EQ","NEQ","LT","GT","IN","LTEQ","GTEQ","ISA","HASPART","ISPARTOF","ISONEOF","ISALLOF","ISNONEOF"]},"rightOperand":{"type":"string","example":"ID Trace 3.1"}}},"ConstraintsResponse":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/ConstraintResponse"}},"or":{"type":"array","items":{"$ref":"#/components/schemas/ConstraintResponse"}}}},"PermissionResponse":{"type":"object","properties":{"action":{"type":"string","example":"USE","enum":["ACCESS","USE"]},"constraints":{"$ref":"#/components/schemas/ConstraintsResponse"}}},"PolicyResponse":{"type":"object","properties":{"policyId":{"type":"string","example":"5a00bb50-0253-405f-b9f1-1a3150b9d51d"},"createdOn":{"type":"string","format":"date-time"},"validUntil":{"type":"string","format":"date-time"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionResponse"}}}},"DashboardResponse":{"type":"object","properties":{"asBuiltCustomerParts":{"type":"integer","format":"int64","example":5},"asPlannedCustomerParts":{"type":"integer","format":"int64","example":10},"asBuiltSupplierParts":{"type":"integer","format":"int64","example":2},"asPlannedSupplierParts":{"type":"integer","format":"int64","example":3},"asBuiltOwnParts":{"type":"integer","format":"int64","example":1},"asPlannedOwnParts":{"type":"integer","format":"int64","example":1},"myPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"myPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":1},"supplierPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"customerPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"supplierPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":2},"customerPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":2},"receivedActiveAlerts":{"type":"integer","format":"int64","example":2},"receivedActiveInvestigations":{"type":"integer","format":"int64","example":2},"sentActiveAlerts":{"type":"integer","format":"int64","example":2},"sentActiveInvestigations":{"type":"integer","format":"int64","example":2}}},"ImportJobResponse":{"type":"object","properties":{"importJobStatus":{"type":"string","enum":["INITIALIZING","RUNNING","ERROR","COMPLETED"]},"importId":{"type":"string","example":"456a952e-05eb-40dc-a6f2-9c2cb9c1387f"},"startedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"completedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"}}},"ImportReportResponse":{"type":"object","properties":{"importJob":{"$ref":"#/components/schemas/ImportJobResponse"},"importedAsset":{"type":"array","items":{"$ref":"#/components/schemas/ImportedAssetResponse"}}}},"ImportedAssetResponse":{"type":"object","properties":{"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"catenaxId":{"type":"string","example":"urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd}"},"importedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"importMessage":{"type":"string","example":"Asset created successfully in transient state."}}}},"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"localhost","scopes":{"profile email":""}}}}}}} \ No newline at end of file diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java index 4a147dcf8d..93e4a69bb7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/application/importpoc/PublishService.java @@ -26,5 +26,5 @@ public interface PublishService { void publishAssets(String policyId, List assetIds, boolean triggerSynchronizeAssets); - void publishAssetsToCx(List assets, boolean triggerSynchronizeAssets); + void publishAssetsToCoreServices(List assets, boolean triggerSynchronizeAssets); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java index 61382968c8..937946b682 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java @@ -24,5 +24,5 @@ public class ImportNote { public static final String PERSISTENT_NO_UPDATE = "Asset in sync with digital twin registry. Twin will not be updated."; public static final String PERSISTED = "Asset created/updated successfully in persistant state."; public static final String IN_SYNCHRONIZATION = "Twin in sync with digital twin registry. Twin will not be updated."; - public static final String PUBLISHED_TO_CX = "Assets Pubilshed to network"; + public static final String PUBLISHED_TO_CORE_SERVICES = "Assets Published to core services"; } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java index e465cf0410..0d424a005a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportState.java @@ -24,6 +24,6 @@ public enum ImportState { PERSISTENT, ERROR, IN_SYNCHRONIZATION, - PUBLISHED_TO_CX, + PUBLISHED_TO_CORE_SERVICES, UNSET } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java index 3c891cdfe2..608a07dab9 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/PublishAssetsJob.java @@ -54,6 +54,6 @@ public void publishAssets() { List allInSyncAssets = Stream.concat(assetsAsPlannedInSync.stream(), assetsAsBuiltInSync.stream()).toList(); log.info("Found following assets in state IN_SYNCHRONIZATION to publish {}", allInSyncAssets.stream().map(AssetBase::getId).toList()); boolean triggerSynchronizeAssets = true; - publishService.publishAssetsToCx(allInSyncAssets, triggerSynchronizeAssets); + publishService.publishAssetsToCoreServices(allInSyncAssets, triggerSynchronizeAssets); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepository.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepository.java index 4ee08e6f85..47782f2a1f 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepository.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepository.java @@ -29,5 +29,5 @@ public interface SubmodelPayloadRepository { void savePayloadForAssetAsPlanned(String assetId, List submodels); - Map getTypesAndPayloadsByAssetId(String assetId); + Map getAspectTypesAndPayloadsByAssetId(String assetId); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java index cb5291f6c3..7e65788792 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java @@ -32,6 +32,7 @@ import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -48,10 +49,10 @@ public class AsyncPublishService { private final DecentralRegistryServiceImpl decentralRegistryService; @Async(value = AssetsAsyncConfig.PUBLISH_ASSETS_EXECUTOR) - public void publishAssetsToCx(List assets, boolean triggerSynchronizeAssets) { + public void publishAssetsToCoreServices(List assets, boolean triggerSynchronizeAssets) { Map> assetsByPolicyId = assets.stream().collect(Collectors.groupingBy(AssetBase::getPolicyId)); - List createdShellsAssetIds = new java.util.ArrayList<>(List.of()); + List createdShellsAssetIds = new ArrayList<>(List.of()); assetsByPolicyId.forEach((policyId, assetsForPolicy) -> { String submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(policyId); assetsForPolicy.forEach(assetBase -> { @@ -63,8 +64,8 @@ public void publishAssetsToCx(List assets, boolean triggerSynchronize } }); }); - assetAsBuiltRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CX, ImportNote.PUBLISHED_TO_CX, createdShellsAssetIds); - assetAsPlannedRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CX, ImportNote.PUBLISHED_TO_CX, createdShellsAssetIds); + assetAsBuiltRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CORE_SERVICES, ImportNote.PUBLISHED_TO_CORE_SERVICES, createdShellsAssetIds); + assetAsPlannedRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CORE_SERVICES, ImportNote.PUBLISHED_TO_CORE_SERVICES, createdShellsAssetIds); if(triggerSynchronizeAssets) { decentralRegistryService.synchronizeAssets(); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java index ec8f4847fe..d45c43e919 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/DtrService.java @@ -61,7 +61,7 @@ public class DtrService { String allowedBpns; public String createShellInDtr(final AssetBase assetBase, String submodelServerAssetId) throws CreateDtrShellException { - Map payloadByAspectType = submodelPayloadRepository.getTypesAndPayloadsByAssetId(assetBase.getId()); + Map payloadByAspectType = submodelPayloadRepository.getAspectTypesAndPayloadsByAssetId(assetBase.getId()); Map createdSubmodelIdByAspectType = payloadByAspectType.entrySet().stream() .map(this::createSubmodel) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index f26019b5e8..7ce7cae38d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -75,7 +75,7 @@ public String createDtrAndSubmodelAssets(String policyId) { } - String dtrAssetId = null; + String dtrAssetId; try { dtrAssetId = edcDtrAssetService.createDtrAsset(registryUrlWithPath, REGISTRY_ASSET_ID); log.info("DTR Asset Id created :{}", dtrAssetId); @@ -86,7 +86,7 @@ public String createDtrAndSubmodelAssets(String policyId) { } - String dtrContractId = null; + String dtrContractId; try { dtrContractId = edcDtrContractDefinitionService.createContractDefinition(dtrAssetId, createdPolicyId); log.info("DTR Contract Id created :{}", dtrContractId); @@ -95,7 +95,7 @@ public String createDtrAndSubmodelAssets(String policyId) { } - String submodelAssetId = null; + String submodelAssetId; String submodelAssetIdToCreate = "urn:uuid:" + UUID.randomUUID(); try { submodelAssetId = edcDtrAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase() + "/api/submodel", submodelAssetIdToCreate); @@ -107,7 +107,7 @@ public String createDtrAndSubmodelAssets(String policyId) { } - String submodelContractId = null; + String submodelContractId; try { submodelContractId = edcDtrContractDefinitionService.createContractDefinition(submodelAssetId, createdPolicyId); } catch (CreateEdcContractDefinitionException e) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java index d5f5c932be..2f56d9f178 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java @@ -56,16 +56,15 @@ public void publishAssets(String policyId, List assetIds, boolean trigge log.info("Updating status of asBuiltAssets."); List updatedAsBuiltAssets = updateAssetWithStatusAndPolicy(policyId, assetIds, assetAsBuiltRepository); - //Publish to CS network - publishAssetsToCx( + publishAssetsToCoreServices( Stream.concat(updatedAsPlannedAssets.stream(), updatedAsBuiltAssets.stream()).toList(), triggerSynchronizeAssets ); } @Override - public void publishAssetsToCx(List assets, boolean triggerSynchronizeAssets) { - asyncPublishService.publishAssetsToCx(assets, triggerSynchronizeAssets); + public void publishAssetsToCoreServices(List assets, boolean triggerSynchronizeAssets) { + asyncPublishService.publishAssetsToCoreServices(assets, triggerSynchronizeAssets); } private void throwIfNotExists(String assetId) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java index 374bdf3d95..a7853ef62e 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java @@ -141,12 +141,12 @@ public List findByImportStateIn(ImportState... importStates) { @Override public void updateImportStateAndNoteForAssets(ImportState importState, String importNote, List assetIds) { - List foundAssets = jpaAssetAsBuiltRepository.findByIdIn(assetIds); - foundAssets.forEach(assetAsBuilt -> { + List assets = jpaAssetAsBuiltRepository.findByIdIn(assetIds); + assets.forEach(assetAsBuilt -> { assetAsBuilt.setImportState(importState); assetAsBuilt.setImportNote(importNote); }); - jpaAssetAsBuiltRepository.saveAll(foundAssets); + jpaAssetAsBuiltRepository.saveAll(assets); } @Override diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java index 0c5871ee5c..e107fc332a 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java @@ -70,11 +70,6 @@ @EnableJpaRepositories(basePackages = "org.eclipse.tractusx.traceability.*") public class ApplicationConfig { - @Value("${registry.urlWithPath}") - String registryUrlWithPath; - @Value("${registry.shellDescriptorUrl}") - String shellDescriptorUrl; - @Bean public InternalResourceViewResolver defaultViewResolver() { return new InternalResourceViewResolver(); @@ -141,39 +136,4 @@ public void onEntryRemovedEvent(EntryRemovedEvent entryRemoveEvent) { } }; } - - @Bean - public EdcAssetService edcNotificationAssetService(EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcNotificationAssetRestTemplate) { - return new EdcAssetService(edcTransformer, edcConfiguration, edcNotificationAssetRestTemplate); - } - - @Bean - public EdcPolicyDefinitionService edcPolicyDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcNotificationAssetRestTemplate) { - return new EdcPolicyDefinitionService(edcConfiguration, edcNotificationAssetRestTemplate); - } - - @Bean - public EdcContractDefinitionService edcContractDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcNotificationAssetRestTemplate) { - return new EdcContractDefinitionService(edcConfiguration, edcNotificationAssetRestTemplate); - } - - @Bean - public EdcAssetService edcDtrAssetService(EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcDtrAssetRestTemplate) { - return new EdcAssetService(edcTransformer, edcConfiguration, edcDtrAssetRestTemplate); - } - - @Bean - public EdcPolicyDefinitionService edcDtrPolicyDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { - return new EdcPolicyDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); - } - - @Bean - public EdcContractDefinitionService edcDtrContractDefinitionService(EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { - return new EdcContractDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); - } - - @Bean - public DigitalTwinRegistryCreateShellService dtrCreateShellService(RestTemplate digitalTwinRegistryCreateShellRestTemplate) { - return new DigitalTwinRegistryCreateShellService(digitalTwinRegistryCreateShellRestTemplate, registryUrlWithPath + shellDescriptorUrl); - } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcConfiguration.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcConfiguration.java new file mode 100644 index 0000000000..4e747c1ff2 --- /dev/null +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcConfiguration.java @@ -0,0 +1,88 @@ +/******************************************************************************** + * Copyright (c) 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.traceability.common.config; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.irs.edc.client.asset.EdcAssetService; +import org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractDefinitionService; +import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; +import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; +import org.eclipse.tractusx.irs.registryclient.decentral.DigitalTwinRegistryCreateShellService; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.web.client.RestTemplate; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; + +@Configuration +@ConfigurationPropertiesScan(basePackages = "org.eclipse.tractusx.traceability.*") +@EnableWebMvc +@EnableAsync(proxyTargetClass = true) +@EnableConfigurationProperties +@RequiredArgsConstructor +@Slf4j +@EnableJpaRepositories(basePackages = "org.eclipse.tractusx.traceability.*") +public class EdcConfiguration { + + @Value("${registry.urlWithPath}") + String registryUrlWithPath; + @Value("${registry.shellDescriptorUrl}") + String shellDescriptorUrl; + + @Bean + public EdcAssetService edcNotificationAssetService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcNotificationAssetRestTemplate) { + return new EdcAssetService(edcTransformer, edcConfiguration, edcNotificationAssetRestTemplate); + } + + @Bean + public EdcPolicyDefinitionService edcPolicyDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcNotificationAssetRestTemplate) { + return new EdcPolicyDefinitionService(edcConfiguration, edcNotificationAssetRestTemplate); + } + + @Bean + public EdcContractDefinitionService edcContractDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcNotificationAssetRestTemplate) { + return new EdcContractDefinitionService(edcConfiguration, edcNotificationAssetRestTemplate); + } + + @Bean + public EdcAssetService edcDtrAssetService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcDtrAssetRestTemplate) { + return new EdcAssetService(edcTransformer, edcConfiguration, edcDtrAssetRestTemplate); + } + + @Bean + public EdcPolicyDefinitionService edcDtrPolicyDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { + return new EdcPolicyDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); + } + + @Bean + public EdcContractDefinitionService edcDtrContractDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { + return new EdcContractDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); + } + + @Bean + public DigitalTwinRegistryCreateShellService dtrCreateShellService(RestTemplate digitalTwinRegistryCreateShellRestTemplate) { + return new DigitalTwinRegistryCreateShellService(digitalTwinRegistryCreateShellRestTemplate, registryUrlWithPath + shellDescriptorUrl); + } +} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java index 6cdc2add75..8deaab54f0 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java @@ -59,15 +59,15 @@ public class DecentralRegistryServiceImpl implements DecentralRegistryService { @Override @Async(value = AssetsAsyncConfig.LOAD_SHELL_DESCRIPTORS_EXECUTOR) public void synchronizeAssets() { - Collection shellDescriptors = decentralRegistryRepository.retrieveShellDescriptorsByBpn(traceabilityProperties.getBpn().toString()); - Collection asBuiltAssetIds = shellDescriptors.stream().map(Shell::payload).filter(this::isAsBuilt).map(AssetAdministrationShellDescriptor::getGlobalAssetId).toList(); - Collection asPlannedAssetIds = shellDescriptors.stream().map(Shell::payload).filter(this::isAsPlanned).map(AssetAdministrationShellDescriptor::getGlobalAssetId).toList(); + List shellDescriptors = decentralRegistryRepository.retrieveShellDescriptorsByBpn(traceabilityProperties.getBpn().toString()); + List asBuiltAssetIds = shellDescriptors.stream().map(Shell::payload).filter(this::isAsBuilt).map(AssetAdministrationShellDescriptor::getGlobalAssetId).toList(); + List asPlannedAssetIds = shellDescriptors.stream().map(Shell::payload).filter(this::isAsPlanned).map(AssetAdministrationShellDescriptor::getGlobalAssetId).toList(); - Collection existingAsBuiltInSyncAndTransientStates = assetAsBuiltService.getAssetIdsInImportState(ImportState.TRANSIENT, ImportState.IN_SYNCHRONIZATION); - Collection existingAsPlannedInSyncAndTransientStates = assetAsPlannedService.getAssetIdsInImportState(ImportState.TRANSIENT, ImportState.IN_SYNCHRONIZATION); + List existingAsBuiltInSyncAndTransientStates = assetAsBuiltService.getAssetIdsInImportState(ImportState.TRANSIENT, ImportState.IN_SYNCHRONIZATION); + List existingAsPlannedInSyncAndTransientStates = assetAsPlannedService.getAssetIdsInImportState(ImportState.TRANSIENT, ImportState.IN_SYNCHRONIZATION); - Collection asBuiltAssetsToSync = asBuiltAssetIds.stream().filter(assetId -> !existingAsBuiltInSyncAndTransientStates.contains(assetId)).toList(); - Collection asPlannedAssetsToSync = asPlannedAssetIds.stream().filter(assetId -> !existingAsPlannedInSyncAndTransientStates.contains(assetId)).toList(); + List asBuiltAssetsToSync = asBuiltAssetIds.stream().filter(assetId -> !existingAsBuiltInSyncAndTransientStates.contains(assetId)).toList(); + List asPlannedAssetsToSync = asPlannedAssetIds.stream().filter(assetId -> !existingAsPlannedInSyncAndTransientStates.contains(assetId)).toList(); asBuiltAssetsToSync.forEach(assetAsBuiltService::synchronizeAssetsAsync); asPlannedAssetsToSync.forEach(assetAsPlannedService::synchronizeAssetsAsync); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java index 2a73a90034..ff06d9460b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/submodel/infrastructure/repository/SubmodelPayloadRepositoryImpl.java @@ -57,7 +57,7 @@ public void savePayloadForAssetAsPlanned(String assetId, List s } @Override - public Map getTypesAndPayloadsByAssetId(String assetId) { + public Map getAspectTypesAndPayloadsByAssetId(String assetId) { Optional assetAsBuilt = jpaAssetAsBuiltRepository.findById(assetId); Optional assetAsPlanned = jpaAssetAsPlannedRepository.findById(assetId); diff --git a/tx-backend/src/main/resources/db/migration/V17__set_30_chars_for_import_state.sql b/tx-backend/src/main/resources/db/migration/V17__set_30_chars_for_import_state.sql new file mode 100644 index 0000000000..54b34b434c --- /dev/null +++ b/tx-backend/src/main/resources/db/migration/V17__set_30_chars_for_import_state.sql @@ -0,0 +1,2 @@ +ALTER TABLE assets_as_planned ALTER COLUMN import_state TYPE VARCHAR (30); +ALTER TABLE assets_as_built ALTER COLUMN import_state TYPE VARCHAR(30); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepositoryIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepositoryIT.java index b1145e4610..e2c85aed9e 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepositoryIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/repository/SubmodelPayloadRepositoryIT.java @@ -2,8 +2,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import jakarta.persistence.EntityManager; -import jakarta.persistence.PersistenceContext; import org.eclipse.tractusx.traceability.assets.domain.importpoc.model.ImportRequest; import org.eclipse.tractusx.traceability.assets.infrastructure.asbuilt.repository.JpaAssetAsBuiltRepository; import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.GenericSubmodel; @@ -64,7 +62,7 @@ void givenAssetAsBuilt_when() throws IOException { // when - Map result = submodelPayloadRepository.getTypesAndPayloadsByAssetId(assetId); + Map result = submodelPayloadRepository.getAspectTypesAndPayloadsByAssetId(assetId); // then assertThat(result).isNotNull(); diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index 00fdecc6ba..502fe7a12f 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -431,7 +431,7 @@ void givenValidFile_whenPublishData_thenStatusShouldChangeToInPublishedToCX() th eventually(() -> { AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); assertThat(asset.getPolicyId()).isEqualTo("default-policy"); - assertThat(asset.getImportState()).isEqualTo(ImportState.PUBLISHED_TO_CX); + assertThat(asset.getImportState()).isEqualTo(ImportState.PUBLISHED_TO_CORE_SERVICES); dtrApiSupport.verifyDtrCreateShellCalledTimes(1); return true; }); @@ -477,7 +477,7 @@ void givenValidFile2_whenPublishData_thenStatusShouldChangeToPublishedToCx() thr try { AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); assertThat(asset.getPolicyId()).isEqualTo("default-policy"); - assertThat(asset.getImportState()).isEqualTo(ImportState.PUBLISHED_TO_CX); + assertThat(asset.getImportState()).isEqualTo(ImportState.PUBLISHED_TO_CORE_SERVICES); dtrApiSupport.verifyDtrCreateShellCalledTimes(1); } catch (AssertionFailedError exception) { return false; diff --git a/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java b/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java index 2d0710c592..8be7b9d0ab 100644 --- a/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java +++ b/tx-models/src/main/java/assets/response/base/response/ImportStateResponse.java @@ -22,5 +22,5 @@ @ApiModel public enum ImportStateResponse { - TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, PUBLISHED_TO_CX, UNSET + TRANSIENT, PERSISTENT, ERROR, IN_SYNCHRONIZATION, PUBLISHED_TO_CORE_SERVICES, UNSET } From 265341055f1c85e1a73d1c13863efd60480307c4 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 22:29:33 +0100 Subject: [PATCH 38/44] feature(tx-backend): #536 after review --- CHANGELOG.md | 2 +- charts/traceability-foss/charts/backend/values.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7fa9aa66d..a2b31257f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha - Updated COMPATIBILITY.md matrix adding release C-X 24.3 and 23.12 - #536 rework /policies to respond with policies from the IRS policy store - #536 sync assets logic was adjusted to create IRS jobs only for assets that are not in TRANSIENT or IN_SYNC states -- Updated Arc42 documentation and user-manual with publish assets informations +- #536 Updated Arc42 documentation and user-manual with publish assets informations ### Removed - #625 Removed the header and breadcrumbs section from app layout diff --git a/charts/traceability-foss/charts/backend/values.yaml b/charts/traceability-foss/charts/backend/values.yaml index f03a46e34b..4ebb25b007 100644 --- a/charts/traceability-foss/charts/backend/values.yaml +++ b/charts/traceability-foss/charts/backend/values.yaml @@ -169,6 +169,7 @@ irs: baseUrl: "https://replace.me" registry: urlWithPath: "https://replace.me" + allowedBpns: "replace me" portal: baseUrl: "https://replace.me" From fe58d3aa98711575c7e4bbc0d8139f777102a652 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 22:32:17 +0100 Subject: [PATCH 39/44] feature(tx-backend): #536 sonar issues --- .../common/config/ApplicationConfig.java | 13 ------------- .../service/DecentralRegistryServiceImpl.java | 1 - 2 files changed, 14 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java index e107fc332a..364f33316b 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/ApplicationConfig.java @@ -29,20 +29,9 @@ import io.github.resilience4j.retry.Retry; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.eclipse.tractusx.irs.edc.client.EdcConfiguration; -import org.eclipse.tractusx.irs.edc.client.asset.EdcAssetService; -import org.eclipse.tractusx.irs.edc.client.contract.service.EdcContractDefinitionService; -import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; -import org.eclipse.tractusx.irs.edc.client.transformer.EdcTransformer; -import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.IrsRepositoryImpl; -import org.eclipse.tractusx.traceability.assets.infrastructure.base.irs.model.response.IrsPolicyResponse; -import org.eclipse.tractusx.irs.registryclient.decentral.DigitalTwinRegistryCreateShellService; -import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; -import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -51,7 +40,6 @@ import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor; -import org.springframework.web.client.RestTemplate; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.view.InternalResourceViewResolver; import org.thymeleaf.spring6.SpringTemplateEngine; @@ -115,7 +103,6 @@ public ITemplateResolver textTemplateResolver() { } - @Bean public RegistryEventConsumer myRetryRegistryEventConsumer() { final Logger logger = LoggerFactory.getLogger("RetryLogger"); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java index 8deaab54f0..74223180a9 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/shelldescriptor/domain/service/DecentralRegistryServiceImpl.java @@ -35,7 +35,6 @@ import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; -import java.util.Collection; import java.util.List; import static org.eclipse.tractusx.traceability.assets.domain.base.model.SemanticDataModel.BATCH; From 5cdaf347cd158e6462353abbd8e77ea7c32fa7f7 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Wed, 13 Mar 2024 22:35:34 +0100 Subject: [PATCH 40/44] feature(tx-backend): #536 fix lint issue --- .../traceability-foss/charts/backend/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index 903b4caea3..3c053b3bc2 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -103,7 +103,7 @@ spec: - name: REGISTRY_URL_WITH_PATH value: {{ .Values.registry.urlWithPath | quote }} - name: REGISTRY_ALLOWED_BPNS - value: { { .Values.registry.allowedBpns | quote } } + value: {{ .Values.registry.allowedBpns | quote }} - name: SUBMODEL_URL value: {{ .Values.submodel.baseUrl | quote }} - name: IRS_URL From 17e9b66e2ce754492dd3092f4d445aa660f72e8c Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 14 Mar 2024 12:41:04 +0100 Subject: [PATCH 41/44] feature(tx-backend): #536 handle error state --- .../arc42/runtime-view/data-provisioning.adoc | 7 ++- ...data-import-interface-modul3-sequence.puml | 9 +++- .../service/AsyncPublishService.java | 13 +++-- .../importpoc/service/PolicyServiceImpl.java | 7 ++- .../importpoc/service/PublishServiceImpl.java | 9 ++-- .../common/support/DtrApiSupport.java | 9 +++- .../importdata/ImportControllerIT.java | 48 ++++++++++++++++++- 7 files changed, 83 insertions(+), 19 deletions(-) diff --git a/docs/src/docs/arc42/runtime-view/data-provisioning.adoc b/docs/src/docs/arc42/runtime-view/data-provisioning.adoc index b32ea7e371..12671ae138 100644 --- a/docs/src/docs/arc42/runtime-view/data-provisioning.adoc +++ b/docs/src/docs/arc42/runtime-view/data-provisioning.adoc @@ -2,7 +2,7 @@ This sequence diagrams describes the process of importing data from a Trace-X Dataformat -Modul 1 +== Modul 1 Data will be imported by the Trace-X Frontend into Trace-X backend and will be persisted as asset by a Trace-X instance in a transient state. The raw data which is needed for the shared services (DTR / EDC) will be persisted as well. @@ -13,7 +13,7 @@ The raw data which is needed for the shared services (DTR / EDC) will be persist include::../../../uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul1-sequence.puml[] .... -Modul 2 +== Modul 2 The frontend is able to select assets and publish / syncronize them with the shared services. DTR / EDC / Submodel API. @@ -23,7 +23,7 @@ The frontend is able to select assets and publish / syncronize them with the sha include::../../../uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul2-sequence.puml[] .... -Modul 3 +== Modul 3 The backend is able to persist the data in the DTR / EDC and allows to use IRS for resolving assets. @@ -33,7 +33,6 @@ The backend is able to persist the data in the DTR / EDC and allows to use IRS f include::../../../uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml[] .... -TODO: Add all scenarios for data-provisioning include::data-provisioning/return-import-report.adoc[leveloffset=+1] diff --git a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml index a289e69058..9e23bdf92e 100644 --- a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml +++ b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data-import-interface-modul3-sequence.puml @@ -8,7 +8,7 @@ autonumber "[000]" BE ->> BE: scheduler job BE ->> BE: receive list of IN_SYNC assets -BE ->> Irs: get policy for assets from policy store : GET/irs/policies +BE ->> Irs: get policy for assets from policy store: GET/irs/policies Irs -->> BE: response BE ->> EDC: create policy in EDC: POST/create/policy EDC -->> BE: response @@ -23,7 +23,12 @@ EDC -->> BE: response BE ->> Submodels: create submodel: POST/submodel Submodels -->> BE: BE ->> Registry: [017] register shell in registry: POST/semantics/registry -Registry -->> BE: +alt Successful DTR shell creation +Registry -->> BE: shell created BE ->> BE: update asset state PUBLISHED_TO_CORE_SERVICES BE ->> BE: trigger IRS sync +else DTR shell was not created +Registry -->> BE: create shell not successful or service unavailable +BE ->> BE: update asset state ERROR +end @enduml diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java index 7e65788792..ec6909c99d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java @@ -52,7 +52,7 @@ public class AsyncPublishService { public void publishAssetsToCoreServices(List assets, boolean triggerSynchronizeAssets) { Map> assetsByPolicyId = assets.stream().collect(Collectors.groupingBy(AssetBase::getPolicyId)); - List createdShellsAssetIds = new ArrayList<>(List.of()); + List createdShellsAssetIds = new ArrayList<>(); assetsByPolicyId.forEach((policyId, assetsForPolicy) -> { String submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(policyId); assetsForPolicy.forEach(assetBase -> { @@ -61,13 +61,18 @@ public void publishAssetsToCoreServices(List assets, boolean triggerS createdShellsAssetIds.add(assetId); } catch (CreateDtrShellException e) { log.error("Failed to create shell in dtr for asset with id %s".formatted(assetBase.getId()), e); + updateAssetStates(ImportState.ERROR, "Failed to create shell in DTR", List.of(assetBase.getId())); } }); }); - assetAsBuiltRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CORE_SERVICES, ImportNote.PUBLISHED_TO_CORE_SERVICES, createdShellsAssetIds); - assetAsPlannedRepository.updateImportStateAndNoteForAssets(ImportState.PUBLISHED_TO_CORE_SERVICES, ImportNote.PUBLISHED_TO_CORE_SERVICES, createdShellsAssetIds); - if(triggerSynchronizeAssets) { + updateAssetStates(ImportState.PUBLISHED_TO_CORE_SERVICES, ImportNote.PUBLISHED_TO_CORE_SERVICES, createdShellsAssetIds); + if (triggerSynchronizeAssets) { decentralRegistryService.synchronizeAssets(); } } + + private void updateAssetStates(ImportState importState, String importNote, List assetIds) { + assetAsBuiltRepository.updateImportStateAndNoteForAssets(importState, importNote, assetIds); + assetAsPlannedRepository.updateImportStateAndNoteForAssets(importState, importNote, assetIds); + } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PolicyServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PolicyServiceImpl.java index 0d39a54ef5..17d1113b3c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PolicyServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PolicyServiceImpl.java @@ -28,9 +28,9 @@ import org.jetbrains.annotations.NotNull; import org.springframework.stereotype.Service; -import java.util.Collections; import java.util.List; -import java.util.Optional; + +import static org.apache.commons.collections4.ListUtils.emptyIfNull; @Slf4j @RequiredArgsConstructor @@ -54,7 +54,6 @@ public PolicyResponse getPolicyById(String id) { @NotNull private List getAcceptedPoliciesOrEmptyList() { - return Optional.ofNullable(irsRepository.getPolicies()) - .orElse(Collections.emptyList()); + return emptyIfNull(irsRepository.getPolicies()); } } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java index 2f56d9f178..5834e24552 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/PublishServiceImpl.java @@ -35,6 +35,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import static org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState.ERROR; +import static org.eclipse.tractusx.traceability.assets.domain.base.model.ImportState.TRANSIENT; + @Slf4j @RequiredArgsConstructor @@ -76,7 +79,7 @@ private void throwIfNotExists(String assetId) { private List updateAssetWithStatusAndPolicy(String policyId, List assetIds, AssetRepository repository) { List assetList = repository.getAssetsById(assetIds); List saveList = assetList.stream() - .filter(this::validTransientState) + .filter(this::validTransientOrErrorState) .map(asset -> { asset.setImportState(ImportState.IN_SYNCHRONIZATION); asset.setImportNote(ImportNote.IN_SYNCHRONIZATION); @@ -90,8 +93,8 @@ private List updateAssetWithStatusAndPolicy(String policyId, List { + try { + AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); + assertThat(asset.getImportState()).isEqualTo(ImportState.ERROR); + } catch (AssertionFailedError exception) { + return false; + } + return true; + }); + } + @Test void givenInvalidAssetID_whenPublishData_thenStatusCode404() throws JoseException, InterruptedException { // given @@ -518,7 +564,7 @@ void givenInvalidAssetID_whenPublishData_thenStatusCode404() throws JoseExceptio eventually(() -> { AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); assertNull(asset.getPolicyId()); - assertEquals(asset.getImportState(), ImportState.TRANSIENT); + assertEquals(ImportState.TRANSIENT, asset.getImportState()); return true; }); From 42d4f4fca191e87b24b64429596a6a95197a6cb9 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 14 Mar 2024 13:49:52 +0100 Subject: [PATCH 42/44] feature(tx-backend): #536 hendle error on EDC creation --- .../arc42/runtime-view/data-provisioning.adoc | 2 + .../publish-assets-error.adoc | 14 ++ .../publish-assets-error.puml | 23 +++ .../openapi/traceability-foss-backend.json | 2 +- .../assets/domain/base/model/ImportNote.java | 4 + .../CreateEdcResourcesException.java | 26 --- .../service/AsyncPublishService.java | 49 +++-- .../service/EdcAssetCreationService.java | 36 ++-- .../common/support/EdcSupport.java | 11 +- .../importdata/ImportControllerIT.java | 184 ++++++++++++++++++ 10 files changed, 289 insertions(+), 62 deletions(-) create mode 100644 docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets-error.adoc create mode 100644 docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets-error.puml delete mode 100644 tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/CreateEdcResourcesException.java diff --git a/docs/src/docs/arc42/runtime-view/data-provisioning.adoc b/docs/src/docs/arc42/runtime-view/data-provisioning.adoc index 12671ae138..01198ad925 100644 --- a/docs/src/docs/arc42/runtime-view/data-provisioning.adoc +++ b/docs/src/docs/arc42/runtime-view/data-provisioning.adoc @@ -37,3 +37,5 @@ include::../../../uml-diagrams/arc42/runtime-view/data-provisioning/trace-x-data include::data-provisioning/return-import-report.adoc[leveloffset=+1] include::data-provisioning/publish-assets.adoc[leveloffset=+1] + +include::data-provisioning/publish-assets-error.adoc[leveloffset=+1] diff --git a/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets-error.adoc b/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets-error.adoc new file mode 100644 index 0000000000..4fdbb0af30 --- /dev/null +++ b/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets-error.adoc @@ -0,0 +1,14 @@ += Scenario 2: Publish assets Error on EDC or DTR + +This section describes user interaction when publishing assets fails due to EDC or DTR error ( for example services are unavailable ) + +[plantuml,target=import-report-receive,format=svg] +.... +include::../../../../uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets-error.puml[] +.... + +== Overview + +When a user publishes assets, TraceX-FOSS checks if the user has an adequate role ('ROLE_ADMIN'). +If yes, then endpoint starts to publish assets to network. +If any of required Services are not available or returns Error response upon executing flow assets are set to ERROR state and user can retry publishing them at any time when services are available diff --git a/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets-error.puml b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets-error.puml new file mode 100644 index 0000000000..13168bf8b9 --- /dev/null +++ b/docs/src/uml-diagrams/arc42/runtime-view/data-provisioning/publish-assets-error.puml @@ -0,0 +1,23 @@ +@startuml +skinparam monochrome true +skinparam shadowing false +autonumber "[000]" + +actor TraceXApiConsumer +activate TraceXApiConsumer + +box "Trace-X FOSS" #LightGrey +participant TraceX +activate TraceX + +TraceXApiConsumer -> TraceX : POST /assets/publish +TraceX -> TraceX : Module 2 fails to create EDC Assets or DTR shells +TraceXApiConsumer -> TraceXApiConsumer : GET /assets +TraceXApiConsumer -> TraceX : POST /assets/publish +TraceX -> TraceX : Module 2 process successfully +TraceXApiConsumer -> TraceXApiConsumer : GET /assets + + + + +@enduml diff --git a/tx-backend/openapi/traceability-foss-backend.json b/tx-backend/openapi/traceability-foss-backend.json index 9068fab789..23dfb33fb3 100644 --- a/tx-backend/openapi/traceability-foss-backend.json +++ b/tx-backend/openapi/traceability-foss-backend.json @@ -1 +1 @@ -{"openapi":"3.0.1","info":{"title":"Trace-FOSS - OpenAPI Documentation","description":"Trace-FOSS is a system for tracking parts along the supply chain. A high level of transparency across the supplier network enables faster intervention based on a recorded event in the supply chain. This saves costs by seamlessly tracking parts and creates trust through clearly defined and secure data access by the companies and persons involved in the process.","license":{"name":"License: Apache 2.0"},"version":"1.0.0"},"servers":[{"url":"http://localhost:9998/api","description":"Generated server url"}],"security":[{"oAuth2":["profile email"]}],"tags":[{"name":"Investigations","description":"Operations on Investigation Notification"}],"paths":{"/bpn-config":{"get":{"tags":["BpnEdcMapping"],"summary":"Get BPN EDC URL mappings","description":"The endpoint returns a result of BPN EDC URL mappings.","operationId":"getBpnEdcs","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"put":{"tags":["BpnEdcMapping"],"summary":"Updates BPN EDC URL mappings","description":"The endpoint updates BPN EDC URL mappings","operationId":"updateBpnEdcMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["BpnEdcMapping"],"summary":"Creates BPN EDC URL mappings","description":"The endpoint creates BPN EDC URL mappings","operationId":"createBpnEdcUrlMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data/{submodelId}":{"get":{"tags":["Submodel"],"summary":"Gets Submodel by its id","description":"The endpoint returns Submodel for given id. Used for data providing functionality","operationId":"getSubmodelById","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found","content":{"application/json":{}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["Submodel"],"summary":"Save Submodel","description":"This endpoint allows you to save a Submodel identified by its ID.","operationId":"saveSubmodel","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"204":{"description":"No Content.","content":{"application/json":{}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok.","content":{"application/json":{}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations":{"post":{"tags":["Investigations"],"summary":"Start investigations by part ids","description":"The endpoint starts investigations based on part ids provided.","operationId":"investigateAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/update":{"post":{"tags":["Investigations"],"summary":"Update investigations by id","description":"The endpoint updates investigations by their id.","operationId":"updateInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/close":{"post":{"tags":["Investigations"],"summary":"Close investigations by id","description":"The endpoint closes investigations by their id.","operationId":"closeInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/cancel":{"post":{"tags":["Investigations"],"summary":"Cancles investigations by id","description":"The endpoint cancles investigations by their id.","operationId":"cancelInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/approve":{"post":{"tags":["Investigations"],"summary":"Approves investigations by id","description":"The endpoint approves investigations by their id.","operationId":"approveInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/filter":{"post":{"tags":["Investigations"],"summary":"Filter investigations defined by the request body","description":"The endpoint returns investigations as paged result.","operationId":"filterInvestigations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"minItems":-2147483648,"type":"array","description":"Investigations","items":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}}}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/edc/notification/contract":{"post":{"tags":["Notifications"],"summary":"Triggers EDC notification contract","description":"The endpoint Triggers EDC notification contract based on notification type and method","operationId":"createNotificationContract","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/contracts":{"post":{"tags":["Contracts"],"summary":"All contract agreements for all assets","description":"This endpoint returns all contract agreements for all assets in Trace-X","operationId":"contracts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Internal server error."}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Not found."}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Forbidden."}}}}},"200":{"description":"Ok.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","description":"PageResults","items":{"$ref":"#/components/schemas/PageResultContractResponse"}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Too many requests."}}}}},"415":{"description":"Unsupported media type.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Unsupported media type."}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Authorization failed."}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Bad request."}}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/publish":{"post":{"tags":["AssetsImport","AssetsPublish"],"summary":"asset publish","description":"This endpoint publishes assets to the Catena-X network.","operationId":"publishAssets","parameters":[{"name":"triggerSynchronizeAssets","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAssetRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/import":{"post":{"tags":["AssetsImport"],"summary":"asset upload","description":"This endpoint stores assets in the application. Those can be later published in the Catena-X network.","operationId":"importJson","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/sync":{"post":{"tags":["AssetsAsPlanned"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/detail-information":{"post":{"tags":["AssetsAsPlanned"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/sync":{"post":{"tags":["AssetsAsBuilt"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/detail-information":{"post":{"tags":["AssetsAsBuilt"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts":{"post":{"tags":["Alerts"],"summary":"Start alert by part ids","description":"The endpoint starts alert based on part ids provided.","operationId":"alertAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/update":{"post":{"tags":["Alerts"],"summary":"Update alert by id","description":"The endpoint updates alert by their id.","operationId":"updateAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/close":{"post":{"tags":["Alerts"],"summary":"Close alert by id","description":"The endpoint closes alert by id.","operationId":"closeAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"204":{"description":"No content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/cancel":{"post":{"tags":["Alerts"],"summary":"Cancels alert by id","description":"The endpoint cancels alert by id.","operationId":"cancelAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/approve":{"post":{"tags":["Alerts"],"summary":"Approves alert by id","description":"The endpoint approves alert by id.","operationId":"approveAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/filter":{"post":{"tags":["Alerts"],"summary":"Filter alerts defined by the request body","description":"The endpoint returns alerts as paged result.","operationId":"filterAlerts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Alerts","items":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/{assetId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsPlanned"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/{assetId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsBuilt"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"security":[{"oAuth2":["profile email"]}]}},"/registry/reload":{"get":{"tags":["Registry"],"summary":"Triggers reload of shell descriptors","description":"The endpoint Triggers reload of shell descriptors.","operationId":"reload","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"202":{"description":"Created registry reload job."},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/policies":{"get":{"tags":["Policies"],"summary":"Get all policies ","description":"The endpoint returns all policies .","operationId":"policy","responses":{"200":{"description":"Returns the policies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}":{"get":{"tags":["Investigations"],"summary":"Gets investigations by id","description":"The endpoint returns investigations as paged result by their id.","operationId":"getInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":-2147483648,"type":"array","description":"Investigations","items":{"$ref":"#/components/schemas/InvestigationResponse"}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/distinctFilterValues":{"get":{"tags":["Assets","Investigations"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/dashboard":{"get":{"tags":["Dashboard"],"summary":"Returns dashboard related data","description":"The endpoint can return limited data based on the user role","operationId":"dashboard","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns dashboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/import/report/{importJobId}":{"get":{"tags":["ImportReport","AssetsImport"],"summary":"report of the imported assets","description":"This endpoint returns information about the imported assets to Trace-X.","operationId":"importReport","parameters":[{"name":"importJobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportReportResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"AssetsAsPlanned","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"filter","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/distinctFilterValues":{"get":{"tags":["Assets","AssetsAsPlanned"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_1","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/*/children/{childId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildIdAndAssetId","parameters":[{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"assets","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"searchCriteriaRequestParam","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/distinctFilterValues":{"get":{"tags":["AssetsAsBuilt","Assets"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_2","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/countries":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get map of assets","description":"The endpoint returns a map for assets consumed by the map.","operationId":"assetsCountryMap","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/*/children/{childId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildId","parameters":[{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}":{"get":{"tags":["Alerts"],"summary":"Gets Alert by id","description":"The endpoint returns alert by id.","operationId":"getAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Alerts","items":{"$ref":"#/components/schemas/AlertResponse"}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/distinctFilterValues":{"get":{"tags":["Assets","Alerts"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_3","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data":{"delete":{"tags":["Submodel"],"summary":"Delete All Submodels","description":"Deletes all submodels from the system.","operationId":"deleteSubmodels","responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/bpn-config/{bpn}":{"delete":{"tags":["BpnEdcMapping"],"summary":"Deletes BPN EDC URL mappings","description":"The endpoint deletes BPN EDC URL mappings","operationId":"deleteBpnEdcUrlMappings","parameters":[{"name":"bpn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Deleted."},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Okay"},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}}},"components":{"schemas":{"BpnMappingRequest":{"required":["bpn","url"],"type":"object","properties":{"bpn":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"url":{"maxLength":255,"minLength":0,"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"maxLength":1000,"minLength":0,"pattern":"^.*$","type":"string","example":"Access Denied"}}},"BpnEdcMappingResponse":{"type":"object","properties":{"bpn":{"type":"string","example":"BPNL00000003CSGV"},"url":{"type":"string","example":"https://trace-x-test-edc.dev.demo.catena-x.net/a1"}}},"StartQualityNotificationRequest":{"required":["severity"],"type":"object","properties":{"partIds":{"maxLength":100,"minLength":1,"maxItems":50,"minItems":1,"type":"array","example":["urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"],"items":{"maxLength":100,"minLength":1,"type":"string","example":"[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]"}},"description":{"maxLength":1000,"minLength":15,"type":"string","example":"The description"},"targetDate":{"type":"string","format":"date-time","example":"2099-03-11T22:44:06.333826952Z"},"severity":{"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE_THREATENING"]},"receiverBpn":{"type":"string","example":"BPN00001123123AS"},"asBuilt":{"type":"boolean"}}},"QualityNotificationIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1}}},"UpdateQualityNotificationRequest":{"required":["status"],"type":"object","properties":{"status":{"type":"string","description":"The UpdateInvestigationStatus","enum":["ACKNOWLEDGED","ACCEPTED","DECLINED"]},"reason":{"type":"string","example":"The reason."}}},"CloseQualityNotificationRequest":{"type":"object","properties":{"reason":{"maxLength":1000,"minLength":15,"type":"string","example":"The reason."}}},"OwnPageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"sort":{"maxItems":2147483647,"type":"array","description":"Content of Assets PageResults","example":"manufacturerPartId,desc","items":{"type":"string"}}}},"PageableFilterRequest":{"type":"object","properties":{"pageAble":{"$ref":"#/components/schemas/OwnPageable"},"searchCriteria":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}},"SearchCriteriaRequestParam":{"type":"object","properties":{"filter":{"maxItems":2147483647,"type":"array","description":"Filter Criteria","example":"owner,EQUAL,OWN","items":{"type":"string"}}}},"InvestigationResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}},"QualityNotificationMessageResponse":{"type":"object","properties":{"id":{"type":"string"},"createdBy":{"type":"string"},"createdByName":{"type":"string"},"sendTo":{"type":"string"},"sendToName":{"type":"string"},"edcUrl":{"type":"string"},"contractAgreementId":{"type":"string"},"notificationReferenceId":{"type":"string"},"targetDate":{"type":"string","format":"date-time"},"severity":{"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"edcNotificationId":{"type":"string"},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"messageId":{"type":"string"},"isInitial":{"type":"boolean"},"status":{"type":"string","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"errorMessage":{"type":"string"}}},"QualityNotificationReasonResponse":{"type":"object","properties":{"close":{"maxLength":1000,"minLength":0,"type":"string","example":"description of closing reason"},"accept":{"maxLength":1000,"minLength":0,"type":"string","example":"description of accepting reason"},"decline":{"maxLength":1000,"minLength":0,"type":"string","example":"description of declining reason"}}},"CreateNotificationContractRequest":{"required":["notificationMethod","notificationType"],"type":"object","properties":{"notificationType":{"type":"string","enum":["QUALITY_INVESTIGATION","QUALITY_ALERT"]},"notificationMethod":{"type":"string","enum":["RECEIVE","UPDATE","RESOLVE"]}}},"CreateNotificationContractResponse":{"type":"object","properties":{"notificationAssetId":{"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"accessPolicyId":{"type":"string","example":"123"},"contractDefinitionId":{"type":"string","example":"456"}}},"ContractResponse":{"type":"object","properties":{"contractId":{"maxLength":255,"type":"string","example":"66"},"counterpartyAddress":{"maxLength":255,"type":"string","example":"https://trace-x-edc-e2e-a.dev.demo.catena-x.net/api/v1/dsp"},"creationDate":{"maxLength":255,"type":"string","format":"date-time","example":"2023-02-21T21:27:10.73495Z"},"endDate":{"maxLength":255,"type":"string","format":"date-time","example":"2023-02-21T21:27:10.73495Z"},"state":{"maxLength":255,"type":"string","example":"FINALIZED"},"policy":{"maxLength":255,"type":"string","example":"{\\\"@id\\\":\\\"eb0c8486-914a-4d36-84c0-b4971cbc52e4\\\",\\\"@type\\\":\\\"odrl:Set\\\",\\\"odrl:permission\\\":{\\\"odrl:target\\\":\\\"registry-asset\\\",\\\"odrl:action\\\":{\\\"odrl:type\\\":\\\"USE\\\"},\\\"odrl:constraint\\\":{\\\"odrl:or\\\":{\\\"odrl:leftOperand\\\":\\\"PURPOSE\\\",\\\"odrl:operator\\\":{\\\"@id\\\":\\\"odrl:eq\\\"},\\\"odrl:rightOperand\\\":\\\"ID 3.0 Trace\\\"}}},\\\"odrl:prohibition\\\":[],\\\"odrl:obligation\\\":[],\\\"odrl:target\\\":\\\"registry-asset\\\"}"}}},"PageResultContractResponse":{"type":"object","properties":{"content":{"maxItems":2147483647,"minItems":0,"type":"array","description":"Content of PageResults","items":{"$ref":"#/components/schemas/ContractResponse"}},"page":{"type":"integer","format":"int32","example":1},"pageCount":{"type":"integer","format":"int32","example":15},"pageSize":{"type":"integer","format":"int32","example":10},"totalItems":{"type":"integer","format":"int64","example":2}}},"RegisterAssetRequest":{"required":["assetIds","policyId"],"type":"object","properties":{"policyId":{"type":"string","example":"a644a7cb-3de5-493b-9259-f01db315a46e"},"assetIds":{"type":"array","items":{"type":"string"}}}},"SyncAssetsRequest":{"type":"object","properties":{"globalAssetIds":{"maxItems":100,"minItems":1,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]"}}}},"GetDetailInformationRequest":{"type":"object","properties":{"assetIds":{"maxLength":50,"minLength":1,"maxItems":50,"minItems":1,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"],"items":{"maxLength":50,"minLength":1,"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]"}}}},"DescriptionsResponse":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:a4a26b9c-9460-4cc5-8645-85916b86adb0"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"}}},"DetailAspectDataAsBuiltResponse":{"type":"object","properties":{"partId":{"maxLength":255,"minLength":0,"type":"string","example":"95657762-59"},"customerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"01697F7-65"},"nameAtCustomer":{"maxLength":255,"minLength":0,"type":"string","example":"Door front-left"},"manufacturingCountry":{"maxLength":255,"minLength":0,"type":"string","example":"DEU"},"manufacturingDate":{"maxLength":255,"minLength":0,"type":"string","example":"2022-02-04T13:48:54Z"}}},"DetailAspectDataAsPlannedResponse":{"type":"object","properties":{"validityPeriodFrom":{"maxLength":255,"minLength":0,"type":"string","example":"2022-09-26T12:43:51.079Z"},"validityPeriodTo":{"maxLength":255,"minLength":0,"type":"string","example":"20232-07-13T12:00:00.000Z"}}},"DetailAspectDataResponse":{"type":"object","oneOf":[{"$ref":"#/components/schemas/DetailAspectDataAsBuiltResponse"},{"$ref":"#/components/schemas/DetailAspectDataAsPlannedResponse"},{"$ref":"#/components/schemas/PartSiteInformationAsPlannedResponse"},{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeResponse"}]},"DetailAspectDataTractionBatteryCodeResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string","example":"pack"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string","example":"X12MCPM27KLPCLX2M2382320"},"subcomponents":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeSubcomponentResponse"}}}},"DetailAspectDataTractionBatteryCodeSubcomponentResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string","example":"pack"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string","example":"X12MCPM27KLPCLX2M2382320"}}},"DetailAspectModelResponse":{"type":"object","properties":{"type":{"type":"string","example":"PART_SITE_INFORMATION_AS_PLANNED","enum":["AS_BUILT","AS_PLANNED","TRACTION_BATTERY_CODE","SINGLE_LEVEL_BOM_AS_BUILT","SINGLE_LEVEL_USAGE_AS_BUILT","SINGLE_LEVEL_BOM_AS_PLANNED","PART_SITE_INFORMATION_AS_PLANNED"]},"data":{"$ref":"#/components/schemas/DetailAspectDataResponse"}}},"PartSiteInformationAsPlannedResponse":{"type":"object","properties":{"functionValidUntil":{"type":"string","example":"2025-02-08T04:30:48.000Z"},"function":{"type":"string","example":"production"},"functionValidFrom":{"type":"string","example":"2023-10-13T14:30:45+01:00"},"catenaXSiteId":{"type":"string","example":"urn:uuid:0fed587c-7ab4-4597-9841-1718e9693003"}}},"AlertResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}},"UpdateAssetRequest":{"required":["qualityType"],"type":"object","properties":{"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]}}},"ConstraintResponse":{"type":"object","properties":{"leftOperand":{"type":"string","example":"PURPOSE"},"operatorTypeResponse":{"type":"string","enum":["EQ","NEQ","LT","GT","IN","LTEQ","GTEQ","ISA","HASPART","ISPARTOF","ISONEOF","ISALLOF","ISNONEOF"]},"rightOperand":{"type":"string","example":"ID Trace 3.1"}}},"ConstraintsResponse":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/ConstraintResponse"}},"or":{"type":"array","items":{"$ref":"#/components/schemas/ConstraintResponse"}}}},"PermissionResponse":{"type":"object","properties":{"action":{"type":"string","example":"USE","enum":["ACCESS","USE"]},"constraints":{"$ref":"#/components/schemas/ConstraintsResponse"}}},"PolicyResponse":{"type":"object","properties":{"policyId":{"type":"string","example":"5a00bb50-0253-405f-b9f1-1a3150b9d51d"},"createdOn":{"type":"string","format":"date-time"},"validUntil":{"type":"string","format":"date-time"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionResponse"}}}},"DashboardResponse":{"type":"object","properties":{"asBuiltCustomerParts":{"type":"integer","format":"int64","example":5},"asPlannedCustomerParts":{"type":"integer","format":"int64","example":10},"asBuiltSupplierParts":{"type":"integer","format":"int64","example":2},"asPlannedSupplierParts":{"type":"integer","format":"int64","example":3},"asBuiltOwnParts":{"type":"integer","format":"int64","example":1},"asPlannedOwnParts":{"type":"integer","format":"int64","example":1},"myPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"myPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":1},"supplierPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"customerPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"supplierPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":2},"customerPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":2},"receivedActiveAlerts":{"type":"integer","format":"int64","example":2},"receivedActiveInvestigations":{"type":"integer","format":"int64","example":2},"sentActiveAlerts":{"type":"integer","format":"int64","example":2},"sentActiveInvestigations":{"type":"integer","format":"int64","example":2}}},"ImportJobResponse":{"type":"object","properties":{"importJobStatus":{"type":"string","enum":["INITIALIZING","RUNNING","ERROR","COMPLETED"]},"importId":{"type":"string","example":"456a952e-05eb-40dc-a6f2-9c2cb9c1387f"},"startedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"completedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"}}},"ImportReportResponse":{"type":"object","properties":{"importJob":{"$ref":"#/components/schemas/ImportJobResponse"},"importedAsset":{"type":"array","items":{"$ref":"#/components/schemas/ImportedAssetResponse"}}}},"ImportedAssetResponse":{"type":"object","properties":{"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"catenaxId":{"type":"string","example":"urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd}"},"importedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"importMessage":{"type":"string","example":"Asset created successfully in transient state."}}}},"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"localhost","scopes":{"profile email":""}}}}}}} \ No newline at end of file +{"openapi":"3.0.1","info":{"title":"Trace-FOSS - OpenAPI Documentation","description":"Trace-FOSS is a system for tracking parts along the supply chain. A high level of transparency across the supplier network enables faster intervention based on a recorded event in the supply chain. This saves costs by seamlessly tracking parts and creates trust through clearly defined and secure data access by the companies and persons involved in the process.","license":{"name":"License: Apache 2.0"},"version":"1.0.0"},"servers":[{"url":"http://localhost:9998/api","description":"Generated server url"}],"security":[{"oAuth2":["profile email"]}],"tags":[{"name":"Investigations","description":"Operations on Investigation Notification"}],"paths":{"/bpn-config":{"get":{"tags":["BpnEdcMapping"],"summary":"Get BPN EDC URL mappings","description":"The endpoint returns a result of BPN EDC URL mappings.","operationId":"getBpnEdcs","responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"put":{"tags":["BpnEdcMapping"],"summary":"Updates BPN EDC URL mappings","description":"The endpoint updates BPN EDC URL mappings","operationId":"updateBpnEdcMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["BpnEdcMapping"],"summary":"Creates BPN EDC URL mappings","description":"The endpoint creates BPN EDC URL mappings","operationId":"createBpnEdcUrlMappings","requestBody":{"content":{"application/json":{"schema":{"maxItems":1000,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnMappingRequest"}}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for BpnEdcMapping","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"$ref":"#/components/schemas/BpnEdcMappingResponse"}}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data/{submodelId}":{"get":{"tags":["Submodel"],"summary":"Gets Submodel by its id","description":"The endpoint returns Submodel for given id. Used for data providing functionality","operationId":"getSubmodelById","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found","content":{"application/json":{}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"post":{"tags":["Submodel"],"summary":"Save Submodel","description":"This endpoint allows you to save a Submodel identified by its ID.","operationId":"saveSubmodel","parameters":[{"name":"submodelId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok.","content":{"application/json":{}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content.","content":{"application/json":{}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations":{"post":{"tags":["Investigations"],"summary":"Start investigations by part ids","description":"The endpoint starts investigations based on part ids provided.","operationId":"investigateAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/update":{"post":{"tags":["Investigations"],"summary":"Update investigations by id","description":"The endpoint updates investigations by their id.","operationId":"updateInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/close":{"post":{"tags":["Investigations"],"summary":"Close investigations by id","description":"The endpoint closes investigations by their id.","operationId":"closeInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/cancel":{"post":{"tags":["Investigations"],"summary":"Cancles investigations by id","description":"The endpoint cancles investigations by their id.","operationId":"cancelInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}/approve":{"post":{"tags":["Investigations"],"summary":"Approves investigations by id","description":"The endpoint approves investigations by their id.","operationId":"approveInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/filter":{"post":{"tags":["Investigations"],"summary":"Filter investigations defined by the request body","description":"The endpoint returns investigations as paged result.","operationId":"filterInvestigations","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"minItems":-2147483648,"type":"array","description":"Investigations","items":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}}}}}}}},"security":[{"oAuth2":["profile email"]}]}},"/edc/notification/contract":{"post":{"tags":["Notifications"],"summary":"Triggers EDC notification contract","description":"The endpoint Triggers EDC notification contract based on notification type and method","operationId":"createNotificationContract","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateNotificationContractResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/contracts":{"post":{"tags":["Contracts"],"summary":"All contract agreements for all assets","description":"This endpoint returns all contract agreements for all assets in Trace-X","operationId":"contracts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Authorization failed."}}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Internal server error."}}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Bad request."}}}}},"200":{"description":"Ok.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","description":"PageResults","items":{"$ref":"#/components/schemas/PageResultContractResponse"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Not found."}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Forbidden."}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Too many requests."}}}}},"415":{"description":"Unsupported media type.","content":{"application/json":{"schema":{"type":"string","example":{"message":"Unsupported media type."}}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/publish":{"post":{"tags":["AssetsImport","AssetsPublish"],"summary":"asset publish","description":"This endpoint publishes assets to the Catena-X network.","operationId":"publishAssets","parameters":[{"name":"triggerSynchronizeAssets","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAssetRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/import":{"post":{"tags":["AssetsImport"],"summary":"asset upload","description":"This endpoint stores assets in the application. Those can be later published in the Catena-X network.","operationId":"importJson","requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/sync":{"post":{"tags":["AssetsAsPlanned"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/detail-information":{"post":{"tags":["AssetsAsPlanned"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/sync":{"post":{"tags":["AssetsAsBuilt"],"summary":"Synchronizes assets from IRS","description":"The endpoint synchronizes the assets from irs.","operationId":"sync_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncAssetsRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/detail-information":{"post":{"tags":["AssetsAsBuilt"],"summary":"Searches for assets by ids.","description":"The endpoint searchs for assets by id and returns a list of them.","operationId":"getDetailInformation_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDetailInformationRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts":{"post":{"tags":["Alerts"],"summary":"Start alert by part ids","description":"The endpoint starts alert based on part ids provided.","operationId":"alertAssets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartQualityNotificationRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"201":{"description":"Created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityNotificationIdResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/update":{"post":{"tags":["Alerts"],"summary":"Update alert by id","description":"The endpoint updates alert by their id.","operationId":"updateAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityNotificationRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/close":{"post":{"tags":["Alerts"],"summary":"Close alert by id","description":"The endpoint closes alert by id.","operationId":"closeAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseQualityNotificationRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/cancel":{"post":{"tags":["Alerts"],"summary":"Cancels alert by id","description":"The endpoint cancels alert by id.","operationId":"cancelAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}/approve":{"post":{"tags":["Alerts"],"summary":"Approves alert by id","description":"The endpoint approves alert by id.","operationId":"approveAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/filter":{"post":{"tags":["Alerts"],"summary":"Filter alerts defined by the request body","description":"The endpoint returns alerts as paged result.","operationId":"filterAlerts","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableFilterRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Alerts","items":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/{assetId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsPlanned"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/{assetId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by id","description":"The endpoint returns an asset filtered by id .","operationId":"assetById_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]},"patch":{"tags":["AssetsAsBuilt"],"summary":"Updates asset","description":"The endpoint updates asset by provided quality type.","operationId":"updateAsset_1","parameters":[{"name":"assetId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssetRequest"}}},"required":true},"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the updated asset","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/registry/reload":{"get":{"tags":["Registry"],"summary":"Triggers reload of shell descriptors","description":"The endpoint Triggers reload of shell descriptors.","operationId":"reload","responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"202":{"description":"Created registry reload job."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/policies":{"get":{"tags":["Policies"],"summary":"Get all policies ","description":"The endpoint returns all policies .","operationId":"policy","responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the policies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/{investigationId}":{"get":{"tags":["Investigations"],"summary":"Gets investigations by id","description":"The endpoint returns investigations as paged result by their id.","operationId":"getInvestigation","parameters":[{"name":"investigationId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":-2147483648,"type":"array","description":"Investigations","items":{"$ref":"#/components/schemas/InvestigationResponse"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/investigations/distinctFilterValues":{"get":{"tags":["Assets","Investigations"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/dashboard":{"get":{"tags":["Dashboard"],"summary":"Returns dashboard related data","description":"The endpoint can return limited data based on the user role","operationId":"dashboard","responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns dashboard data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/import/report/{importJobId}":{"get":{"tags":["ImportReport","AssetsImport"],"summary":"report of the imported assets","description":"This endpoint returns information about the imported assets to Trace-X.","operationId":"importReport","parameters":[{"name":"importJobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportReportResponse"}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"AssetsAsPlanned","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"filter","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/distinctFilterValues":{"get":{"tags":["Assets","AssetsAsPlanned"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_1","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-planned/*/children/{childId}":{"get":{"tags":["AssetsAsPlanned"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildIdAndAssetId","parameters":[{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get assets by pagination","description":"The endpoint returns a paged result of assets.","operationId":"assets","parameters":[{"name":"pageable","in":"query","required":true,"schema":{"$ref":"#/components/schemas/OwnPageable"}},{"name":"searchCriteriaRequestParam","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the paged result found for Asset","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/distinctFilterValues":{"get":{"tags":["AssetsAsBuilt","Assets"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_2","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"owner","in":"query","required":true,"schema":{"type":"string","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/countries":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get map of assets","description":"The endpoint returns a map for assets consumed by the map.","operationId":"assetsCountryMap","responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns the assets found","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/assets/as-built/*/children/{childId}":{"get":{"tags":["AssetsAsBuilt"],"summary":"Get asset by child id","description":"The endpoint returns an asset filtered by child id.","operationId":"assetByChildId","parameters":[{"name":"childId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returns the asset by childId","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Assets","items":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"},"semanticModelId":{"maxLength":255,"minLength":0,"type":"string","example":"NO-246880451848384868750731"},"businessPartner":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"manufacturerName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"nameAtManufacturer":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"manufacturerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"owner":{"type":"string","example":"CUSTOMER","enum":["SUPPLIER","CUSTOMER","OWN","UNKNOWN"]},"childRelations":{"maxItems":2147483647,"type":"array","description":"Child relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"parentRelations":{"maxItems":2147483647,"type":"array","description":"Parent relationships","items":{"$ref":"#/components/schemas/DescriptionsResponse"}},"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]},"van":{"maxLength":255,"minLength":0,"type":"string","example":"OMAYSKEITUGNVHKKX"},"semanticDataModel":{"type":"string","example":"BATCH","enum":["BATCH","SERIALPART","UNKNOWN","PARTASPLANNED","JUSTINSEQUENCE","TOMBSTONEASBUILT","TOMBSTONEASPLANNED"]},"classification":{"maxLength":255,"minLength":0,"type":"string","example":"component"},"detailAspectModels":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectModelResponse"}},"sentQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"receivedQualityAlertIdsInStatusActive":{"type":"array","example":1,"items":{"type":"integer","format":"int64","example":1}},"sentQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"receivedQualityInvestigationIdsInStatusActive":{"type":"array","example":2,"items":{"type":"integer","format":"int64","example":2}},"importState":{"type":"string","example":"TRANSIENT","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"importNote":{"type":"string","example":"Asset created successfully in transient state"},"tombstone":{"type":"string","example":" {\n \"catenaXId\": \"urn:uuid:7e4541ea-bb0f-464c-8cb3-021abccbfaf5\",\n \"endpointURL\": \"https://irs-provider-dataplane3.dev.demo.catena-x.net/api/public/data/urn:uuid:c7b3ea3d-97ea-41e4-960d-12fb166e1da1\",\n \"processingError\": {\n \"processStep\": \"SubmodelRequest\",\n \"errorDetail\": \"org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : \"{\"errors\":[]}\"\",\n \"lastAttempt\": \"2024-02-07T12:06:34.400493282Z\",\n \"retryCounter\": 0\n },\n \"policy\": null\n }\n"},"contractAgreementId":{"type":"string","example":"TODO"}}}}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/{alertId}":{"get":{"tags":["Alerts"],"summary":"Gets Alert by id","description":"The endpoint returns alert by id.","operationId":"getAlert","parameters":[{"name":"alertId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"OK.","content":{"application/json":{"schema":{"maxItems":2147483647,"type":"array","description":"Alerts","items":{"$ref":"#/components/schemas/AlertResponse"}}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/alerts/distinctFilterValues":{"get":{"tags":["Assets","Alerts"],"summary":"getDistinctFilterValues","description":"The endpoint returns a distinct filter values for given fieldName.","operationId":"distinctFilterValues_3","parameters":[{"name":"fieldName","in":"query","required":true,"schema":{"type":"string"}},{"name":"size","in":"query","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"startWith","in":"query","required":true,"schema":{"type":"string"}},{"name":"channel","in":"query","required":true,"schema":{"type":"string","enum":["SENDER","RECEIVER"]}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Returns a distinct filter values for given fieldName.","content":{"application/json":{"schema":{"maxItems":2147483647,"minItems":0,"type":"array","items":{"type":"string"}}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/submodel/data":{"delete":{"tags":["Submodel"],"summary":"Delete All Submodels","description":"Deletes all submodels from the system.","operationId":"deleteSubmodels","responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Ok."},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"No Content."},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oAuth2":["profile email"]}]}},"/bpn-config/{bpn}":{"delete":{"tags":["BpnEdcMapping"],"summary":"Deletes BPN EDC URL mappings","description":"The endpoint deletes BPN EDC URL mappings","operationId":"deleteBpnEdcUrlMappings","parameters":[{"name":"bpn","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Unsupported media type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"200":{"description":"Okay"},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authorization failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"204":{"description":"Deleted."}},"security":[{"oAuth2":["profile email"]}]}}},"components":{"schemas":{"BpnMappingRequest":{"required":["bpn","url"],"type":"object","properties":{"bpn":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003CSGV"},"url":{"maxLength":255,"minLength":0,"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"message":{"maxLength":1000,"minLength":0,"pattern":"^.*$","type":"string","example":"Access Denied"}}},"BpnEdcMappingResponse":{"type":"object","properties":{"bpn":{"type":"string","example":"BPNL00000003CSGV"},"url":{"type":"string","example":"https://trace-x-test-edc.dev.demo.catena-x.net/a1"}}},"StartQualityNotificationRequest":{"required":["severity"],"type":"object","properties":{"partIds":{"maxLength":100,"minLength":1,"maxItems":50,"minItems":1,"type":"array","example":["urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978"],"items":{"maxLength":100,"minLength":1,"type":"string","example":"[\"urn:uuid:fe99da3d-b0de-4e80-81da-882aebcca978\"]"}},"description":{"maxLength":1000,"minLength":15,"type":"string","example":"The description"},"targetDate":{"type":"string","format":"date-time","example":"2099-03-11T22:44:06.333826952Z"},"severity":{"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE_THREATENING"]},"receiverBpn":{"type":"string","example":"BPN00001123123AS"},"asBuilt":{"type":"boolean"}}},"QualityNotificationIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1}}},"UpdateQualityNotificationRequest":{"required":["status"],"type":"object","properties":{"status":{"type":"string","description":"The UpdateInvestigationStatus","enum":["ACKNOWLEDGED","ACCEPTED","DECLINED"]},"reason":{"type":"string","example":"The reason."}}},"CloseQualityNotificationRequest":{"type":"object","properties":{"reason":{"maxLength":1000,"minLength":15,"type":"string","example":"The reason."}}},"OwnPageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"size":{"type":"integer","format":"int32"},"sort":{"maxItems":2147483647,"type":"array","description":"Content of Assets PageResults","example":"manufacturerPartId,desc","items":{"type":"string"}}}},"PageableFilterRequest":{"type":"object","properties":{"pageAble":{"$ref":"#/components/schemas/OwnPageable"},"searchCriteria":{"$ref":"#/components/schemas/SearchCriteriaRequestParam"}}},"SearchCriteriaRequestParam":{"type":"object","properties":{"filter":{"maxItems":2147483647,"type":"array","description":"Filter Criteria","example":"owner,EQUAL,OWN","items":{"type":"string"}}}},"InvestigationResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}},"QualityNotificationMessageResponse":{"type":"object","properties":{"id":{"type":"string"},"createdBy":{"type":"string"},"createdByName":{"type":"string"},"sendTo":{"type":"string"},"sendToName":{"type":"string"},"edcUrl":{"type":"string"},"contractAgreementId":{"type":"string"},"notificationReferenceId":{"type":"string"},"targetDate":{"type":"string","format":"date-time"},"severity":{"type":"string","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"edcNotificationId":{"type":"string"},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"messageId":{"type":"string"},"isInitial":{"type":"boolean"},"status":{"type":"string","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"errorMessage":{"type":"string"}}},"QualityNotificationReasonResponse":{"type":"object","properties":{"close":{"maxLength":1000,"minLength":0,"type":"string","example":"description of closing reason"},"accept":{"maxLength":1000,"minLength":0,"type":"string","example":"description of accepting reason"},"decline":{"maxLength":1000,"minLength":0,"type":"string","example":"description of declining reason"}}},"CreateNotificationContractRequest":{"required":["notificationMethod","notificationType"],"type":"object","properties":{"notificationType":{"type":"string","enum":["QUALITY_INVESTIGATION","QUALITY_ALERT"]},"notificationMethod":{"type":"string","enum":["RECEIVE","UPDATE","RESOLVE"]}}},"CreateNotificationContractResponse":{"type":"object","properties":{"notificationAssetId":{"type":"string","example":"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"},"accessPolicyId":{"type":"string","example":"123"},"contractDefinitionId":{"type":"string","example":"456"}}},"ContractResponse":{"type":"object","properties":{"contractId":{"maxLength":255,"type":"string","example":"66"},"counterpartyAddress":{"maxLength":255,"type":"string","example":"https://trace-x-edc-e2e-a.dev.demo.catena-x.net/api/v1/dsp"},"creationDate":{"maxLength":255,"type":"string","format":"date-time","example":"2023-02-21T21:27:10.73495Z"},"endDate":{"maxLength":255,"type":"string","format":"date-time","example":"2023-02-21T21:27:10.73495Z"},"state":{"maxLength":255,"type":"string","example":"FINALIZED"},"policy":{"maxLength":255,"type":"string","example":"{\\\"@id\\\":\\\"eb0c8486-914a-4d36-84c0-b4971cbc52e4\\\",\\\"@type\\\":\\\"odrl:Set\\\",\\\"odrl:permission\\\":{\\\"odrl:target\\\":\\\"registry-asset\\\",\\\"odrl:action\\\":{\\\"odrl:type\\\":\\\"USE\\\"},\\\"odrl:constraint\\\":{\\\"odrl:or\\\":{\\\"odrl:leftOperand\\\":\\\"PURPOSE\\\",\\\"odrl:operator\\\":{\\\"@id\\\":\\\"odrl:eq\\\"},\\\"odrl:rightOperand\\\":\\\"ID 3.0 Trace\\\"}}},\\\"odrl:prohibition\\\":[],\\\"odrl:obligation\\\":[],\\\"odrl:target\\\":\\\"registry-asset\\\"}"}}},"PageResultContractResponse":{"type":"object","properties":{"content":{"maxItems":2147483647,"minItems":0,"type":"array","description":"Content of PageResults","items":{"$ref":"#/components/schemas/ContractResponse"}},"page":{"type":"integer","format":"int32","example":1},"pageCount":{"type":"integer","format":"int32","example":15},"pageSize":{"type":"integer","format":"int32","example":10},"totalItems":{"type":"integer","format":"int64","example":2}}},"RegisterAssetRequest":{"required":["assetIds","policyId"],"type":"object","properties":{"policyId":{"type":"string","example":"a644a7cb-3de5-493b-9259-f01db315a46e"},"assetIds":{"type":"array","items":{"type":"string"}}}},"SyncAssetsRequest":{"type":"object","properties":{"globalAssetIds":{"maxItems":100,"minItems":1,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]"}}}},"GetDetailInformationRequest":{"type":"object","properties":{"assetIds":{"maxLength":50,"minLength":1,"maxItems":50,"minItems":1,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd"],"items":{"maxLength":50,"minLength":1,"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\"]"}}}},"DescriptionsResponse":{"type":"object","properties":{"id":{"maxLength":255,"minLength":0,"type":"string","example":"urn:uuid:a4a26b9c-9460-4cc5-8645-85916b86adb0"},"idShort":{"maxLength":255,"minLength":0,"type":"string","example":"assembly-part-relationship"}}},"DetailAspectDataAsBuiltResponse":{"type":"object","properties":{"partId":{"maxLength":255,"minLength":0,"type":"string","example":"95657762-59"},"customerPartId":{"maxLength":255,"minLength":0,"type":"string","example":"01697F7-65"},"nameAtCustomer":{"maxLength":255,"minLength":0,"type":"string","example":"Door front-left"},"manufacturingCountry":{"maxLength":255,"minLength":0,"type":"string","example":"DEU"},"manufacturingDate":{"maxLength":255,"minLength":0,"type":"string","example":"2022-02-04T13:48:54Z"}}},"DetailAspectDataAsPlannedResponse":{"type":"object","properties":{"validityPeriodFrom":{"maxLength":255,"minLength":0,"type":"string","example":"2022-09-26T12:43:51.079Z"},"validityPeriodTo":{"maxLength":255,"minLength":0,"type":"string","example":"20232-07-13T12:00:00.000Z"}}},"DetailAspectDataResponse":{"type":"object","oneOf":[{"$ref":"#/components/schemas/DetailAspectDataAsBuiltResponse"},{"$ref":"#/components/schemas/DetailAspectDataAsPlannedResponse"},{"$ref":"#/components/schemas/PartSiteInformationAsPlannedResponse"},{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeResponse"}]},"DetailAspectDataTractionBatteryCodeResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string","example":"pack"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string","example":"X12MCPM27KLPCLX2M2382320"},"subcomponents":{"type":"array","items":{"$ref":"#/components/schemas/DetailAspectDataTractionBatteryCodeSubcomponentResponse"}}}},"DetailAspectDataTractionBatteryCodeSubcomponentResponse":{"type":"object","properties":{"productType":{"maxLength":255,"minLength":0,"type":"string","example":"pack"},"tractionBatteryCode":{"maxLength":255,"minLength":0,"type":"string","example":"X12MCPM27KLPCLX2M2382320"}}},"DetailAspectModelResponse":{"type":"object","properties":{"type":{"type":"string","example":"PART_SITE_INFORMATION_AS_PLANNED","enum":["AS_BUILT","AS_PLANNED","TRACTION_BATTERY_CODE","SINGLE_LEVEL_BOM_AS_BUILT","SINGLE_LEVEL_USAGE_AS_BUILT","SINGLE_LEVEL_BOM_AS_PLANNED","PART_SITE_INFORMATION_AS_PLANNED"]},"data":{"$ref":"#/components/schemas/DetailAspectDataResponse"}}},"PartSiteInformationAsPlannedResponse":{"type":"object","properties":{"functionValidUntil":{"type":"string","example":"2025-02-08T04:30:48.000Z"},"function":{"type":"string","example":"production"},"functionValidFrom":{"type":"string","example":"2023-10-13T14:30:45+01:00"},"catenaXSiteId":{"type":"string","example":"urn:uuid:0fed587c-7ab4-4597-9841-1718e9693003"}}},"AlertResponse":{"type":"object","properties":{"id":{"maximum":255,"minimum":0,"maxLength":255,"type":"integer","format":"int64","example":66},"status":{"maxLength":255,"minLength":0,"type":"string","example":"CREATED","enum":["CREATED","SENT","RECEIVED","ACKNOWLEDGED","ACCEPTED","DECLINED","CANCELED","CLOSED"]},"description":{"maxLength":1000,"minLength":0,"type":"string","example":"DescriptionText"},"createdBy":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"createdByName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"createdDate":{"maxLength":50,"minLength":0,"type":"string","example":"2023-02-21T21:27:10.734950Z"},"assetIds":{"maxItems":1000,"minItems":0,"type":"array","example":["urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd","urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd"],"items":{"type":"string","example":"[\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70528fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70529fcbd\",\"urn:uuid:ceb6b964-5779-49c1-b5e9-0ee70530fcbd\"]"}},"channel":{"maxLength":255,"minLength":0,"type":"string","example":"SENDER","enum":["SENDER","RECEIVER"]},"reason":{"$ref":"#/components/schemas/QualityNotificationReasonResponse"},"sendTo":{"maxLength":255,"minLength":0,"type":"string","example":"BPNL00000003AYRE"},"sendToName":{"maxLength":255,"minLength":0,"type":"string","example":"Tier C"},"severity":{"maxLength":255,"minLength":0,"type":"string","example":"MINOR","enum":["MINOR","MAJOR","CRITICAL","LIFE-THREATENING"]},"targetDate":{"maxLength":50,"minLength":0,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"errorMessage":{"maxLength":255,"minLength":0,"type":"string","example":"EDC not reachable"},"qualityNotificationMessageResponseList":{"type":"array","items":{"$ref":"#/components/schemas/QualityNotificationMessageResponse"}}}},"UpdateAssetRequest":{"required":["qualityType"],"type":"object","properties":{"qualityType":{"type":"string","example":"Ok","enum":["Ok","Minor","Major","Critical","LifeThreatening"]}}},"ConstraintResponse":{"type":"object","properties":{"leftOperand":{"type":"string","example":"PURPOSE"},"operatorTypeResponse":{"type":"string","enum":["EQ","NEQ","LT","GT","IN","LTEQ","GTEQ","ISA","HASPART","ISPARTOF","ISONEOF","ISALLOF","ISNONEOF"]},"rightOperand":{"type":"string","example":"ID Trace 3.1"}}},"ConstraintsResponse":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/ConstraintResponse"}},"or":{"type":"array","items":{"$ref":"#/components/schemas/ConstraintResponse"}}}},"PermissionResponse":{"type":"object","properties":{"action":{"type":"string","example":"USE","enum":["ACCESS","USE"]},"constraints":{"$ref":"#/components/schemas/ConstraintsResponse"}}},"PolicyResponse":{"type":"object","properties":{"policyId":{"type":"string","example":"5a00bb50-0253-405f-b9f1-1a3150b9d51d"},"createdOn":{"type":"string","format":"date-time"},"validUntil":{"type":"string","format":"date-time"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionResponse"}}}},"DashboardResponse":{"type":"object","properties":{"asBuiltCustomerParts":{"type":"integer","format":"int64","example":5},"asPlannedCustomerParts":{"type":"integer","format":"int64","example":10},"asBuiltSupplierParts":{"type":"integer","format":"int64","example":2},"asPlannedSupplierParts":{"type":"integer","format":"int64","example":3},"asBuiltOwnParts":{"type":"integer","format":"int64","example":1},"asPlannedOwnParts":{"type":"integer","format":"int64","example":1},"myPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"myPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":1},"supplierPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"customerPartsWithOpenAlerts":{"type":"integer","format":"int64","example":1},"supplierPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":2},"customerPartsWithOpenInvestigations":{"type":"integer","format":"int64","example":2},"receivedActiveAlerts":{"type":"integer","format":"int64","example":2},"receivedActiveInvestigations":{"type":"integer","format":"int64","example":2},"sentActiveAlerts":{"type":"integer","format":"int64","example":2},"sentActiveInvestigations":{"type":"integer","format":"int64","example":2}}},"ImportJobResponse":{"type":"object","properties":{"importJobStatus":{"type":"string","enum":["INITIALIZING","RUNNING","ERROR","COMPLETED"]},"importId":{"type":"string","example":"456a952e-05eb-40dc-a6f2-9c2cb9c1387f"},"startedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"completedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"}}},"ImportReportResponse":{"type":"object","properties":{"importJob":{"$ref":"#/components/schemas/ImportJobResponse"},"importedAsset":{"type":"array","items":{"$ref":"#/components/schemas/ImportedAssetResponse"}}}},"ImportedAssetResponse":{"type":"object","properties":{"importState":{"type":"string","enum":["TRANSIENT","PERSISTENT","ERROR","IN_SYNCHRONIZATION","PUBLISHED_TO_CORE_SERVICES","UNSET"]},"catenaxId":{"type":"string","example":"urn:uuid:7eeeac86-7b69-444d-81e6-655d0f1513bd}"},"importedOn":{"maxLength":50,"type":"string","example":"2099-02-21T21:27:10.734950Z"},"importMessage":{"type":"string","example":"Asset created successfully in transient state."}}}},"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"localhost","scopes":{"profile email":""}}}}}}} \ No newline at end of file diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java index 937946b682..87ba121b9d 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/base/model/ImportNote.java @@ -25,4 +25,8 @@ public class ImportNote { public static final String PERSISTED = "Asset created/updated successfully in persistant state."; public static final String IN_SYNCHRONIZATION = "Twin in sync with digital twin registry. Twin will not be updated."; public static final String PUBLISHED_TO_CORE_SERVICES = "Assets Published to core services"; + public static final String ERROR_DTR_SHELL_CREATION_FAILED = "Failed to create shell in DTR"; + public static final String ERROR_EDC_POLICY_CREATION_FAILED = "Failed to create Policy in EDC"; + public static final String ERROR_EDC_ASSET_CREATION_FAILED = "Failed to create Asset in EDC"; + public static final String ERROR_EDC_CONTRACT_CREATION_FAILED = "Failed to create Contract in EDC"; } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/CreateEdcResourcesException.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/CreateEdcResourcesException.java deleted file mode 100644 index 1b79d77c2a..0000000000 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/exception/CreateEdcResourcesException.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************** - * Copyright (c) 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.traceability.assets.domain.importpoc.exception; - -public class CreateEdcResourcesException extends RuntimeException{ - public CreateEdcResourcesException(Throwable throwable) { - super(throwable); - } -} diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java index ec6909c99d..19a6849bcb 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java @@ -21,6 +21,9 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.eclipse.tractusx.irs.edc.client.asset.model.exception.CreateEdcAssetException; +import org.eclipse.tractusx.irs.edc.client.contract.model.exception.CreateEdcContractDefinitionException; +import org.eclipse.tractusx.irs.edc.client.policy.model.exception.CreateEdcPolicyDefinitionException; import org.eclipse.tractusx.irs.registryclient.decentral.exception.CreateDtrShellException; import org.eclipse.tractusx.traceability.assets.domain.asbuilt.repository.AssetAsBuiltRepository; import org.eclipse.tractusx.traceability.assets.domain.asplanned.repository.AssetAsPlannedRepository; @@ -35,6 +38,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.stream.Collectors; @Slf4j @@ -54,21 +58,40 @@ public void publishAssetsToCoreServices(List assets, boolean triggerS List createdShellsAssetIds = new ArrayList<>(); assetsByPolicyId.forEach((policyId, assetsForPolicy) -> { - String submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(policyId); - assetsForPolicy.forEach(assetBase -> { - try { - String assetId = dtrService.createShellInDtr(assetBase, submodelServerAssetId); - createdShellsAssetIds.add(assetId); - } catch (CreateDtrShellException e) { - log.error("Failed to create shell in dtr for asset with id %s".formatted(assetBase.getId()), e); - updateAssetStates(ImportState.ERROR, "Failed to create shell in DTR", List.of(assetBase.getId())); + String submodelServerAssetId = null; + + try { + submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(policyId); + } catch (CreateEdcPolicyDefinitionException e) { + log.error("Failed to create EDC Policy.", e); + updateAssetStates(ImportState.ERROR, ImportNote.ERROR_EDC_POLICY_CREATION_FAILED, assetsForPolicy.stream().map(AssetBase::getId).toList()); + } catch (CreateEdcAssetException e) { + log.error("Failed to create EDC Asset.", e); + updateAssetStates(ImportState.ERROR, ImportNote.ERROR_EDC_ASSET_CREATION_FAILED, assetsForPolicy.stream().map(AssetBase::getId).toList()); + } catch (CreateEdcContractDefinitionException e) { + log.error("Failed to create EDC Contract.", e); + updateAssetStates(ImportState.ERROR, ImportNote.ERROR_EDC_CONTRACT_CREATION_FAILED, assetsForPolicy.stream().map(AssetBase::getId).toList()); + } + + + if (Objects.nonNull(submodelServerAssetId)) { + String tempSubmodelServerAssetId = submodelServerAssetId; + assetsForPolicy.forEach(assetBase -> { + try { + String assetId = dtrService.createShellInDtr(assetBase, tempSubmodelServerAssetId); + createdShellsAssetIds.add(assetId); + } catch (CreateDtrShellException e) { + log.error("Failed to create shell in dtr for asset with id %s".formatted(assetBase.getId()), e); + updateAssetStates(ImportState.ERROR, ImportNote.ERROR_DTR_SHELL_CREATION_FAILED, List.of(assetBase.getId())); + } + }); + + updateAssetStates(ImportState.PUBLISHED_TO_CORE_SERVICES, ImportNote.PUBLISHED_TO_CORE_SERVICES, createdShellsAssetIds); + if (triggerSynchronizeAssets) { + decentralRegistryService.synchronizeAssets(); } - }); + } }); - updateAssetStates(ImportState.PUBLISHED_TO_CORE_SERVICES, ImportNote.PUBLISHED_TO_CORE_SERVICES, createdShellsAssetIds); - if (triggerSynchronizeAssets) { - decentralRegistryService.synchronizeAssets(); - } } private void updateAssetStates(ImportState importState, String importNote, List assetIds) { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index 7ce7cae38d..a383d386e6 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -41,7 +41,6 @@ import org.eclipse.tractusx.irs.edc.client.policy.model.exception.EdcPolicyDefinitionAlreadyExists; import org.eclipse.tractusx.irs.edc.client.policy.service.EdcPolicyDefinitionService; import org.eclipse.tractusx.traceability.assets.application.importpoc.PolicyService; -import org.eclipse.tractusx.traceability.assets.domain.importpoc.exception.CreateEdcResourcesException; import org.eclipse.tractusx.traceability.common.properties.TraceabilityProperties; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; @@ -62,58 +61,53 @@ public class EdcAssetCreationService { @Value("${registry.urlWithPath}") String registryUrlWithPath = null; - public String createDtrAndSubmodelAssets(String policyId) { + public String createDtrAndSubmodelAssets(String policyId) throws CreateEdcPolicyDefinitionException, CreateEdcAssetException, CreateEdcContractDefinitionException { PolicyResponse policy = policyService.getPolicyById(policyId); String createdPolicyId; try { createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy(mapToEdcPolicyRequest(policy)); log.info("DTR Policy Id created :{}", createdPolicyId); - } catch (CreateEdcPolicyDefinitionException e) { - throw new CreateEdcResourcesException(e); } catch (EdcPolicyDefinitionAlreadyExists e) { createdPolicyId = policyId; + } catch (Exception exception) { + throw new CreateEdcPolicyDefinitionException(exception); } - String dtrAssetId; try { dtrAssetId = edcDtrAssetService.createDtrAsset(registryUrlWithPath, REGISTRY_ASSET_ID); log.info("DTR Asset Id created :{}", dtrAssetId); - } catch (CreateEdcAssetException e) { - throw new CreateEdcResourcesException(e); } catch (EdcAssetAlreadyExistsException e) { dtrAssetId = REGISTRY_ASSET_ID; + } catch (Exception exception) { + throw new CreateEdcAssetException(exception); } - - String dtrContractId; try { - dtrContractId = edcDtrContractDefinitionService.createContractDefinition(dtrAssetId, createdPolicyId); + String dtrContractId = edcDtrContractDefinitionService.createContractDefinition(dtrAssetId, createdPolicyId); log.info("DTR Contract Id created :{}", dtrContractId); - } catch (CreateEdcContractDefinitionException e) { - throw new CreateEdcResourcesException(e); + } catch (Exception e) { + throw new CreateEdcContractDefinitionException(e); } - String submodelAssetId; String submodelAssetIdToCreate = "urn:uuid:" + UUID.randomUUID(); try { submodelAssetId = edcDtrAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase() + "/api/submodel", submodelAssetIdToCreate); log.info("Submodel Asset Id created :{}", submodelAssetId); - } catch (CreateEdcAssetException e) { - throw new CreateEdcResourcesException(e); } catch (EdcAssetAlreadyExistsException e) { submodelAssetId = submodelAssetIdToCreate; + } catch (Exception exception) { + throw new CreateEdcAssetException(exception); } - - String submodelContractId; try { - submodelContractId = edcDtrContractDefinitionService.createContractDefinition(submodelAssetId, createdPolicyId); - } catch (CreateEdcContractDefinitionException e) { - throw new CreateEdcResourcesException(e); + String submodelContractId = edcDtrContractDefinitionService.createContractDefinition(submodelAssetId, createdPolicyId); + log.info("Submodel Contract Id created :{}", submodelContractId); + } catch (Exception e) { + throw new CreateEdcContractDefinitionException(e); } - log.info("Submodel Contract Id created :{}", submodelContractId); + return submodelAssetId; } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java index 18efe584f8..90b91a52d5 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/common/support/EdcSupport.java @@ -64,6 +64,15 @@ public void edcWillCreateAsset() { ); } + public void edcWillFailToCreateAsset() { + whenHttp(restitoProvider.stubServer()).match( + post("/management/v3/assets"), + EDC_API_KEY_HEADER + ).then( + status(HttpStatus.SERVICE_UNAVAILABLE_503) + ); + } + public void edcWillRemoveNotificationAsset() { whenHttp(restitoProvider.stubServer()).match( method(DELETE), @@ -169,7 +178,7 @@ public void edcWillFailToCreatePolicyDefinition() { post("/management/v2/policydefinitions"), EDC_API_KEY_HEADER ).then( - status(HttpStatus.INTERNAL_SERVER_ERROR_500) + status(HttpStatus.SERVICE_UNAVAILABLE_503) ); } diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java index df517c09ef..5f7bc24497 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/importdata/ImportControllerIT.java @@ -532,6 +532,190 @@ void givenValidFile_whenPublishDataFailsOnDtr_thenStatusShouldChangeError() thro }); } + @Test + void givenValidFile_whenPublishDataFailsOnPolicy_thenStatusShouldChangeError() throws JoseException, InterruptedException { + // given + String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); + File file = new File(path); + + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .when() + .multiPart(file) + .post("/api/assets/import") + .then() + .statusCode(200) + .extract().as(ImportResponse.class); + + RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("default-policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); + irsApiSupport.irsApiReturnsPolicies(); + edcApiSupport.edcWillFailToCreatePolicyDefinition(); + edcApiSupport.edcWillCreateAsset(); + edcApiSupport.edcWillCreateContractDefinition(); + oAuth2ApiSupport.oauth2ApiReturnsTechnicalUserToken(); + oAuth2ApiSupport.oauth2ApiReturnsDtrToken(); + dtrApiSupport.dtrWillCreateShell(); + + // when + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .contentType(ContentType.JSON) + .when() + .body(registerAssetRequest) + .post("/api/assets/publish") + .then() + .statusCode(201); + + // then + eventually(() -> { + try { + AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); + assertThat(asset.getImportState()).isEqualTo(ImportState.ERROR); + } catch (AssertionFailedError exception) { + return false; + } + return true; + }); + } + + @Test + void givenValidFile_whenPublishDataFailsOnEdcPolicyCreation_thenStatusShouldChangeError() throws JoseException, InterruptedException { + // given + String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); + File file = new File(path); + + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .when() + .multiPart(file) + .post("/api/assets/import") + .then() + .statusCode(200) + .extract().as(ImportResponse.class); + + RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("default-policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); + irsApiSupport.irsApiReturnsPolicies(); + edcApiSupport.edcWillFailToCreatePolicyDefinition(); + edcApiSupport.edcWillCreateAsset(); + edcApiSupport.edcWillCreateContractDefinition(); + oAuth2ApiSupport.oauth2ApiReturnsTechnicalUserToken(); + oAuth2ApiSupport.oauth2ApiReturnsDtrToken(); + dtrApiSupport.dtrWillCreateShell(); + + // when + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .contentType(ContentType.JSON) + .when() + .body(registerAssetRequest) + .post("/api/assets/publish") + .then() + .statusCode(201); + + // then + eventually(() -> { + try { + AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); + assertThat(asset.getImportState()).isEqualTo(ImportState.ERROR); + } catch (AssertionFailedError exception) { + return false; + } + return true; + }); + } + + @Test + void givenValidFile_whenPublishDataFailsOnEdcAssetCreation_thenStatusShouldChangeError() throws JoseException, InterruptedException { + // given + String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); + File file = new File(path); + + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .when() + .multiPart(file) + .post("/api/assets/import") + .then() + .statusCode(200) + .extract().as(ImportResponse.class); + + RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("default-policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); + irsApiSupport.irsApiReturnsPolicies(); + edcApiSupport.edcWillCreatePolicyDefinition(); + edcApiSupport.edcWillFailToCreateAsset(); + edcApiSupport.edcWillCreateContractDefinition(); + oAuth2ApiSupport.oauth2ApiReturnsTechnicalUserToken(); + oAuth2ApiSupport.oauth2ApiReturnsDtrToken(); + dtrApiSupport.dtrWillCreateShell(); + + // when + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .contentType(ContentType.JSON) + .when() + .body(registerAssetRequest) + .post("/api/assets/publish") + .then() + .statusCode(201); + + // then + eventually(() -> { + try { + AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); + assertThat(asset.getImportState()).isEqualTo(ImportState.ERROR); + } catch (AssertionFailedError exception) { + return false; + } + return true; + }); + } + + @Test + void givenValidFile_whenPublishDataFailsOnEdcContractCreation_thenStatusShouldChangeError() throws JoseException, InterruptedException { + // given + String path = getClass().getResource("/testdata/importfiles/validImportFile.json").getFile(); + File file = new File(path); + + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .when() + .multiPart(file) + .post("/api/assets/import") + .then() + .statusCode(200) + .extract().as(ImportResponse.class); + + RegisterAssetRequest registerAssetRequest = new RegisterAssetRequest("default-policy", List.of("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f")); + irsApiSupport.irsApiReturnsPolicies(); + edcApiSupport.edcWillCreatePolicyDefinition(); + edcApiSupport.edcWillCreateAsset(); + edcApiSupport.edcWillFailToCreateContractDefinition(); + oAuth2ApiSupport.oauth2ApiReturnsTechnicalUserToken(); + oAuth2ApiSupport.oauth2ApiReturnsDtrToken(); + dtrApiSupport.dtrWillCreateShell(); + + // when + given() + .header(oAuth2Support.jwtAuthorization(JwtRole.ADMIN)) + .contentType(ContentType.JSON) + .when() + .body(registerAssetRequest) + .post("/api/assets/publish") + .then() + .statusCode(201); + + // then + eventually(() -> { + try { + AssetBase asset = assetAsBuiltRepository.getAssetById("urn:uuid:254604ab-2153-45fb-8cad-54ef09f4080f"); + assertThat(asset.getImportState()).isEqualTo(ImportState.ERROR); + } catch (AssertionFailedError exception) { + return false; + } + return true; + }); + } + @Test void givenInvalidAssetID_whenPublishData_thenStatusCode404() throws JoseException, InterruptedException { // given From e9596cb99b04b1bf2e08dd487f6bac6659cf2859 Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 14 Mar 2024 13:53:14 +0100 Subject: [PATCH 43/44] feature(tx-backend): #536 fix scenarion number --- .../runtime-view/data-provisioning/publish-assets-error.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets-error.adoc b/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets-error.adoc index 4fdbb0af30..d59fd015fb 100644 --- a/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets-error.adoc +++ b/docs/src/docs/arc42/runtime-view/data-provisioning/publish-assets-error.adoc @@ -1,4 +1,4 @@ -= Scenario 2: Publish assets Error on EDC or DTR += Scenario 3: Publish assets Error on EDC or DTR This section describes user interaction when publishing assets fails due to EDC or DTR error ( for example services are unavailable ) From 36102f8d2c310e1a2f40c5bbeb0db90ed820db8b Mon Sep 17 00:00:00 2001 From: ds-ext-sceronik Date: Thu, 14 Mar 2024 14:31:08 +0100 Subject: [PATCH 44/44] feature(tx-backend): #536 remove edcNotification related services and reuse dtr ones since config for them is now the same --- .../service/AsyncPublishService.java | 3 +-- .../service/EdcAssetCreationService.java | 18 ++++++++-------- .../common/config/EdcConfiguration.java | 21 +++---------------- .../config/RestTemplateConfiguration.java | 12 ----------- .../EdcNotificationContractService.java | 6 +++--- 5 files changed, 16 insertions(+), 44 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java index 19a6849bcb..30e7605cfe 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/AsyncPublishService.java @@ -61,7 +61,7 @@ public void publishAssetsToCoreServices(List assets, boolean triggerS String submodelServerAssetId = null; try { - submodelServerAssetId = edcAssetCreationService.createDtrAndSubmodelAssets(policyId); + submodelServerAssetId = edcAssetCreationService.createEdcContractDefinitionsForDtrAndSubmodel(policyId); } catch (CreateEdcPolicyDefinitionException e) { log.error("Failed to create EDC Policy.", e); updateAssetStates(ImportState.ERROR, ImportNote.ERROR_EDC_POLICY_CREATION_FAILED, assetsForPolicy.stream().map(AssetBase::getId).toList()); @@ -73,7 +73,6 @@ public void publishAssetsToCoreServices(List assets, boolean triggerS updateAssetStates(ImportState.ERROR, ImportNote.ERROR_EDC_CONTRACT_CREATION_FAILED, assetsForPolicy.stream().map(AssetBase::getId).toList()); } - if (Objects.nonNull(submodelServerAssetId)) { String tempSubmodelServerAssetId = submodelServerAssetId; assetsForPolicy.forEach(assetBase -> { diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java index a383d386e6..be715d1a3c 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/domain/importpoc/service/EdcAssetCreationService.java @@ -53,19 +53,19 @@ @RequiredArgsConstructor public class EdcAssetCreationService { private static final String REGISTRY_ASSET_ID = "registry-asset"; - private final EdcAssetService edcDtrAssetService; - private final EdcPolicyDefinitionService edcDtrPolicyDefinitionService; - private final EdcContractDefinitionService edcDtrContractDefinitionService; + private final EdcAssetService edcAssetService; + private final EdcPolicyDefinitionService edcPolicyDefinitionService; + private final EdcContractDefinitionService edcContractDefinitionService; private final TraceabilityProperties traceabilityProperties; private final PolicyService policyService; @Value("${registry.urlWithPath}") String registryUrlWithPath = null; - public String createDtrAndSubmodelAssets(String policyId) throws CreateEdcPolicyDefinitionException, CreateEdcAssetException, CreateEdcContractDefinitionException { + public String createEdcContractDefinitionsForDtrAndSubmodel(String policyId) throws CreateEdcPolicyDefinitionException, CreateEdcAssetException, CreateEdcContractDefinitionException { PolicyResponse policy = policyService.getPolicyById(policyId); String createdPolicyId; try { - createdPolicyId = edcDtrPolicyDefinitionService.createAccessPolicy(mapToEdcPolicyRequest(policy)); + createdPolicyId = edcPolicyDefinitionService.createAccessPolicy(mapToEdcPolicyRequest(policy)); log.info("DTR Policy Id created :{}", createdPolicyId); } catch (EdcPolicyDefinitionAlreadyExists e) { createdPolicyId = policyId; @@ -75,7 +75,7 @@ public String createDtrAndSubmodelAssets(String policyId) throws CreateEdcPolicy String dtrAssetId; try { - dtrAssetId = edcDtrAssetService.createDtrAsset(registryUrlWithPath, REGISTRY_ASSET_ID); + dtrAssetId = edcAssetService.createDtrAsset(registryUrlWithPath, REGISTRY_ASSET_ID); log.info("DTR Asset Id created :{}", dtrAssetId); } catch (EdcAssetAlreadyExistsException e) { dtrAssetId = REGISTRY_ASSET_ID; @@ -84,7 +84,7 @@ public String createDtrAndSubmodelAssets(String policyId) throws CreateEdcPolicy } try { - String dtrContractId = edcDtrContractDefinitionService.createContractDefinition(dtrAssetId, createdPolicyId); + String dtrContractId = edcContractDefinitionService.createContractDefinition(dtrAssetId, createdPolicyId); log.info("DTR Contract Id created :{}", dtrContractId); } catch (Exception e) { throw new CreateEdcContractDefinitionException(e); @@ -93,7 +93,7 @@ public String createDtrAndSubmodelAssets(String policyId) throws CreateEdcPolicy String submodelAssetId; String submodelAssetIdToCreate = "urn:uuid:" + UUID.randomUUID(); try { - submodelAssetId = edcDtrAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase() + "/api/submodel", submodelAssetIdToCreate); + submodelAssetId = edcAssetService.createSubmodelAsset(traceabilityProperties.getSubmodelBase() + "/api/submodel", submodelAssetIdToCreate); log.info("Submodel Asset Id created :{}", submodelAssetId); } catch (EdcAssetAlreadyExistsException e) { submodelAssetId = submodelAssetIdToCreate; @@ -102,7 +102,7 @@ public String createDtrAndSubmodelAssets(String policyId) throws CreateEdcPolicy } try { - String submodelContractId = edcDtrContractDefinitionService.createContractDefinition(submodelAssetId, createdPolicyId); + String submodelContractId = edcContractDefinitionService.createContractDefinition(submodelAssetId, createdPolicyId); log.info("Submodel Contract Id created :{}", submodelContractId); } catch (Exception e) { throw new CreateEdcContractDefinitionException(e); diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcConfiguration.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcConfiguration.java index 4e747c1ff2..0b57d477a8 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcConfiguration.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/EdcConfiguration.java @@ -52,32 +52,17 @@ public class EdcConfiguration { String shellDescriptorUrl; @Bean - public EdcAssetService edcNotificationAssetService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcNotificationAssetRestTemplate) { - return new EdcAssetService(edcTransformer, edcConfiguration, edcNotificationAssetRestTemplate); - } - - @Bean - public EdcPolicyDefinitionService edcPolicyDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcNotificationAssetRestTemplate) { - return new EdcPolicyDefinitionService(edcConfiguration, edcNotificationAssetRestTemplate); - } - - @Bean - public EdcContractDefinitionService edcContractDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcNotificationAssetRestTemplate) { - return new EdcContractDefinitionService(edcConfiguration, edcNotificationAssetRestTemplate); - } - - @Bean - public EdcAssetService edcDtrAssetService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcDtrAssetRestTemplate) { + public EdcAssetService edcAssetService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, EdcTransformer edcTransformer, RestTemplate edcDtrAssetRestTemplate) { return new EdcAssetService(edcTransformer, edcConfiguration, edcDtrAssetRestTemplate); } @Bean - public EdcPolicyDefinitionService edcDtrPolicyDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { + public EdcPolicyDefinitionService edcPolicyDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { return new EdcPolicyDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); } @Bean - public EdcContractDefinitionService edcDtrContractDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { + public EdcContractDefinitionService edcContractDefinitionService(org.eclipse.tractusx.irs.edc.client.EdcConfiguration edcConfiguration, RestTemplate edcDtrAssetRestTemplate) { return new EdcContractDefinitionService(edcConfiguration, edcDtrAssetRestTemplate); } diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java index 0e0d46fa62..87df042bca 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/common/config/RestTemplateConfiguration.java @@ -72,18 +72,6 @@ public RestTemplate edcRestTemplate(@Autowired EdcProperties edcProperties) { .build(); } - @Bean - public RestTemplate edcNotificationAssetRestTemplate(@Autowired EdcProperties edcProperties) { - return new RestTemplateBuilder() - .rootUri(edcProperties.getProviderEdcUrl()) - .defaultHeader("Accept", MediaType.APPLICATION_JSON_VALUE) - .defaultHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE) - .defaultHeader(EDC_API_KEY_HEADER_NAME, edcProperties.getApiAuthKey()) - .setConnectTimeout(Duration.ofSeconds(10L)) - .setReadTimeout(Duration.ofSeconds(25L)) - .build(); - } - @Bean public RestTemplate edcDtrAssetRestTemplate(@Autowired EdcProperties edcProperties) { return new RestTemplateBuilder() diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/EdcNotificationContractService.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/EdcNotificationContractService.java index b9f17c9c4f..7453f1fdd7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/EdcNotificationContractService.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/qualitynotification/domain/contract/EdcNotificationContractService.java @@ -43,7 +43,7 @@ @AllArgsConstructor public class EdcNotificationContractService { - private final EdcAssetService edcNotificationAssetService; + private final EdcAssetService edcAssetService; private final EdcPolicyDefinitionService edcPolicyDefinitionService; private final EdcContractDefinitionService edcContractDefinitionService; private final TraceabilityProperties traceabilityProperties; @@ -60,7 +60,7 @@ public CreateNotificationContractResponse handle(CreateNotificationContractReque String notificationAssetId; try { - notificationAssetId = edcNotificationAssetService.createNotificationAsset( + notificationAssetId = edcAssetService.createNotificationAsset( createBaseUrl(request.notificationType(), request.notificationMethod()), request.notificationType().name() + " " + request.notificationMethod().name(), org.eclipse.tractusx.irs.edc.client.asset.model.NotificationMethod.valueOf(request.notificationMethod().name()), @@ -115,7 +115,7 @@ private void revertNotificationAsset(String notificationAssetId) { log.info("Removing {} notification asset", notificationAssetId); try { - edcNotificationAssetService.deleteAsset(notificationAssetId); + edcAssetService.deleteAsset(notificationAssetId); } catch (DeleteEdcAssetException e) { throw new CreateNotificationContractException(e); }