diff --git a/docs/Arc42-Documentation.md b/docs/Arc42-Documentation.md index 9d95d589..0fa0ab07 100644 --- a/docs/Arc42-Documentation.md +++ b/docs/Arc42-Documentation.md @@ -46,14 +46,14 @@ Compliance, Legal, Purchasing, Customer Service or other Company functional depa ### Benefit Hypothesis & Problem Statement -The benefit is to get to know your business partner or potential business partners better. Through more information better decisions can be made, like e.g. in a tender situation or from a marketing point of view. +The benefit is to get to know your business partner or potential business partners better. Through more information better decisions can be made, like e.g. in a tender situation or from a marketing point of view -- This Catena-X solution does not only integrate data from various sources but also matches this data with the existent business partners to enable a risk view towards your customer and supplier base. +- This Catena-X solution does not only integrate data from various sources but also matches this data with the existent business partners to enable a risk view towards your customer and supplier base - Reduced effort for target group - Reduction of costs (internal & external) -- Reduction of own interfaces to external data sources, since these are set up and administered by a service provider. +- Reduction of own interfaces to external data sources, since these are set up and administered by a service provider - Company individual country risk assessments (Lists) can be integrated -- A dashboard will keep you up to date at any time. +- A dashboard will keep you up to date at any time ## Requirements Overview ## Quality Goals @@ -217,10 +217,10 @@ There are many factors to consider, but those factors can largely be categorized ##### The globally available Scores in the Application are currently: -CPI Rating 2021 -CPI Rating 2020 -All underlying CPI Scores 2021 -Basel Score 2021 +CPI Rating 2021; +CPI Rating 2020; +All underlying CPI Scores 2021; +Basel Score 2021; Basel Score 2020 They are currently calculated like this: @@ -235,7 +235,7 @@ Self Created Rating 0 - 100 ascending (0 - negative; 100 - positive) Coface -.0.1.2..4.5.6.7.8 *10 / (0 - negative; 100 - positive) -Oecd tbd +Oecd tbd (open?) ##### Possible Data Sources for Country Risk Assessments @@ -295,22 +295,27 @@ sequenceDiagram ### Handling Country Risk -The handling of country risk within our system is managed by the Country Risk Application. +The handling of country risk within our system is managed by the Country Risk Application. -It involves assessing and consuming data from the Country Risk EDC Consumer, which obtains necessary data from the EDC Gate Provider. +It involves assessing and consuming data from the Country Risk EDC Consumer, which obtains necessary data from the EDC Gate Provider. This process ensures that the data related to country risk is accurate and up-to-date. The Country Risk Application doesn't filter the data; instead, it relies on the Gate service to validate user permissions and deliver the correct set of data based on the user's role and access rights. -### Data EDC Handling +### Data EDC Handling -The security of data and ensuring that companies only access the data they are permitted to see is achieved through a robust authentication and authorization flow provided by Keycloak. +The security of data and ensuring that companies only access the data they are permitted to see is achieved through a robust authentication and authorization flow provided by Keycloak. -When a company requests data, the Gate service validates the OAuth2 token provided in the request. +When a company requests data, the Gate service validates the OAuth2 token provided in the request. -This token contains the roles and permissions associated with the client user. By checking the "resource_access" section of the OAuth2 token, the Gate service ensures that a company can only access data for which it has the correct credentials. +This token contains the roles and permissions associated with the client user. By checking the "resource_access" section of the OAuth2 token, the Gate service ensures that a company can only access data for which it has the correct credentials. Additionally, the EDC Discovery Service can be employed to manage service endpoints and their associated access policies, enhancing the control over which data each company can discover and access. +### Catalog Page Data Handling + +For the `Catalog Page` component, it is necessary to obtain negotiation data directly from the EDC (Enterprise Data Catalog). This ensures that the data related to negotiations is consistent and up-to-date across all platforms. Only users with administrator access can initiate the negotiations, ensuring that the data becomes visible throughout the entire dashboard. Users with less privileged roles can also view the negotiation data, but only after an authorized user has activated the negotiations. This ensures that all users have access to the relevant data while maintaining strict control over who can initiate and manage the negotiation process. + + ## Business Context @@ -410,7 +415,7 @@ For each of these APIs we can consult its input and output in the APIs section. For this component, it is necessary to call just one API that gets the Ratings available for the user. -Some Ratings may be available globally by user or by the company they belong to but for more details we will address in the functionalities section. +Some Ratings may be available globally by user or by the company they belong to, but for more details we will address in the functionalities section. ```mermaid classDiagram @@ -527,6 +532,33 @@ classDiagram ``` +#### Data Offers Catalog View + +![userinfo](../docs/Images/userInfo.png) + +![CatalogView](../docs/Images/catalog-page.png) + +For the NegotiationController component, it is necessary to call two different APIs. The APIs used are triggerNegotiation and queryCatalog. With the data obtained from these APIs, the component can initiate negotiations with selected items and retrieve catalog items available for negotiation. The data from the catalog items is used to display negotiation options, while the negotiation response data is used to update the status and other relevant information about ongoing negotiations. Additionally, only users with administrator access can see and use this page, as shown in the image where the "Negotiation" option appears exclusively for users with permission. +```mermaid +classDiagram + class NegotiationController { + <> + } + class TriggerNegotiation { + <> + +API() + } + class QueryCatalog { + <> + +API() + } + + NegotiationController --|> TriggerNegotiation : API + NegotiationController --|> QueryCatalog : API + +``` + + # Interfaces Please Check Swagger Documentation @@ -539,7 +571,7 @@ https://${hostname}:${port}/swagger-ui/index.html#/ ![apiUpload](../docs/Images/reportUpdate.png) -This endpoint is used to update the report. An example in the dashboard is when a user updates a report such as changing the selected rating ranges to change the rating colour ranges, the user can press the save reports button and the new settings will be updated. +This endpoint is used to update the report. An example in the dashboard is, when a user updates a report such as changing the selected rating ranges to change the rating colour ranges, the user can press the save reports button and the new settings will be updated. ![updateReport](../docs/Images/updateReport.png) @@ -558,7 +590,7 @@ Example: ![shareReport](../docs/Images/shareReport.png) -This endpoint is used to share the ratings report. +This endpoint is used to share the ratings report. When a user has already saved their report and would like to share it, the user can share the report with other users from their company who have the required permissions to the Country Risk Dashboard. ![shareReportIcon](../docs/Images/shareReportIcon.png) @@ -574,7 +606,7 @@ In this endpoint, it is automatically inserted the information from the user tha ![saveReports](../docs/Images/image2022-12-5_12-40-53.png) -This endpoint is used to save an reports. It is used in the report component to save multiple selected data (Selected Ratings, Country, Range Values) and be able to use it in a later time. This endpoint receives as input field the Report name, the Type (Global, Company or Custom) of which the report should be saved for. Also it receives the current user information and an object that gathers all the selected data (Selected Ratings, Country, Range Values). Example: +This endpoint is used to save any reports. It is used in the report component to save multiple selected data (Selected Ratings, Country, Range Values) and be able to use it in a later time. This endpoint receives as input field the Report name, the Type (Global, Company or Custom) of which the report should be saved for. Also it receives the current user information and an object that gathers all the selected data (Selected Ratings, Country, Range Values). Example: ![Report](../docs/Images/Reports.png) @@ -592,15 +624,15 @@ This endpoint retrieves a score based on selected ratings, year and current user ![UserRanges](../docs/Images/image2022-10-10_13-34-17.png) -This endpoint is used for retrieving an the current user ranges. The values retrieved are the three types of ranges (Minimum, middle and Maximum), each associated to a type of value. This values are used to populate the ranges component with the last saved ranges that the user inputted. +This endpoint is used for retrieving the current user ranges. The values retrieved are the three types of ranges (Minimum, middle and Maximum), each associated to a type of value. This values are used to populate the ranges component with the last saved ranges that the user inputted. ![RangesExample](../docs/Images/ranges_example.png) ![template](../docs/Images/getUsersFromCompany.png) -This endpoint allows the retrieval of users from the user's company. -The company is automatically extracted from the authentication token, thus avoiding filters. +This endpoint allows the retrieval of users from the user's company. +The company is automatically extracted from the authentication token, thus avoiding filters. It is used when a report is to be shared for example. ![companyUsersResponse.png](../docs/Images/companyUsersResponse.png) @@ -608,7 +640,7 @@ It is used when a report is to be shared for example. ![template](../docs/Images/image2022-10-10_13-36-1.png) -This endpoint is used for retrieving an CSV file that the user can edit and use it for uploading data. +This endpoint is used for retrieving an CSV file, that the user can edit and use it for uploading data. ![Tableinfo](../docs/Images/image2022-10-10_13-43-5.png) @@ -625,7 +657,7 @@ This endpoint is used to retrieve reports. This endpoint receives as input field ![companyuserinfo](../docs/Images/image2022-12-5_13-31-59.png) -This endpoint is used to retrieve reports. It is used in the report component to to populate the table. This endpoint only receives as input field the current user information. +This endpoint is used to retrieve reports. It is used in the report component to populate the table. This endpoint only receives as input field the current user information. ![exampleuserinfo](../docs/Images/image2022-12-5_13-31-59.png) This endpoint is used to retrieve all the Reports that a user can choose from. @@ -650,7 +682,7 @@ This endpoint retrieves all the countries that are associated to the Business pa ![getBpdmGates](../docs/Images/image2022-12-5_13-32-54.png) -This endpoint returns information from the BPDM Gate to show the User specific Business Partners +This endpoint returns information from the BPDM Gate to show the User specific Business Partners. ![getyears](../docs/Images/image2022-10-10_13-44-13.png) @@ -659,25 +691,23 @@ This endpoint retrieves all the years that are currently saved on the database. ![deleteReport](../docs/Images/image2022-12-30_11-37-34.png) -This endpoint is used to delete an report created by the user. It is used in the report table in the Front-End application. It needs the id related to the report selected and also the user information to proceed with the delete request. +This endpoint is used to delete a report created by the user. It is used in the report table in the Front-End application. It needs the id related to the report selected and also the user information to proceed with the delete request. ![deleteRating](../docs/Images/image2022-12-30_11-50-52.png) -This endpoint is used to delete an rating created by the user. It is used in the report table in the Front-End application. It needs the id related to the rating selected and also the user information to proceed with the delete request. +This endpoint is used to delete a rating created by the user. It is used in the report table in the Front-End application. It needs the id related to the rating selected and also the user information to proceed with the delete request. ## Sharing Controller ![scoreforEachBpn](../docs/Images/scoreforEachBpn.png) -In this endpoint the User can request a Mapping of Business Partners to a specific Rating. As parameters it is needed an Rating and BPNs array and also the company of he user. +In this endpoint the User can request a Mapping of Business Partners to a specific Rating. As parameters it is needed an Rating and BPNs array and also the company of the user. ![examplequery](../docs/Images/image2022-12-5_14-14-19.png) In this picture, we can see how both the Ratings and BPNs are composed. The Ratings array can contain multiple objects that have the dataSourceName and the - following year. Regarding the BPNs array, it can also contain multiple objects, and each of them have the BPN name and a country of which can be given a value - or no value. If the BPN has no country value, the backend will map it according to the BPN. ![exampleForEachBpn](../docs/Images/exampleForEachBpn.png) @@ -690,6 +720,37 @@ In this endpoint it is possible for the user to request Information about which ![exampleratingsforcompany](../docs/Images/image2022-12-5_14-8-29.png) +## Negotiation Controller +![negotiation_query_catalog](../docs/Images/negotiation_controller_query_catalog.png) + +This endpoint is intended to negotiate and receive the available catalog with the data offers that the EDC allows to negotiate. They will then be forwarded and appear on the frontend. + +``` +{ + "id": "1", + "offerId": "offer123", + "provider": "Provider A", + "subject": "cx-taxo:ReadAccessPoolForCatenaXMember", + "description": "Grants the Catena-X Member read access to the Pool API...", + "usagePurpose": "cx.bpdm.pool:1" +} +``` + +![negotiation_query_trigger](../docs/Images/negotiation_controller_trigger.png) + +This endpoint should receive based on the data offers selected in the previous endpoint and initiate negotiation with EDC so that all information becomes available. + +``` +[ + { + "id": "1", + "offerId": "offer123", + "usagePurpose": "cx.bpdm.pool:1" + } +] +``` + + ## How to configure the Gate Connection ### Setting up Company Cluster @@ -698,19 +759,19 @@ The first step to connect the Dashboard to a company specific "Gate" is setting ![addcompanygroup](../docs/Configuration-of-Gates/configofgates03.png) -we create a company group for the Case that a sharing Company has multiple "Gates" to which can be connected. +We create a company group for the Case, that a sharing Company has multiple "Gates" to which can be connected. ### Setting up Company -To be able to connect to a company specific Gate first the Company has to be inserted into the t_company table and connected to a company group: +To be able to connect to a company specific Gate, first the Company has to be inserted into the t_company table and connected to a company group: ![addcompany](../docs/Configuration-of-Gates/configofgates02.png) -- company_name: Insert the Name of the requesting Company +- company_name: Insert the Name of the requesting company - company_group_id: Set a numeric value counting up from the beginning 1 per company -After the company has been added to the Table the next step is to set a "Gate" for this company. +After the company has been added to the Table, the next step is to set a "Gate" for this company. ### Setting up CompanyGate connection @@ -837,21 +898,23 @@ Entities: 2. DataSource and DataSourceValue: Dynamic tables that allow saving the source such as CPI Rating and its values ​​for each country such as GERMANY , DE , 86. 3. Range: Table that keeps the ranges submitted by each user, so that each visit to the page can visualize the data with the ranges that he customized. There are 3 ranges green, yellow and red which are identified by max, between and min. 4. File: Table that stores the template that the user can obtain and then stores any uploads that the user makes regarding their rating. -5. Country: Table that saves all the countries. This table is important to distinguish any bad input that the user can put, because only the countries placed here can be validated with rating. -6. Region: Table that stores each region defined by the user, this can be customized or globalized as is the case of having the countries of the European Union within the EU Region. -7. Report and ReportValue: Dynamic Table that, like the DataSource, allows each Report to have multiple objects added to it, in this case we can define the selected country, the ranges, the ratings and if new features are implemented, they can be added to new reports without the need to change. -8. Type: Enums table that allows you to filter the 3 tables ( DataSource , Region and Reports) that may or may not have globally available data, only for the elements of the Company or for the User who uploaded them. +5. Country: Table that saves all the countries. This table is important to distinguish any bad input that the user can put, because only the countries placed here can be validated with ratings. +6. Region: Table that stores each region defined by the user. This can be customized or globalized as is the case of having the countries of the European Union within the EU Region. +7. Report and ReportValue: Dynamic Table that, like the DataSource, allows each Report to have multiple objects added to it. In this case we can define the selected country, the ranges, the ratings and if new features are implemented, they can be added to new reports without the need to change. +8. Type: Enums table that allows you to filter the 3 tables (DataSource , Region and Reports) that may or may not have globally available data, only for the elements of the Company or for the User who uploaded them. # Development Process We have two repositories in the TractusX Github Environment with the Eclipse Foundation. + Frontend: https://github.com/eclipse-tractusx/vas-country-risk-frontend + Backend: https://github.com/eclipse-tractusx/vas-country-risk-backend To maintain those 2 Github locations we mainly develop in the CatenaX-ng Github. Only for main Changes we push a request to a commiter with the Eclipse Foundation Github. -To contribute to the development please follow these Branching guidelines in the CatenaX-ng environment. +To contribute to the development, please follow these Branching guidelines in the CatenaX-ng environment. ```mermaid flowchart LR @@ -969,7 +1032,7 @@ sequenceDiagram This Get Dashboard World endpoint is the entry point for populating the World Map. It receives parameters that allow knowing which data to filter. -These are: The user, the year and the Ratings chosen. +These are: The user, the year and the ratings chosen. The first important method Get World Map Info is divided into three steps. @@ -1050,7 +1113,7 @@ This endpoint, as mentioned above, receives the selected year and returns the av Here we have an important step that calls two methods. -On findRatingsByYearAndCompanyUser we need to call two methods, findRatingsByYearAndTypeGlobal which returns all global ratings that are for all users based on year and findRatingByYearAndUser all ratings that this user has available to him filtered by year here can be uniquely loaded by you in the api of Upload. +On findRatingsByYearAndCompanyUser we need to call two methods, findRatingsByYearAndTypeGlobal which returns all global ratings that are for all users based on year and findRatingByYearAndUser all ratings that this user has available to him filtered by year here can be uniquely loaded by you in the API of Upload. #### Endpoint: /dashboard/getTemplate @@ -1064,7 +1127,7 @@ sequenceDiagram DashBoardResource-->>-ActorUser: Return Template ``` -This method just implements the download of a template so that users can fill and upload their own ratings. +This method just implements the download of a template, so that users can fill and upload their own ratings. #### Endpoint: /dashboard/uploadCsv @@ -1137,7 +1200,7 @@ sequenceDiagram This endpoint is simple, it only validates if the user already has saved ranges or uses default values, these ranges are used to define the range of each color in the UI, which then defines how each country will be painted based on its score. -Get User Ranges Or Default is the method that validates if they exist if not, by default, it returns their default values. +Get User Ranges Or Default is the method that validates if they exist. If not, by default, it returns their default values. Min → 0-25 that represents red color @@ -1209,9 +1272,9 @@ sequenceDiagram This endpoint retrieves all the Business partners associated to a company. In the DashboardResource we invoke the getExternalBusinessPartners method, in which we send through an CompanyUser (1.1). -Inside the DashboardService class we return the result from the method getExternalBusinessPartners (1.1.1) returns Business Partners associated to a Company User. +Inside the DashboardService class, we return the result from the method getExternalBusinessPartners (1.1.1) returns Business Partners associated to a Company User. -In the end, after the data is retrieved, this data is returned as a List of BussinessPartners objects to the main class DashBoardResource in the method getCompanyBpns. +In the end, after the data is retrieved, this data is returned as a List of BusinessPartners objects to the main class DashBoardResource in the method getCompanyBpns. #### Endpoint: /dashboard/getBpnCountrys @@ -1247,7 +1310,7 @@ sequenceDiagram ``` -This endpoint retrieves all the countries that are associated to the Business partners. In the DashboardResource we invoke the getCountryByAssociatedBPtoUser (1.1) method, in which we send through an CompanyUser. +This endpoint retrieves all the countries that are associated to the Business partners. In the DashboardResource, we invoke the getCountryByAssociatedBPtoUser (1.1) method, in which we send through an CompanyUser. In the DashboardService class, we invoke the method getAssociatedCountries (1.1.1), in which there are two methods: getExternalPartnersCountry (1.1.1.1) and the findByCountryIn (1.1.1.2). @@ -1396,9 +1459,9 @@ The method 1.1.1 getOrCreate will receive the parameter CompanyUser, and will do After that, on the 1.1.2 saveReport, both the companyUserDTO recently created or already present on the database and the ReportDTO will be used as variable on that method. -Firstly an verification is done to check if the ReportDTO has an id associated to him. This will only be he case in the Update endpoint, so this verification will not be true. After this, it is associated to the ReportDTO the companyUserDTO company name and name, and after this the ReportDTO is saved (1.1.2.1.6.1). +Firstly a verification is done to check if the ReportDTO has an id associated to him. This will only be the case in the Update endpoint, so this verification will not be true. After this, it is associated to the ReportDTO the companyUserDTO company name and name, and after this the ReportDTO is saved (1.1.2.1.6.1). -After this an verification is done onto the recently saved ReportDTO, to check if the ReportValuesDTO inside of this object is not empty or null. If this is false, an for each clause will occur and save each reportValues associated to the recently created Report. +After this verification is done onto the recently saved ReportDTO, to check if the ReportValuesDTO inside of this object is not empty or null. If this is false, an for each clause will occur and save each reportValues associated to the recently created Report. After this an Http OK alert is shown. @@ -1455,9 +1518,9 @@ The method 1.1.1 findByNameEmailAndCompany will receive the name, email and comp After that, on the 1.1.2 saveReport, both the companyUserDTO recently created or already present on the database and the ReportDTO will be used as variable on that method. -Firstly an verification is done to check if the ReportDTO has an id associated to him. This will only be he case in the Update endpoint, so this verification will not be true. After this, it is associated to the ReportDTO the companyUserDTO company name and name, and after this the ReportDTO is saved (1.1.2.1.6.1). +Firstly a verification is done to check if the ReportDTO has an id associated to him. This will only be he case in the Update endpoint, so this verification will not be true. After this, it is associated to the ReportDTO the companyUserDTO company name and name, and after this the ReportDTO is saved (1.1.2.1.6.1). -After this an verification is done onto the recently saved ReportDTO, to check if the ReportValuesDTO inside of this object is not empty or null. If this is false, an for each clause will occur and save each reportValues associated to the recently created Report. +After this verification is done onto the recently saved ReportDTO, to check if the ReportValuesDTO inside of this object is not empty or null. If this is false, an for each clause will occur and save each reportValues associated to the recently created Report. After this an Http OK alert is shown. @@ -1520,7 +1583,7 @@ The method 1.1.1 getOrCreate will receive the parameter CompanyUser, and will do After that, on the 1.1.2 saveReport, both the companyUserDTO recently created or already present on the database and the ReportDTO will be used as variable on that method. -Firstly an verification is done to check if the ReportDTO has an id associated to him. This will only be he case in the Update endpoint, so this verification will true in this case. After this, the updateReport method (1.1.2.1) will be opened and in there the method 1.1.2.1.1 findOne will try to find an ReportDTO with respective id. If it is not found, an http not found error will show up. +Firstly a verification is done to check if the ReportDTO has an id associated to him. This will only be he case in the Update endpoint, so this verification will true in this case. After this, the updateReport method (1.1.2.1) will be opened and in there the method 1.1.2.1.1 findOne will try to find an ReportDTO with respective id. If it is not found, an http not found error will show up. Else if this does not occur, an validation is done with the method 1.1.2.1.3 validatePermissionToChangeReport, which will do an cross check between the CompanyUser and the found ReportDTO. If this check is false, an http unauthorized error is shown, else the code continues. @@ -1613,106 +1676,6 @@ The method 1.1.1 getGatesForCompanyUser, it firstly done the method getCompanyBy After this, an List of CompanyGatesDTOS is returned in the main class (DashBoardResouce). -#### Endpoint: /sharing/getAllRatingsForCompany - -```mermaid -sequenceDiagram - participant ActorUser - participant DashBoardResource - participant DashboardService - participant DataSourceLogicService - participant DataSourceService - participant DataSourceRepository - participant EntityMapper - - ActorUser->>+DashBoardResource: 1: getAllRatingsForCompany(CompanyUser, Year) - DashBoardResource->>+DashboardService: 1.1: findRatingsByYearAndCompanyUserCompany(CompanyUser, Year) - DashboardService->>+DataSourceLogicService: 1.1.1: findRatingsByYearAndTypeGlobal(Year) - DataSourceLogicService->>+DataSourceService: 1.1.1.1: findRatingsByYearPublishedAndType(Year, 'Global') - DataSourceService->>+DataSourceRepository: 1.1.1.1.1: findByYearPublishedAndType(Year, 'Global') - DataSourceRepository-->>-DataSourceService: List - DataSourceService->>+EntityMapper: 1.1.1.1.2: toDto(List) - EntityMapper-->>-DataSourceService: List - DataSourceService-->>-DataSourceLogicService: List - DataSourceLogicService->>+DataSourceService: 1.1.1.2: findByYearPublishedAndCompanyUserCompanyNameAndType(Year, CompanyUser.companyName, 'Company') - DataSourceService->>+DataSourceRepository: 1.1.1.2.1: findByYearPublishedAndCompanyUserCompanyNameAndType(Year, CompanyUser.companyName, 'Company') - DataSourceRepository-->>-DataSourceService: List - DataSourceService->>+EntityMapper: 1.1.1.2.2: toDto(List) - EntityMapper-->>-DataSourceService: List - DataSourceService-->>-DataSourceLogicService: List - DataSourceLogicService-->>-DashboardService: Combined List - DashboardService-->>-DashBoardResource: Combined List - DashBoardResource-->>-ActorUser: Display DataSources - -``` - -In this endpoint, it is received as a parameter the CompanyUser and a Integer Year. It is used to return an list of DataSourceDTO related to the CompanyUser and inserted year. - -The method 1.1.1.1 findRatingsByYearAndTypeGlobal will return a list of DataSourceDTO based on the selected year, and only return these DTOs with Type Global. - -After that, the method 1.1.1.2 findByYearPublishedAndCompanyUserCompanyNameAndType will return also an List of DatasoureDTO based on the year, companyUser and the Type Company. - -After this, both lists are join onto one and returned in the main class as an List of DataSourceDTO. - - -#### Endpoint: /sharing/getAllRatingsScoresForEachBpn - -```mermaid -sequenceDiagram - participant ActorUser - participant DashBoardResource - participant DashboardService - participant ShareLogicService - participant ExternalBusinessPartnersLogicService - participant DataSourceValueService - participant DataSourceValueRepository - participant ShareDTO - participant ShareRatingDTO - - ActorUser->>+DashBoardResource: 1: getAllRatingsScoresForEachBpn(CompanyUser, dataSource, businessPartner) - DashBoardResource->>+DashboardService: 1.1: findRatingsScoresForEachBpn(CompanyUser, dataSource, businessPartner) - DashboardService->>+ShareLogicService: 1.1.1: findRatingsScoresForEachBpn - ShareLogicService->>+ExternalBusinessPartnersLogicService: 1.1.1.1: getExternalBusinessPartners - ExternalBusinessPartnersLogicService-->>-ShareLogicService: List - - loop For each BusinessPartner - ShareLogicService->>ShareLogicService: Add country to BusinessPartnerDTO - end - - ShareLogicService->>ShareLogicService: 1.1.1.3: Create List of Countries from BusinessPartnerDTO - ShareLogicService->>ShareLogicService: 1.1.1.4: Create List of Data Source Names from DataSourceDTO - - loop For each DataSource - ShareLogicService->>+DataSourceValueService: 1.1.1.3.1: findRatingAndCountryAndScoreGreaterThanAndYear - DataSourceValueService->>+DataSourceValueRepository: 1.1.1.3.1.1: findByRatingAndCountryAndScoreGreaterThanAndYear - DataSourceValueRepository-->>-DataSourceValueService: List - DataSourceValueService-->>-ShareLogicService: List - end - - loop For each ShareDTO - ShareLogicService->>ShareLogicService: 1.1.1.5: Map DataDTO to ShareDTO - end - - ShareLogicService-->>-DashboardService: List - DashboardService-->>-DashBoardResource: List - DashBoardResource-->>-ActorUser: Display ShareDTOs - -``` - -In this endpoint, it is received as a parameter the CompanyUser an dataSource object and a businessPartner object. It is used to return an list of ShareDTO(Mapped ratings to the business partners) related to the parameters inserted. - -Inside the method 1.1.1 findRatingsScoresForEachBpn, the method 1.1.1.1 will add BusinessPartnerDTO into List of BusinessPartnerDTO. - -After this, an for each clause is done into the received list of businessPartner and other clause into the recently created list. This will set the country into the list of the businessPartners received into the parameter. - -After this, an List of String is created that will store all countries related to the BusinessPartnerDTO (1.1.1.3) and is populated according to the BusinessPartnetDTO countries. - -Then, an List of String that will get the name of the Data Sources will also be populated according the DataSourceDTO. - -With this, the DataSource parameter will be iterated with the for each clause, and an List of DataDTO will be filled according with the method 1.1.1.3.1.1, using as parameter both DataSource names and countries String list. - -Finally, the mapping will be done for each ShareDTO, that then will return inside of an List. - #### Endpoint: /dashboard/deleteReport/{id} @@ -1773,11 +1736,11 @@ Firstly in the method 1.1.1.1 it is used the report id to request the Report ass If that is not the case, an verification is done using the 1.1.1.3 validatePermissionToChangeReport method, which is where an verification is done to see if the found report values (CompanyName, Name) are the same as the CompanyUser, and also if the CompanyUser is an Admin, which only the Admin can delete an report in this case. -If the CompanyUser in not an Admin, and Http Unauthorized is presented. +If the CompanyUser in not an Admin, an Http Unauthorized is presented. If all verifications are met, then the 1.1.1.4 method findByReport will return an list of ReportValuesDTO related to the reportDTO found earlier, which then that list is iterated in an for each clause whit the 1.1.1.5.1 delete method, that received in each run the reportValuesDTO id and then in the 1.1.1.6 fully delte the ReportDTO using its id. -After this, in the main class DashBoardResource, and Http no content is presented as an successful request. +After this, in the main class DashBoardResource, an Http no content is presented as an successful request. #### Endpoint: /dashboard/deleteRating/{id} @@ -1837,15 +1800,15 @@ sequenceDiagram This endpoint receives and CompanyUser and also an Long variable which is the id. It is used to delete an Rating. -Firstly in the method 1.1.1.1 it is used the rating id to request the Rating associated to that id. If this is not found, and Http Not Found error is presented. +Firstly in the method 1.1.1.1 it is used the rating id to request the Rating associated to that id. If this is not found, an Http Not Found error is presented. If that is not the case, an verification is done to see if the found rating values (CompanyName, Name, Email) are the same as the CompanyUser, and also if the CompanyUser is an Admin, which only the Admin can delete an rating in this case. -If the CompanyUser in not an Admin, and Http Unauthorized is presented. +If the CompanyUser in not an Admin, an Http Unauthorized is presented. If all verifications are met, then the 1.1.1.3 method findByDataSource will return an list of DataSourceValuesDTO related to the dataSourceDTO found earlier, which then that list is iterated in an for each clause whit the 1.1.1.4.1 delete method, that received in each run the DataSourceValueDTO id, and then in the 1.1.1.5 fully delte the DataSourceDTO using its id. -After this, in the main class DashBoardResource, and Http no content is presented as an successful request. +After this, in the main class DashBoardResource, an Http no content is presented as an successful request. #### Endpoint: /dashboard/getUserFromCompany @@ -1879,6 +1842,213 @@ This endpoint receives as an parameter an CompanyUser. It is used to retrieve an In the method 1.1.1.1 findAllUserFromCompany, it simply uses the CompanyUser object, gets his company name and does a request to retrieve an List of CompanyUserDTO, which is then returned in the main class DashBoardResouce. +#### Endpoint: /negotiation/triggerNegotiation + +```merdmaid + +sequenceDiagram + participant ActorUser + participant NegotiationController + participant NegotiationServiceLogic + participant EdcLogicService + participant InvokeService + participant EDCGateway + participant Cache + + ActorUser->>+NegotiationController: 1: triggerNegotiation(List) + NegotiationController->>+NegotiationServiceLogic: 1.1: triggerNegotiation(List) + NegotiationServiceLogic->>+EdcLogicService: 1.1.1: executeSequentialNegotiationRequests(NegotiationRequestDTO) + EdcLogicService->>+InvokeService: 1.1.1.1: sendNegotiationInitiateRequest(NegotiationRequestDTO) + InvokeService->>+EDCGateway: 1.1.1.1.1: POST /v2/edrs + EDCGateway-->>-InvokeService: 1.1.1.1.2: negotiationId + InvokeService-->>-EdcLogicService: 1.1.1.1.3: negotiationId + EdcLogicService->>+InvokeService: 1.1.1.2: executeGetRequestForNegotiationDetails(String negotiationId) + InvokeService->>+EDCGateway: 1.1.1.2.1: GET /v2/contractnegotiations/{negotiationId} + EDCGateway-->>-InvokeService: 1.1.1.2.2: contractAgreementId + InvokeService-->>-EdcLogicService: 1.1.1.2.3: contractAgreementId + EdcLogicService->>+InvokeService: 1.1.1.3: executeTransferProcessRequestWithAgreementId(String contractAgreementId) + InvokeService->>+EDCGateway: 1.1.1.3.1: POST /v2/edrs/request + EDCGateway-->>-InvokeService: 1.1.1.3.2: transferProcessId + InvokeService-->>-EdcLogicService: 1.1.1.3.3: transferProcessId + EdcLogicService->>+InvokeService: 1.1.1.4: getAuthCodeAndEndpoint(String transferProcessId) + InvokeService->>+EDCGateway: 1.1.1.4.1: GET /v2/edrs/{transferProcessId}/dataaddress?auto_refresh=true + EDCGateway-->>-InvokeService: 1.1.1.4.2: EDRResponseDTO + InvokeService-->>-EdcLogicService: 1.1.1.4.3: EDRResponseDTO + EdcLogicService-->>-NegotiationServiceLogic: 1.1.1.5: NegotiationResponseDTO + NegotiationServiceLogic->>+Cache: 1.1.2: cache the negotiation result + Cache-->>-NegotiationServiceLogic: 1.1.3: cached result + NegotiationServiceLogic-->>-NegotiationController: 1.2: List + NegotiationController-->>-ActorUser: 1.3: List + +``` + +In this endpoint, a list of `NegotiationRequestDTO` objects is received as a parameter. This is used to initiate the negotiation process for the selected items and return a list of `NegotiationResponseDTO` objects. + +The `triggerNegotiation` method involves the following steps: + +1. The `NegotiationController` receives the request from the user. +2. The request is forwarded to the `NegotiationServiceLogic` service. +3. For each `NegotiationRequestDTO`, the `EdcLogicService` initiates a sequence of negotiation requests: + - Sends a POST request to the EDC Gateway to initiate the negotiation. + - Retrieves the negotiation details using a GET request. + - Sends a POST request with the agreement ID to request a transfer process. + - Retrieves the authentication code and endpoint using a GET request. +4. The results of these negotiation steps are combined into a `NegotiationResponseDTO`. +5. The results are cached for future requests. +6. The combined list of `NegotiationResponseDTO` objects is returned to the `NegotiationController`. +7. The `NegotiationController` sends the response back to the user. + +Only users with the necessary permissions can trigger the negotiations. Once the negotiations are activated, the data becomes visible to all users with lower privilege levels on the dashboard. + + +#### Endpoint: /negotiation/queryCatalog + +```mermaid +sequenceDiagram + participant User + participant NegotiationController + participant EdcLogicService + participant EdcGateway + + User->>+NegotiationController: 1: queryCatalog() + NegotiationController->>+EdcLogicService: 1.1: queryCatalog() + + EdcLogicService->>+EdcGateway: 1.1.1: sendCatalogRequest(httpEntity) + EdcGateway-->>-EdcLogicService: 1.1.2: catalogResponse + + EdcLogicService->>EdcLogicService: 1.1.3: mapResponseFromQueryCatalog(catalogResponse) + EdcLogicService-->>-NegotiationController: 1.2: List + + NegotiationController-->>-User: Display catalog items + +``` +#### Endpoint: /negotiation/queryCatalog + +In this endpoint, the `queryCatalog` method is called to retrieve catalog items available for negotiation. The method returns a list of `CatalogItemDTO` objects. + +The `queryCatalog` method involves the following steps: + +1. The `NegotiationController` receives the request from the user and calls the `queryCatalog` method in the `EdcLogicService`. +2. The `EdcLogicService` constructs the request body and headers, then sends a POST request to the EDC Gateway. +3. The EDC Gateway processes the request and returns the catalog response. +4. The `EdcLogicService` maps the response to a list of `CatalogItemDTO` objects. +5. The `NegotiationController` sends the list of `CatalogItemDTO` objects back to the user. + +The request and response flow is detailed below: + +- **Request Headers**: HTTP headers are created and included in the request. +- **Request Body**: The request body is constructed with the necessary context, type, counter party address, counter party ID, protocol, and query specifications. +- **POST Request**: A POST request is sent to the EDC Gateway to request the catalog. +- **Response Mapping**: The response from the EDC Gateway is mapped to a list of `CatalogItemDTO` objects using the `mapResponseFromQueryCatalog` method. + +The `queryCatalog` endpoint handles the following scenarios: + +- **200 OK**: Successfully retrieved catalog items. +- **401 Unauthorized**: Authentication is required. +- **500 Internal Server Error**: An internal server error occurred. + + +#### Endpoint: /sharing/getAllRatingsForCompany + +```mermaid +sequenceDiagram + participant ActorUser + participant DashBoardResource + participant DashboardService + participant DataSourceLogicService + participant DataSourceService + participant DataSourceRepository + participant EntityMapper + + ActorUser->>+DashBoardResource: 1: getAllRatingsForCompany(CompanyUser, Year) + DashBoardResource->>+DashboardService: 1.1: findRatingsByYearAndCompanyUserCompany(CompanyUser, Year) + DashboardService->>+DataSourceLogicService: 1.1.1: findRatingsByYearAndTypeGlobal(Year) + DataSourceLogicService->>+DataSourceService: 1.1.1.1: findRatingsByYearPublishedAndType(Year, 'Global') + DataSourceService->>+DataSourceRepository: 1.1.1.1.1: findByYearPublishedAndType(Year, 'Global') + DataSourceRepository-->>-DataSourceService: List + DataSourceService->>+EntityMapper: 1.1.1.1.2: toDto(List) + EntityMapper-->>-DataSourceService: List + DataSourceService-->>-DataSourceLogicService: List + DataSourceLogicService->>+DataSourceService: 1.1.1.2: findByYearPublishedAndCompanyUserCompanyNameAndType(Year, CompanyUser.companyName, 'Company') + DataSourceService->>+DataSourceRepository: 1.1.1.2.1: findByYearPublishedAndCompanyUserCompanyNameAndType(Year, CompanyUser.companyName, 'Company') + DataSourceRepository-->>-DataSourceService: List + DataSourceService->>+EntityMapper: 1.1.1.2.2: toDto(List) + EntityMapper-->>-DataSourceService: List + DataSourceService-->>-DataSourceLogicService: List + DataSourceLogicService-->>-DashboardService: Combined List + DashboardService-->>-DashBoardResource: Combined List + DashBoardResource-->>-ActorUser: Display DataSources + +``` + +In this endpoint, it is received as a parameter the CompanyUser and a Integer Year. It is used to return an list of DataSourceDTO related to the CompanyUser and inserted year. + +The method 1.1.1.1 findRatingsByYearAndTypeGlobal will return a list of DataSourceDTO based on the selected year, and only return these DTOs with Type Global. + +After that, the method 1.1.1.2 findByYearPublishedAndCompanyUserCompanyNameAndType will return also an List of DatasoureDTO based on the year, companyUser and the Type Company. + +After this, both lists are join onto one and returned in the main class as an List of DataSourceDTO. + + +#### Endpoint: /sharing/getAllRatingsScoresForEachBpn + +```mermaid +sequenceDiagram + participant ActorUser + participant DashBoardResource + participant DashboardService + participant ShareLogicService + participant ExternalBusinessPartnersLogicService + participant DataSourceValueService + participant DataSourceValueRepository + participant ShareDTO + participant ShareRatingDTO + + ActorUser->>+DashBoardResource: 1: getAllRatingsScoresForEachBpn(CompanyUser, dataSource, businessPartner) + DashBoardResource->>+DashboardService: 1.1: findRatingsScoresForEachBpn(CompanyUser, dataSource, businessPartner) + DashboardService->>+ShareLogicService: 1.1.1: findRatingsScoresForEachBpn + ShareLogicService->>+ExternalBusinessPartnersLogicService: 1.1.1.1: getExternalBusinessPartners + ExternalBusinessPartnersLogicService-->>-ShareLogicService: List + + loop For each BusinessPartner + ShareLogicService->>ShareLogicService: Add country to BusinessPartnerDTO + end + + ShareLogicService->>ShareLogicService: 1.1.1.3: Create List of Countries from BusinessPartnerDTO + ShareLogicService->>ShareLogicService: 1.1.1.4: Create List of Data Source Names from DataSourceDTO + + loop For each DataSource + ShareLogicService->>+DataSourceValueService: 1.1.1.3.1: findRatingAndCountryAndScoreGreaterThanAndYear + DataSourceValueService->>+DataSourceValueRepository: 1.1.1.3.1.1: findByRatingAndCountryAndScoreGreaterThanAndYear + DataSourceValueRepository-->>-DataSourceValueService: List + DataSourceValueService-->>-ShareLogicService: List + end + + loop For each ShareDTO + ShareLogicService->>ShareLogicService: 1.1.1.5: Map DataDTO to ShareDTO + end + + ShareLogicService-->>-DashboardService: List + DashboardService-->>-DashBoardResource: List + DashBoardResource-->>-ActorUser: Display ShareDTOs + +``` + +In this endpoint, it is received as a parameter the CompanyUser an dataSource object and a businessPartner object. It is used to return an list of ShareDTO(Mapped ratings to the business partners) related to the parameters inserted. + +Inside the method 1.1.1 findRatingsScoresForEachBpn, the method 1.1.1.1 will add BusinessPartnerDTO into List of BusinessPartnerDTO. + +After this, an for each clause is done into the received list of businessPartner and other clause into the recently created list. This will set the country into the list of the businessPartners received into the parameter. + +After this, an List of String is created that will store all countries related to the BusinessPartnerDTO (1.1.1.3) and is populated according to the BusinessPartnetDTO countries. + +Then, an List of String that will get the name of the Data Sources will also be populated according the DataSourceDTO. + +With this, the DataSource parameter will be iterated with the for each clause, and an List of DataDTO will be filled according with the method 1.1.1.3.1.1, using as parameter both DataSource names and countries String list. + +Finally, the mapping will be done for each ShareDTO, that then will return inside of an List. + + # Quality Requirements diff --git a/docs/Images/catalog-page.png b/docs/Images/catalog-page.png new file mode 100644 index 00000000..ac240fab Binary files /dev/null and b/docs/Images/catalog-page.png differ diff --git a/docs/Images/negotiation_controller_query_catalog.png b/docs/Images/negotiation_controller_query_catalog.png new file mode 100644 index 00000000..32af92ad Binary files /dev/null and b/docs/Images/negotiation_controller_query_catalog.png differ diff --git a/docs/Images/negotiation_controller_trigger.png b/docs/Images/negotiation_controller_trigger.png new file mode 100644 index 00000000..58240199 Binary files /dev/null and b/docs/Images/negotiation_controller_trigger.png differ diff --git a/docs/Images/userInfo.png b/docs/Images/userInfo.png new file mode 100644 index 00000000..1ffe01a6 Binary files /dev/null and b/docs/Images/userInfo.png differ diff --git a/docs/User-Guide.md b/docs/User-Guide.md index bac1bee0..5ee7fb8a 100644 --- a/docs/User-Guide.md +++ b/docs/User-Guide.md @@ -14,8 +14,7 @@ This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LIC In this Section we are describing how you can gain Access to the Dashboard 1. First you need to create an account for the Catena-X Environment -2. Your Company needs to setup everything for the Connection with our Application: This can be found with the BPDM 'Create a Gate' - And needs to be subscribed to the service +2. Your Company needs to setup everything for the Connection with our Application: This can be found with the BPDM 'Create a Gate' and needs to be subscribed to the service ![Portal](../docs/User-Guide-Images/add_app.png) @@ -34,7 +33,7 @@ After the Previous steps are finished the way to the Dashboard is very simple: ![Login](../docs/User-Guide-Images/image2023-1-16_11-0-2.png) -Choose the Login Option you want and its setup. +Choose the Login Option you want and its setup ![Input](../docs/User-Guide-Images/login_board.png) @@ -42,12 +41,22 @@ Choose the Login Option you want and its setup. ![Dashboard](../docs/User-Guide-Images/Dashboard.png) +6. You can only see all data available if data negotiation as been done if not you should go to the Catalog Page to do the Negotiation (if you have permissions) + +![userinfo](../docs/Images/userInfo.png) + +7. If you have the right permissions you can see the Negotiation Option and you should open the Catalog Page + +![catalog](../docs/Images/catalog-page.png) + +8. You must select the data offers and click to trigger negotiation + ## Country Rating Component ![Rating](../docs/User-Guide-Images/RatingList.png) -This Component includes multiple smaller Functionalities +This Component includes multiple smaller Functionalities: - Year Selection - Gate Selection @@ -66,7 +75,7 @@ Currently all Globally available Ratings are Open Source. We do not create Score ![RatingTable](../docs/User-Guide-Images/RatingSelection.png) -Next to the Year Selection you will find the Gate selection. This selection will be done for you atuomatically on the first start-up of the Dashbaord. +Next to the Year Selection you will find the Gate selection. This selection will be done for you automatically on the first start-up of the Dashbaord. ![Gateselect](../docs/User-Guide-Images/GateSelection.png) @@ -75,16 +84,16 @@ Thereafter you can select one or multiple Ratings in the Table. ![Ratingselected](../docs/User-Guide-Images/RatingSelected.png) -If you want to select more Ratings at once you can Open a Pop-Up with the 'Show Ratings' Button +If you want to select more Ratings at once, you can open a Pop-Up with the 'Show Ratings' Button. In this Table you can manipulate the same way you can in the smaller Table. ![Popupselection](../docs/User-Guide-Images/RatingListPopUp.png) -After selecting a Rating the World Map will change the Color of each individual Country. -How is this done. Each Rating has a score for most of the Countries. We have a Score Range of 0-100 for each Rating -For Example the CPI Rating has a Score of 45 for China and 29 for Russia. -Depending on your selection with the Ranges the Country is then colored. +After selecting a Rating, the World Map will change the Color of each individual Country. +How is this done. Each Rating has a score for most of the Countries. We have a Score Range of 0-100 for each Rating. +For Example, the CPI Rating has a Score of 45 for China and 29 for Russia. +Depending on your selection with the Ranges, the Country is then colored. ![WorldMap](../docs/User-Guide-Images/WorldMapFiltered.png) @@ -97,35 +106,34 @@ The Rules for the weighting are: ![weighting](../docs/User-Guide-Images/WeightingOverlap.png) 2. automatic weighting overwrites upon selecting new Raings -3. when changing you need to confirm value by pressing "enter" - Changing the Weighting changes the Scores given in the Table below. How the Scores are calculated is described there. +3. If you change the rating, you must confirm it by pressing "Enter". If you change the weighting, the scores shown in the table below will change. How the scores are calculated is described there -### How can i Upload my own Rating and what do i need to know. +### How can i Upload my own Rating and what do i need to know -The First step is to Download the Template. This is important since this is the Only Format the Application can progress the Upload. +The First step is to Download the Template. This is important since this is the only Format the Application can progress the Upload. ![excelfile](../docs/User-Guide-Images/image2023-1-16_11-43-52.png) ![excellist](../docs/User-Guide-Images/image2023-1-16_11-44-50.png) -After filling out the Column E please save the File. The name is not important since the Name is set when the Rating is Uploaded. -After creating your own Rating all you have to do is Upload the File, you can start with clicking on 'Upload Rating' +After filling out the Column E please save the File. The name is not important since the Name is set when the Rating is uploaded. +After creating your own Rating all you have to do is Upload the File, you can start with clicking on 'Upload Rating'. Then this Pop-Up is shown: ![popupupload](../docs/User-Guide-Images/RatingUpload.png) -You then have the Option to select who can see this Rating after Uploading. -You have the Option between 'Only For me' or 'For the Company'. The secon Option is grayed out if you dont have administration rights. +You then have the Option to select who can see this Rating after uploading. +You have the Option between 'Only For me' or 'For the Company'. The second Option is grayed out if you dont have administration rights. After selecting the Target group you can select the year for which this Rating is relevant for. -Below the year selection you can Give a Name to the Rating. A Rating Name can only be given once. +Below the year selection, you can give a Name to the Rating. A Rating Name can only be given once. This Name is then shown in the Rating table after finishing the Upload. ![savingrating](../docs/User-Guide-Images/RatingUploadFilled.png) -Afterwards yoou will be asked to Upload the File you previously created. You can do thi s per darg and drop or by clicking on the cloud symbol to search your Explorer for the File. +Afterwards you will be asked to Upload the File you previously created. You can do this per drag and drop or by clicking on the cloud symbol to search your Explorer for the File. ![popupsaved](../docs/User-Guide-Images/RatingUploadSuccess.png) @@ -133,7 +141,7 @@ After closing the Pop-Up the Rating is directly available in the table without t ![refresh](../docs/User-Guide-Images/RatingUploaded.png) -If you want to delete a Rating you have the Option to do so by clicking on the 'Trash' Icon to the right of the Rating. +If you want to delete a Rating, you have the Option to do so by clicking on the 'Trash' Icon to the right of the Rating. ![deleterating](../docs/User-Guide-Images/image2023-1-16_11-58-21.png) @@ -143,7 +151,7 @@ and then finish by confirming it. ## World Map -The Map shows an interactive Map of the World for the User +The Map shows an interactive Map of the World for the User: - The User can zoom into the Map - After the first Zoom step the country Codes are shown with the ISO 3166-1 alpha-2 Codes @@ -151,22 +159,22 @@ The Map shows an interactive Map of the World for the User ![hovercountry](../docs/User-Guide-Images/WorldMap.png) -- Upon zooming in the User can see Markers in countries. - Those markers show the Location of the available Business Partners +- When zooming in, the user can see the markings in the countries. + Those markers show the Location of the available Business Partners. Hovering over the Marker reveals the Company Name in that Location ![hoveringmarker](../docs/User-Guide-Images/WorldMapMarker.png) -- The User has the Option to Expand the Map with the Help of the Icon in the top right corner - After Expanding the World Map the User can find a Legend in the bottom left corner which represents the Ranges +- The User has the Option to Expand the Map with the Help of the Icon in the top right corner. + After Expanding the World Map the User can find a Legend in the bottom left corner which represents the Ranges. The functionalities remain in the expanded Mode ![expandbutton](../docs/User-Guide-Images/WorldMapExpand.png) ![popupMap](../docs/User-Guide-Images/WorldMapExpanded.png) -- After Expanding the World Map the User can see the Option to Export the Image. - Upon clicking on the Button a PNG is created and downloaded. The File is named "worldMap.png" +- After Expanding the World Map, the User can see the Option to Export the Image. + Upon clicking on the Button a PNG/PDF is created and downloaded. The File is named "worldMap.png" ![exportImage](../docs/User-Guide-Images/WorldMapExport.png) @@ -184,14 +192,14 @@ The User can also hover over one Country at a time. ![hovercountrymap](../docs/User-Guide-Images/CompanyViewHover.png) -In the Company view we not only show the Name of the Country we also show how many Business Partners which are available to you are located in this country. +In the company view, we not only show the name of the country, but also how many business partners available to you are based in that country. We also show the Score in the Hover since the Countries are not being colored when a Rating is selected. -New in this View is the Option to Filter for a country +New in this View is the Option to Filter for a country. ![searchcountry](../docs/User-Guide-Images/CompanyViewFiltered.png) -After selecting a country the Map zooms to the country and shows the Markers for each Business Partner in this Country. +After selecting a country, the Map zooms to the country and shows the Markers for each Business Partner in this Country. Also the Table below is filtered for the selected country. ![tablesearched](../docs/User-Guide-Images/TableFiltered.png) @@ -203,7 +211,7 @@ The functionalities remain in the expanded Mode. ![expandedcountrymap](../docs/User-Guide-Images/ComapnyViewExpanded.png) -After Expanding the Map the User can see the Option to Export the Image. +After Expanding the Map, the User can see the Option to Export the Image. Upon clicking on the Button a PNG is created and downloaded. The File is named "BusinessPartnerMap.png" @@ -244,7 +252,7 @@ We then display all Business Partners in the table and the World Map. ### Pagination -On each Page we show 15 Business partners. If the User wants to see the next 15 business Partners he has the Option to switch to the next Page by clicking in the bottom right corner on the arrows +On each Page we show 15 Business partners. If the User wants to see the next 15 business Partners he has the Option to switch to the next Page by clicking in the bottom right corner on the arrows. ![pagination](../docs/User-Guide-Images/TablePagination.png) @@ -255,15 +263,15 @@ We show the number of filtered Business Partners next to the Export Option: ### The Score -If the User selects a Rating we create a Score depending on his selection in the Rating Table and Color the background according to the Ranges set. +If the User selects a Rating, we create a Score depending on his selection in the Rating Table and Color the background according to the Ranges set. The Score in the Column "Score" is calculated as follows. Situation 1: -You choose 1 Rating. The Score is taken from the database and shown. If there is none the field will be left empty. The Colore is chosen depending on the Ranges +You choose 1 Rating. The Score is taken from the database and shown. If there is none the field will be left empty. The Colour is chosen depending on the Ranges. Situation 2: -You choose more than 1 Rating. The Formula: (Rating1 * Weighting1) + (Rating2 + Weighting2) + ... as many Ratings as you chose. +You choose more than 1 Rating. The Formula: (Rating1 * Weighting1) + (Rating2 * Weighting2) + ... as many Ratings as you chose. Situation 3: You choose more than 1 rating but there is only one Score. @@ -289,7 +297,7 @@ The User has the option to Export the Table and its content. ![exportbutton](../docs/User-Guide-Images/TableExport.png) -3. After that a CSV File is created, which you can then Download. +3. After that a CSV File is created, which you can then Download ![exportedfile](../docs/User-Guide-Images/image2023-1-16_13-7-35.png) @@ -300,7 +308,7 @@ The User has the option to Export the Table and its content. Functionalities: -- Creating A Report +- Creating a Report - Showing a Report - Changing a Report - Delete a Report @@ -314,27 +322,27 @@ To create a Report the User can set multiple Filters: - Weighting set - Country Filtered in the Company View - Table Filter -- Ranges Set +- Ranges set -When the User has set a view of the Dashboard he wants to acces regularly without the need to recreate it everytime he can save a report: +When the User has set a view of the Dashboard he wants to acces regularly without the need to recreate it everytime, he can save a report: 1. Click on 'Save Report' ![savereport](../docs/User-Guide-Images/ReportSave.png) -2. Fill out the Pop-Up - The User can choose between Uploading a Report for himself or for the Company if he has the status of an admin +2. Fill out the Pop-Up. + The User can choose between Uploading a Report for himself or for the Company, if he has the status of an admin ![savereportpopup](../docs/User-Guide-Images/ReportCreated.png) -After setting a Name and clicking on Save the Report is then available in the Report Table +After setting a Name and clicking on Save, the Report is then available in the Report Table ![definitionreport](../docs/User-Guide-Images/ReportAdded.png) ### How to change a Saved report -The process of changing a saved Report is eay. +The process of changing a saved Report is easy. 1. Select the Report @@ -353,16 +361,16 @@ The process of changing a saved Report is eay. ![confirmation](../docs/User-Guide-Images/ReportChanged.png) -### How to Share a Report with a colleague +### How to Share a Report with a Colleague -To Share a Report with a Colleague, the Perosn needs to be known to our application. +To Share a Report with a Colleague, the Person needs to be known to our application. Meaning he has to have created a Report or a Rating for himself. -ToShare a Report you then select the Report you want to share and continue by clicking on the Share Icon to the most right of the Row. +To Share a Report, you then select the Report you want to share and continue by clicking on the Share Icon to the most right of the Row. ![shareicon](../docs/User-Guide-Images/ReportShareIcon.png) -In the Dropdown you select the Person you want to share the Report with and click on 'share' +In the Dropdown you select the Person you want to share the Report with and click on 'share'. ![selectusers](../docs/User-Guide-Images/ReportShareSelection.png) @@ -371,11 +379,11 @@ You can only share Reports with Users in the Same Company as you. ### How to delete a Report -You can delete a Report by clicking on the 'trash' icon between the Save and Share functionality +You can delete a Report by clicking on the 'trash' icon between the Save and Share functionality. ![deleteicon](../docs/User-Guide-Images/ReportDeleteIcon.png) -Afterwards you confirm that you want to delete the Report by clicking on 'yes' +Afterwards you confirm that you want to delete the Report by clicking on 'yes'. ![confirm](../docs/User-Guide-Images/ReportDeleteConfirmation.png) @@ -414,4 +422,4 @@ To save the Ranges the User can click on 'Save Ranges' they are then automatical ![informationof saving](../docs/User-Guide-Images/rangessaved.png) -When the User Returns at a later date the Saved Ranges are automatically set. \ No newline at end of file +When the User Returns at a later date, the Saved Ranges are automatically set. \ No newline at end of file diff --git a/docs/api/dashboard_controller.yml b/docs/api/dashboard_controller.yml index 0d7ff710..ed687437 100644 --- a/docs/api/dashboard_controller.yml +++ b/docs/api/dashboard_controller.yml @@ -1,7 +1,7 @@ openapi: 3.0.1 info: - title: VAS API - description: Swagger documentation for the Value Added Services APIs + title: VAS API - Dashboard + description: Swagger documentation for the Dashboard APIs version: '1.0' servers: - url: / @@ -14,7 +14,7 @@ paths: put: tags: - Dashboard Controller - summary: Update Reports that + summary: Update Reports operationId: updateReports parameters: - name: companyUserDTO diff --git a/docs/api/negotiation_controller.yml b/docs/api/negotiation_controller.yml new file mode 100644 index 00000000..f33d0720 --- /dev/null +++ b/docs/api/negotiation_controller.yml @@ -0,0 +1,196 @@ +openapi: 3.0.1 +info: + title: VAS API - Negotiation + description: Swagger documentation for the Negotiation APIs + version: '1.0' +servers: + - url: / +security: + - open_id_scheme: + - read + - write +paths: + /api/negotiation/triggerNegotiation: + post: + tags: + - Negotiation Controller + summary: Triggers negotiation with selected items + operationId: triggerNegotiation + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/NegotiationRequestDTO' + required: true + responses: + '200': + description: Negotiation initiated successfully + content: + text/plain: {} + '400': + description: Bad Request + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/NegotiationResponseDTO' + '401': + description: Authentication Required + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/NegotiationResponseDTO' + '500': + description: Internal Server Error + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/NegotiationResponseDTO' + security: + - bearerAuth: [] + - open_id_scheme: [] + /api/negotiation/queryCatalog: + get: + tags: + - Negotiation Controller + summary: Retrieves catalog items available for negotiation + operationId: queryCatalog + responses: + '200': + description: Successfully retrieved catalog items + content: + application/json: + schema: + $ref: '#/components/schemas/CatalogItemDTO' + '401': + description: Authentication Required + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/CatalogItemDTO' + '500': + description: Internal Server Error + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/CatalogItemDTO' + security: + - bearerAuth: [] + - open_id_scheme: [] +components: + schemas: + CompanyUserDTO: + required: + - companyName + - email + - name + type: object + properties: + name: + type: string + example: John + email: + type: string + example: John@email.com + companyName: + type: string + example: TestCompany + NegotiationRequestDTO: + required: + - id + - offerId + type: object + properties: + id: + type: string + description: Unique identifier of the catalog item + example: '1' + offerId: + type: string + description: Identifier of the offer associated with the catalog item + example: offer123 + usagePurpose: + type: string + description: Specific usage purpose or partner category + example: cx.bpdm.pool:1 + description: Data Transfer Object for initiating a negotiation request + NegotiationResponseDTO: + required: + - id + - offerId + type: object + properties: + id: + type: string + description: Unique identifier of the catalog item + example: '1' + offerId: + type: string + description: Identifier of the offer associated with the catalog item + example: offer123 + provider: + type: string + description: Provider of the catalog item + example: Provider A + status: + type: string + description: Status of negotiation of the catalog item + example: Negotiated + description: Data Transfer Object with negotiation status + CatalogItemDTO: + required: + - id + - offerId + type: object + properties: + id: + type: string + description: Unique identifier of the catalog item + example: '1' + offerId: + type: string + description: Identifier of the offer associated with the catalog item + example: offer123 + provider: + type: string + description: Provider of the catalog item + example: Provider A + subject: + type: string + description: Subject of the catalog item + example: cx-taxo:ReadAccessPoolForCatenaXMember + description: + type: string + description: Description of the catalog item + example: Grants the Catena-X Member read access to the Pool API... + usagePurpose: + type: string + description: Specific usage purpose or partner category + example: cx.bpdm.pool:1 + description: Represents a catalog item available for negotiation + securitySchemes: + bearerAuth: + bearerFormat: JWT + scheme: bearer + type: http + open_id_scheme: + flows: + authorizationCode: + authorizationUrl: https://centralidp.dev.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/auth + scopes: + admin: Grants access to admin operations + read: Grants read access + write: Grants write access + tokenUrl: https://centralidp.dev.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token + type: oauth2 diff --git a/docs/api/sharing_controller.yml b/docs/api/sharing_controller.yml index 526308b2..e9d0c9a5 100644 --- a/docs/api/sharing_controller.yml +++ b/docs/api/sharing_controller.yml @@ -1,7 +1,7 @@ openapi: 3.0.1 info: - description: Swagger documentation for the Value Added Services APIs - title: VAS API + title: VAS API - Sharing + description: Swagger documentation for the Sharing APIs version: '1.0' servers: - url: / diff --git a/docs/postman/Country Risk EDC/Country-Risk-EDC.postman_collection b/docs/postman/Country Risk EDC/Country-Risk-EDC.postman_collection deleted file mode 100644 index 9b7ccf68..00000000 --- a/docs/postman/Country Risk EDC/Country-Risk-EDC.postman_collection +++ /dev/null @@ -1,889 +0,0 @@ -{ - "info": { - "_postman_id": "375c1284-bb44-4711-bef2-2192c1e42039", - "name": "EDC 7", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "29921765" - }, - "item": [ - { - "name": "Setup Country Risk Provider", - "item": [ - { - "name": "Assets", - "item": [ - { - "name": "Create Asset", - "request": { - "method": "POST", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"dct\": \"https://purl.org/dc/terms/\",\r\n \"cx-taxo\": \"https://w3id.org/catenax/taxonomy#\",\r\n \"cx-common\": \"https://w3id.org/catenax/ontology/common#\",\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"Asset\",\r\n \"@id\": \"{{ASSET_GET_CR_SHARING_RATINGS_FOR_EACH_BPN}}\",\r\n \"properties\": {\r\n \"description\": \"GET Sharing States ({{COUNTRY_RISK_BACKEND_URL}}/swagger-ui/index.html#/Sharing Controller/getAllRatingsScoresForEachBpn)\",\r\n \"company\": \"{{PROVIDER_ID}}\",\r\n \"dct:type\": {\r\n \"@id\": \"cx-taxo:ContryRisk\"\r\n },\r\n \"dct:subject\": {\r\n \"@id\": \"cx-taxo:FullAccessCountryRiskSharingForVASUser\"\r\n },\r\n \"dct:description\": \"Grants unrestricted access to business partner data for the Data Consumer of the Country Risk Dashboard and Sharing API. This includes data identified via BPN and enriched from the pool. It allows the use of risk categorizations from various indices within the data consumer's company. Data usage is covered by the framework agreement for the gate.\",\r\n \"cx-common:version\": \"2.0.0\"\r\n },\r\n \"dataAddress\": {\r\n \"@type\": \"DataAddress\",\r\n \"type\": \"HttpData\",\r\n \"baseUrl\": \"{{COUNTRY_RISK_BACKEND_URL}}{{COUNTRY_RISK_SHARING_PATH}}\",\r\n \"oauth2:tokenUrl\": \"{{ASSET_TOKEN_URL}}\",\r\n \"oauth2:clientId\": \"{{ASSET_CLIENT_ID}}\",\r\n \"oauth2:clientSecretKey\": \"{{ASSET_CLIENT_SECRET}}\",\r\n \"proxyQueryParams\": \"true\"\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{PROVIDER_URL}}/management/v3/assets", - "host": [ - "{{PROVIDER_URL}}" - ], - "path": [ - "management", - "v3", - "assets" - ] - } - }, - "response": [] - }, - { - "name": "Delete Asset", - "request": { - "method": "DELETE", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "url": { - "raw": "{{PROVIDER_URL}}/management/v3/assets/{{ASSET_COUNTRY_RISK_SHARING_APIS}}", - "host": [ - "{{PROVIDER_URL}}" - ], - "path": [ - "management", - "v3", - "assets", - "{{ASSET_COUNTRY_RISK_SHARING_APIS}}" - ] - } - }, - "response": [] - }, - { - "name": "Get Asset", - "request": { - "method": "GET", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "url": { - "raw": "{{PROVIDER_URL}}/management/v3/assets/{{ASSET_GET_CR_SHARING_RATINGS_FOR_EACH_BPN}}", - "host": [ - "{{PROVIDER_URL}}" - ], - "path": [ - "management", - "v3", - "assets", - "{{ASSET_GET_CR_SHARING_RATINGS_FOR_EACH_BPN}}" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "Policy", - "item": [ - { - "name": "Create Policy", - "request": { - "method": "POST", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@id\": \"{{POLICY_ID}}\",\r\n \"policy\": {\r\n \"@context\": \"http://www.w3.org/ns/odrl.jsonld\",\r\n \"@type\": \"Set\",\r\n \"odrl:permission\": [\r\n {\r\n \"odrl:action\": \"USE\",\r\n \"odrl:constraint\": {\r\n \"@type\": \"LogicalConstraint\",\r\n \"odrl:or\": [\r\n {\r\n \"@type\": \"Constraint\",\r\n \"odrl:leftOperand\": \"BusinessPartnerNumber\",\r\n \"odrl:operator\": {\r\n \"@id\": \"odrl:eq\"\r\n },\r\n \"odrl:rightOperand\": \"{{BPNL_SHARING_MEMBER}}\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{PROVIDER_URL}}/management/v2/policydefinitions", - "host": [ - "{{PROVIDER_URL}}" - ], - "path": [ - "management", - "v2", - "policydefinitions" - ] - } - }, - "response": [] - }, - { - "name": "Get Policy", - "request": { - "method": "GET", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "url": { - "raw": "{{PROVIDER_URL}}/management/v2/policydefinitions/{{POLICY_ID}}", - "host": [ - "{{PROVIDER_URL}}" - ], - "path": [ - "management", - "v2", - "policydefinitions", - "{{POLICY_ID}}" - ] - } - }, - "response": [] - }, - { - "name": "Delete Policy", - "request": { - "method": "DELETE", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "url": { - "raw": "{{PROVIDER_URL}}/management/v2/policydefinitions/{{POLICY_ID}}", - "host": [ - "{{PROVIDER_URL}}" - ], - "path": [ - "management", - "v2", - "policydefinitions", - "{{POLICY_ID}}" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "Contract", - "item": [ - { - "name": "Create Contract", - "request": { - "method": "POST", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@id\": \"{{CONTRACT_ID}}\",\r\n \"@type\": \"ContractDefinition\",\r\n \"accessPolicyId\": \"{{POLICY_ID}}\",\r\n \"contractPolicyId\": \"{{CONTRACT_ID}}\",\r\n \"assetsSelector\": {\r\n \"@type\": \"CriterionDto\",\r\n \"operandLeft\": \"{{EDC_NAMESPACE}}id\",\r\n \"operator\": \"in\",\r\n \"operandRight\": [\r\n \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\"\r\n ]\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{PROVIDER_URL}}/management/v2/contractdefinitions", - "host": [ - "{{PROVIDER_URL}}" - ], - "path": [ - "management", - "v2", - "contractdefinitions" - ] - } - }, - "response": [] - }, - { - "name": "Delete Contract", - "request": { - "method": "DELETE", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "url": { - "raw": "{{PROVIDER_URL}}/management/v2/contractdefinitions/{{CONTRACT_ID}}", - "host": [ - "{{PROVIDER_URL}}" - ], - "path": [ - "management", - "v2", - "contractdefinitions", - "{{CONTRACT_ID}}" - ] - } - }, - "response": [] - }, - { - "name": "Get Contracts", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpec\",\r\n \"offset\": 5,\r\n \"limit\": 10,\r\n \"sortOrder\": \"DESC\",\r\n \"sortField\": \"fieldName\",\r\n \"filterExpression\": []\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{PROVIDER_URL}}/management/v2/contractdefinitions/{{CONTRACT_ID}}", - "host": [ - "{{PROVIDER_URL}}" - ], - "path": [ - "management", - "v2", - "contractdefinitions", - "{{CONTRACT_ID}}" - ] - } - }, - "response": [] - } - ] - } - ] - }, - { - "name": "Negotiate Country Risk Provider", - "item": [ - { - "name": "Query Catalog", - "item": [ - { - "name": "Query Catalog", - "request": { - "method": "POST", - "header": [ - { - "key": "x-api-key", - "value": "{{X-API-KEY}}", - "type": "text" - } - ], - "body": { - "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"CatalogRequest\",\r\n \"counterPartyAddress\": \"{{PROVIDER_URL_DSP}}\",\r\n \"counterPartyId\": \"{{PROVIDER_ID}}\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 50,\r\n \"sortOrder\": \"DESC\",\r\n \"sortField\": \"fieldName\",\r\n \"filterExpression\": []\r\n }\r\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{CONSUMER_URL}}/management/v2/catalog/request", - "host": [ - "{{CONSUMER_URL}}" - ], - "path": [ - "management", - "v2", - "catalog", - "request" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "Negotiate", - "item": [ - { - "name": "Query EDRs for Asset", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "let responseJson = pm.response.json();", - "let lastNegotiatedTransferProcessId = \"\";", - "let latestExpirationDate = 0;", - "", - "if (Array.isArray(responseJson)) {", - " responseJson.forEach(function (item) {", - " // Checking for the \"NEGOTIATED\" state and existence of \"tx:expirationDate\"", - " if (item[\"tx:edrState\"] === \"NEGOTIATED\" && item.hasOwnProperty(\"tx:expirationDate\")) {", - " let currentExpirationDate = item[\"tx:expirationDate\"];", - " // Update if this item's expirationDate is more recent", - " if (currentExpirationDate > latestExpirationDate) {", - " latestExpirationDate = currentExpirationDate;", - " // Correct property access for transferProcessId", - " lastNegotiatedTransferProcessId = item[\"transferProcessId\"];", - " }", - " }", - " });", - "}", - "", - "// Log and set the environment variable only if we found a valid ID", - "if (lastNegotiatedTransferProcessId) {", - " pm.collectionVariables.set(\"lastNegotiatedTransferProcessId\", lastNegotiatedTransferProcessId);", - " console.log(\"Last Negotiated Transfer Process ID:\", lastNegotiatedTransferProcessId);", - "} else {", - " console.log(\"No negotiated transfer process ID found in the latest entry.\");", - "}", - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{CONSUMER_URL}}/management/edrs?assetId={{ASSET_COUNTRY_RISK_SHARING_APIS}}", - "host": [ - "{{CONSUMER_URL}}" - ], - "path": [ - "management", - "edrs" - ], - "query": [ - { - "key": "assetId", - "value": "{{ASSET_COUNTRY_RISK_SHARING_APIS}}" - } - ] - } - }, - "response": [] - }, - { - "name": "Initiate EDR Negotation Copy", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "// Parse the JSON response", - "let responseJson = pm.response.json();", - "", - "// Extract the \"@id\" value", - "let negotiationId = responseJson[\"@id\"];", - "", - "// Check if negotiationId is not undefined or empty", - "if (negotiationId) {", - " // Save negotiationId as an environment variable", - " pm.collectionVariables.set(\"negotiationId\", negotiationId);", - " console.log(\"Negotiation ID saved:\", negotiationId);", - "} else {", - " console.log(\"Negotiation ID not found in the response.\");", - "}", - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n\t\"@context\": {\n\t\t\"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n\t},\n\t\"@type\": \"NegotiationInitiateRequestDto\",\n\t\"counterPartyAddress\": \"{{PROVIDER_URL}}\",\n\t\"protocol\": \"dataspace-protocol-http\",\n\t\"counterPartyId\": \"{{PROVIDER_ID}}\",\n\t\"providerId\": \"{{PROVIDER_ID}}\",\n\t\"offer\": {\n\t\t\"offerId\": \"{{OFFER_ID_COUNTRY_RISK_SHARING_APIS}}\",\n\t\t\"assetId\": \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\",\n\t\t\"policy\": {\n\t\t\t\"@type\": \"odrl:Set\",\n\t\t\t\"odrl:permission\": {\n\t\t\t\t\"odrl:target\": \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\",\n\t\t\t\t\"odrl:action\": {\n\t\t\t\t\t\"odrl:type\": \"USE\"\n\t\t\t\t},\n\t\t\t\t\"odrl:constraint\": {\n\t\t\t\t\t\"odrl:or\": {\n\t\t\t\t\t\t\"odrl:leftOperand\": \"BusinessPartnerNumber\",\n\t\t\t\t\t\t\"odrl:operator\": {\n \"@id\": \"odrl:eq\"\n },\n\t\t\t\t\t\t\"odrl:rightOperand\": \"{{POLICY_BPN}}\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"odrl:prohibition\": [],\n\t\t\t\"odrl:obligation\": [],\n\t\t\t\"odrl:target\": \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\"\n\t\t}\n\t}\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{CONSUMER_URL}}/management/edrs", - "host": [ - "{{CONSUMER_URL}}" - ], - "path": [ - "management", - "edrs" - ] - } - }, - "response": [] - }, - { - "name": "GET Contract Negotation by EDR ID Copy 2", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "// Parse the JSON response", - "let responseJson = pm.response.json();", - "", - "// Extract the \"contractAgreementId\" value", - "let contractAgreementId = responseJson[\"contractAgreementId\"];", - "", - "// Check if contractAgreementId is not undefined or empty", - "if (contractAgreementId) {", - " // Save contractAgreementId as an environment variable", - " pm.collectionVariables.set(\"contractAgreementId\", contractAgreementId);", - " console.log(\"Contract Agreement ID saved:\", contractAgreementId);", - "} else {", - " console.log(\"Contract Agreement ID not found in the response.\");", - "}", - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{CONSUMER_URL}}/management/v2/contractnegotiations/{{negotiationId}}", - "host": [ - "{{CONSUMER_URL}}" - ], - "path": [ - "management", - "v2", - "contractnegotiations", - "{{negotiationId}}" - ] - } - }, - "response": [] - }, - { - "name": "Get TransferProcess ID by agreement ID Copy 2", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "// Parse the JSON response", - "let responseJson = pm.response.json();", - "", - "// Initialize a variable to store the transferProcessId", - "let transferProcessId = \"\";", - "", - "// Loop through the response array to find an entry with \"NEGOTIATED\" state", - "responseJson.forEach(function(item) {", - " if (item[\"@type\"] === \"tx:EndpointDataReferenceEntry\" && item[\"tx:edrState\"] === \"NEGOTIATED\") {", - " // If a negotiated entry is found, save its transferProcessId", - " transferProcessId = item[\"transferProcessId\"];", - " // Optional: Break the loop if only the first \"NEGOTIATED\" entry is needed", - " return false; // Note: This will not actually break the forEach loop in JavaScript. Use for...of loop if breaking is necessary.", - " }", - "});", - "", - "// Check if a transferProcessId was found and save it as an environment variable", - "if (transferProcessId !== \"\") {", - " pm.collectionVariables.set(\"transferProcessId\", transferProcessId);", - " console.log(\"Transfer Process ID saved:\", transferProcessId);", - "} else {", - " console.log(\"No negotiated transfer process ID found.\");", - "}", - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{CONSUMER_URL}}/management/edrs?agreementId={{contractAgreementId}}", - "host": [ - "{{CONSUMER_URL}}" - ], - "path": [ - "management", - "edrs" - ], - "query": [ - { - "key": "agreementId", - "value": "{{contractAgreementId}}" - } - ] - } - }, - "response": [] - }, - { - "name": "Get EDR by tp ID Copy", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "// Parse the JSON response", - "var responseBody = pm.response.json();", - "", - "// Check if the response contains the \"edc:authCode\" property", - "if (responseBody.hasOwnProperty(\"authCode\")) {", - " // Get the value of \"edc:authCode\"", - " var authCode = responseBody[\"authCode\"];", - "", - " // Set the collection variable with the value of \"edc:authCode\"", - " pm.collectionVariables.set(\"AUTH_CODE\", authCode);", - "", - " // Log the value to the Postman console", - " console.log(\"authCode: \" + authCode);", - "} else {", - " console.log(\"Response does not contain 'edc:authCode' property.\");", - "}" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "protocolProfileBehavior": { - "disableBodyPruning": true - }, - "request": { - "method": "GET", - "header": [], - "body": { - "mode": "raw", - "raw": "", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{CONSUMER_URL}}/management/edrs/{{lastNegotiatedTransferProcessId}}", - "host": [ - "{{CONSUMER_URL}}" - ], - "path": [ - "management", - "edrs", - "{{lastNegotiatedTransferProcessId}}" - ] - } - }, - "response": [] - } - ] - }, - { - "name": "Execute Requests", - "item": [ - { - "name": "Public Api GetAllRatingsScoresForEachBpn", - "request": { - "auth": { - "type": "apikey", - "apikey": [ - { - "key": "value", - "value": "{{AUTH_CODE}}", - "type": "string" - }, - { - "key": "key", - "value": "Authorization", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{COUNTRY_RISK_PUBLIC_URL}}/getAllRatingsScoresForEachBpn?datasource[]={\n \"dataSourceName\": \"CPI Rating 2021\",\n \"yearPublished\": 2021\n}&bpns[]={\n \"bpn\": \"BPN-0001\",\n \"country\": \"ES\"\n}&name=John&email=John@email.com&companyName=TestCompany", - "host": [ - "{{COUNTRY_RISK_PUBLIC_URL}}" - ], - "path": [ - "getAllRatingsScoresForEachBpn" - ], - "query": [ - { - "key": "datasource[]", - "value": "{\n \"dataSourceName\": \"CPI Rating 2021\",\n \"yearPublished\": 2021\n}" - }, - { - "key": "bpns[]", - "value": "{\n \"bpn\": \"BPN-0001\",\n \"country\": \"ES\"\n}" - }, - { - "key": "name", - "value": "John" - }, - { - "key": "email", - "value": "John@email.com" - }, - { - "key": "companyName", - "value": "TestCompany" - } - ] - } - }, - "response": [] - }, - { - "name": "Public Api GetAllRatingsForCompany", - "request": { - "auth": { - "type": "apikey", - "apikey": [ - { - "key": "value", - "value": "{{AUTH_CODE}}", - "type": "string" - }, - { - "key": "key", - "value": "Authorization", - "type": "string" - } - ] - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{COUNTRY_RISK_PUBLIC_URL}}/getAllRatingsForCompany?year=2021&name=John&email=John@email.com&companyName=TestCompany", - "host": [ - "{{COUNTRY_RISK_PUBLIC_URL}}" - ], - "path": [ - "getAllRatingsForCompany" - ], - "query": [ - { - "key": "year", - "value": "2021" - }, - { - "key": "name", - "value": "John" - }, - { - "key": "email", - "value": "John@email.com" - }, - { - "key": "companyName", - "value": "TestCompany" - } - ] - } - }, - "response": [] - } - ] - } - ] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "PROVIDER_URL", - "value": "http://localhost:8080", - "type": "string" - }, - { - "key": "ASSET_COUNTRY_RISK_SHARING_APIS", - "value": "GET_COUNTRY_RISK_SHARING_APIS", - "type": "string" - }, - { - "key": "COUNTRY_RISK_BACKEND_URL", - "value": "https://vas-country-risk-backend.int.demo.catena-x.net", - "type": "string" - }, - { - "key": "COMPANY_ID", - "value": "BPNL00000007RF54", - "type": "string" - }, - { - "key": "ASSET_TOKEN_URL", - "value": "https://centralidp.int.demo.catena-x.net/auth/realms/CX-Central/protocol/openid-connect/token", - "type": "string" - }, - { - "key": "ASSET_CLIENT_ID", - "value": "sa121", - "type": "string" - }, - { - "key": "ASSET_CLIENT_SECRET", - "value": "", - "type": "string" - }, - { - "key": "X-API-KEY", - "value": "", - "type": "string" - }, - { - "key": "POLICY_ID", - "value": "COUNTRY_RISK_POLICY", - "type": "string" - }, - { - "key": "BPNL_SHARING_MEMBER", - "value": "BPNLX01", - "type": "string" - }, - { - "key": "PROVIDER_URL_DSP", - "value": "https://country-risk-edc-provider.int.demo.catena-x.net/api/v1/dsp", - "type": "string" - }, - { - "key": "PROVIDER_ID", - "value": "BPNLX02", - "type": "string" - }, - { - "key": "CONTRACT_ID", - "value": "COUNTRY_RISK_CONTRACT" - }, - { - "key": "EDC_NAMESPACE", - "value": "https://w3id.org/edc/v0.0.1/ns/", - "type": "string" - }, - { - "key": "CONSUMER_URL", - "value": "http://localhost:8081", - "type": "string" - }, - { - "key": "COUNTRY_RISK_SHARING_PATH", - "value": "/api/sharing", - "type": "string" - }, - { - "key": "negotiationId", - "value": "", - "type": "string" - }, - { - "key": "contractAgreementId", - "value": "", - "type": "string" - }, - { - "key": "lastNegotiatedTransferProcessId", - "value": "", - "type": "string" - }, - { - "key": "COUNTRY_RISK_PUBLIC_URL", - "value": "https://country-risk-edc-provider.int.demo.catena-x.net/api/public", - "type": "string" - }, - { - "key": "AUTH_CODE", - "value": "", - "type": "string" - }, - { - "key": "OFFER_ID_COUNTRY_RISK_SHARING_APIS", - "value": "", - "type": "string" - } - ] -} \ No newline at end of file diff --git a/docs/postman/Country Risk EDC/EDC.postman_collection.json b/docs/postman/Country Risk EDC/EDC.postman_collection.json new file mode 100644 index 00000000..50cdf522 --- /dev/null +++ b/docs/postman/Country Risk EDC/EDC.postman_collection.json @@ -0,0 +1,2329 @@ +{ + "info": { + "_postman_id": "375c1284-bb44-4711-bef2-2192c1e42039", + "name": "EDC", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "29921765" + }, + "item": [ + { + "name": "Country Risk", + "item": [ + { + "name": "Setup Country Risk Provider", + "item": [ + { + "name": "Assets", + "item": [ + { + "name": "Try Dynamic Asset", + "item": [ + { + "name": "Create Asset", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"dct\": \"https://purl.org/dc/terms/\",\r\n \"cx-taxo\": \"https://w3id.org/catenax/taxonomy#\",\r\n \"cx-common\": \"https://w3id.org/catenax/ontology/common#\",\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"Asset\",\r\n \"@id\": \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\",\r\n \"properties\": {\r\n \"description\": \"GET Sharing States ({{COUNTRY_RISK_BACKEND_URL}}/swagger-ui/index.html#/Sharing Controller/getAllRatingsScoresForEachBpn)\",\r\n \"company\": \"{{PROVIDER_ID}}\",\r\n \"dct:type\": {\r\n \"@id\": \"cx-taxo:ContryRisk\"\r\n },\r\n \"dct:subject\": {\r\n \"@id\": \"cx-taxo:FullAccessCountryRiskSharingForVASUser\"\r\n },\r\n \"dct:description\": \"Grants unrestricted access to business partner data for the Data Consumer of the Country Risk Dashboard and Sharing API. This includes data identified via BPN and enriched from the pool. It allows the use of risk categorizations from various indices within the data consumer's company. Data usage is covered by the framework agreement for the gate.\",\r\n \"cx-common:version\": \"2.0.0\"\r\n },\r\n \"dataAddress\": {\r\n \"@type\": \"DataAddress\",\r\n \"type\": \"HttpData\",\r\n \"baseUrl\": \"{{COUNTRY_RISK_BACKEND_URL}}{{COUNTRY_RISK_SHARING_PATH}}\",\r\n \"oauth2:tokenUrl\": \"{{ASSET_TOKEN_URL}}\",\r\n \"oauth2:clientId\": \"{{ASSET_CLIENT_ID}}\",\r\n \"oauth2:clientSecretKey\": \"{{ASSET_CLIENT_SECRET}}\",\r\n \"proxyPath\": \"true\",\r\n \"proxyQueryParams\": \"true\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_URL}}/management/v3/assets", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v3", + "assets" + ] + } + }, + "response": [] + }, + { + "name": "Delete Asset", + "request": { + "method": "DELETE", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}", + "type": "text" + } + ], + "url": { + "raw": "{{PROVIDER_URL}}/management/v3/assets/{{ASSET_COUNTRY_RISK_SHARING_APIS}}", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v3", + "assets", + "{{ASSET_COUNTRY_RISK_SHARING_APIS}}" + ] + } + }, + "response": [] + }, + { + "name": "Get Asset", + "request": { + "method": "GET", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}", + "type": "text" + } + ], + "url": { + "raw": "{{PROVIDER_URL}}/management/v3/assets/{{ASSET_COUNTRY_RISK_SHARING_APIS}}", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v3", + "assets", + "{{ASSET_COUNTRY_RISK_SHARING_APIS}}" + ] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Policy", + "item": [ + { + "name": "Create Policy", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@id\": \"{{POLICY_ID}}\",\r\n \"policy\": {\r\n \"@context\": \"http://www.w3.org/ns/odrl.jsonld\",\r\n \"@type\": \"Set\",\r\n \"odrl:permission\": [\r\n {\r\n \"odrl:action\": \"USE\",\r\n \"odrl:constraint\": {\r\n \"@type\": \"LogicalConstraint\",\r\n \"odrl:or\": [\r\n {\r\n \"@type\": \"Constraint\",\r\n \"odrl:leftOperand\": \"BusinessPartnerNumber\",\r\n \"odrl:operator\": {\r\n \"@id\": \"odrl:eq\"\r\n },\r\n \"odrl:rightOperand\": \"{{BPNL_SHARING_MEMBER}}\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_URL}}/management/v2/policydefinitions", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "policydefinitions" + ] + } + }, + "response": [] + }, + { + "name": "Create Policy Framework", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": [\r\n \"https://w3id.org/tractusx/policy/v1.0.0\",\r\n \"http://www.w3.org/ns/odrl.jsonld\",\r\n {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n }\r\n ],\r\n \"@type\": \"PolicyDefinitionRequestDto\",\r\n \"@id\": \"{{POLICY_ID}}\",\r\n \"policy\": {\r\n \"@type\": \"Set\",\r\n \"profile\": \"profile2405\",\r\n \"permission\": [\r\n {\r\n \"action\": \"use\",\r\n \"constraint\": {\r\n \"and\": [\r\n {\r\n \"leftOperand\": \"FrameworkAgreement.businesspartner\",\r\n \"operator\": \"eq\",\r\n \"rightOperand\": \"active\"\r\n },\r\n {\r\n \"leftOperand\": \"UsagePurpose\",\r\n \"operator\": \"eq\",\r\n \"rightOperand\": \"\"\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_URL}}/management/v2/policydefinitions", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "policydefinitions" + ] + } + }, + "response": [] + }, + { + "name": "Get Policy", + "request": { + "method": "GET", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}", + "type": "text" + } + ], + "url": { + "raw": "{{PROVIDER_URL}}/management/v2/policydefinitions/{{POLICY_ID}}", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "policydefinitions", + "{{POLICY_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "Get All Policy", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpec\",\r\n \"offset\": 0,\r\n \"limit\": 10,\r\n \"sortOrder\": \"DESC\",\r\n \"filterExpression\": []\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_URL}}/management/v2/policydefinitions/request", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "policydefinitions", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Delete Policy", + "request": { + "method": "DELETE", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}", + "type": "text" + } + ], + "url": { + "raw": "{{PROVIDER_URL}}/management/v2/policydefinitions/{{POLICY_ID}}", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "policydefinitions", + "{{POLICY_ID}}" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Contract", + "item": [ + { + "name": "Create Contract", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@id\": \"{{CONTRACT_ID}}\",\r\n \"@type\": \"ContractDefinition\",\r\n \"accessPolicyId\": \"{{POLICY_ID}}\",\r\n \"contractPolicyId\": \"{{POLICY_ID}}\",\r\n \"assetsSelector\": {\r\n \"@type\": \"CriterionDto\",\r\n \"operandLeft\": \"{{EDC_NAMESPACE}}id\",\r\n \"operator\": \"in\",\r\n \"operandRight\": [\r\n \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\"\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_URL}}/management/v2/contractdefinitions", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "contractdefinitions" + ] + } + }, + "response": [] + }, + { + "name": "Get All Contract Agreements", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpec\",\r\n \"offset\": 0,\r\n \"limit\": 10,\r\n \"sortOrder\": \"DESC\",\r\n \"filterExpression\": []\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_URL}}/management/v2/contractagreements/request", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "contractagreements", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Delete Contract", + "request": { + "method": "DELETE", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}", + "type": "text" + } + ], + "url": { + "raw": "{{PROVIDER_URL}}/management/v2/contractdefinitions/{{CONTRACT_ID}}", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "contractdefinitions", + "{{CONTRACT_ID}}" + ] + } + }, + "response": [] + }, + { + "name": "Get Contracts", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpec\",\r\n \"offset\": 5,\r\n \"limit\": 10,\r\n \"sortOrder\": \"DESC\",\r\n \"sortField\": \"fieldName\",\r\n \"filterExpression\": []\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_URL}}/management/v2/contractdefinitions/{{CONTRACT_ID}}", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "contractdefinitions", + "{{CONTRACT_ID}}" + ] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Negotiate Country Risk Provider", + "item": [ + { + "name": "Query Catalog", + "item": [ + { + "name": "Query Catalog", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"CatalogRequest\",\r\n \"counterPartyAddress\": \"{{PROVIDER_URL_DSP}}\",\r\n \"counterPartyId\": \"{{PROVIDER_ID}}\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 50,\r\n \"sortOrder\": \"DESC\",\r\n \"sortField\": \"fieldName\",\r\n \"filterExpression\": []\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/catalog/request", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "catalog", + "request" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Negotiate", + "item": [ + { + "name": "Initiate EDR Negotation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "// Parse the JSON response", + "let responseJson = pm.response.json();", + "", + "// Extract the \"@id\" value", + "let negotiationId = responseJson[\"@id\"];", + "", + "// Check if negotiationId is not undefined or empty", + "if (negotiationId) {", + " // Save negotiationId as an environment variable", + " pm.collectionVariables.set(\"negotiationId\", negotiationId);", + " console.log(\"Negotiation ID saved:\", negotiationId);", + "} else {", + " console.log(\"Negotiation ID not found in the response.\");", + "}", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": {\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\",\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"ContractRequest\",\n \"counterPartyAddress\": \"{{PROVIDER_URL_DSP}}\",\n \"protocol\": \"dataspace-protocol-http\",\n \"counterPartyId\": \"{{PROVIDER_ID}}\",\n \"policy\": {\n \"@id\": \"OFFERID\",\n \"@type\": \"odrl:Offer\",\n \"@context\": \"http://www.w3.org/ns/odrl.jsonld\",\n \"odrl:permission\": {\n \"odrl:target\": \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\",\n \"odrl:action\": {\n \"odrl:type\": \"USE\"\n },\n \"odrl:constraint\": {\n \"odrl:or\": {\n \"odrl:leftOperand\": \"BusinessPartnerNumber\",\n \"odrl:operator\": {\n \"@id\": \"odrl:eq\"\n },\n \"odrl:rightOperand\": \"{{BPNL_SHARING_MEMBER}}\"\n }\n }\n },\n \"odrl:prohibition\": [],\n \"odrl:obligation\": [],\n \"odrl:target\": {\n \"@id\": \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\"\n },\n \"assigner\": \"{{PROVIDER_ID}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/edrs", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "edrs" + ] + } + }, + "response": [] + }, + { + "name": "Initiate EDR Negotation Framework Policy", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "// Parse the JSON response", + "let responseJson = pm.response.json();", + "", + "// Extract the \"@id\" value", + "let negotiationId = responseJson[\"@id\"];", + "", + "// Check if negotiationId is not undefined or empty", + "if (negotiationId) {", + " // Save negotiationId as an environment variable", + " pm.collectionVariables.set(\"negotiationId\", negotiationId);", + " console.log(\"Negotiation ID saved:\", negotiationId);", + "} else {", + " console.log(\"Negotiation ID not found in the response.\");", + "}", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": [\n \"https://w3id.org/tractusx/policy/v1.0.0\",\n \"http://www.w3.org/ns/odrl.jsonld\",\n {\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\",\n \"cx-policy\": \"https://w3id.org/catenax/policy/\"\n }\n ],\n \"@type\": \"ContractRequest\",\n \"counterPartyAddress\": \"{{PROVIDER_URL_DSP}}\",\n \"protocol\": \"dataspace-protocol-http\",\n \"counterPartyId\": \"{{PROVIDER_ID}}\",\n \"policy\": {\n \"@id\": \"OFFERID\",\n \"@type\": \"Offer\",\n \"permission\": [\n {\n \"target\": \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\",\n \"action\": \"use\",\n \"constraint\": {\n \"and\": [\n {\n \"leftOperand\": \"cx-policy:FrameworkAgreement\",\n \"operator\": \"eq\",\n \"rightOperand\": \"businessPartner:1.0\"\n },\n {\n \"leftOperand\": \"UsagePurpose\",\n \"operator\": \"eq\",\n \"rightOperand\": \"\"\n }\n ]\n }\n }\n ],\n \"target\": \"{{ASSET_COUNTRY_RISK_SHARING_APIS}}\",\n \"assigner\": \"{{PROVIDER_ID}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/edrs", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "edrs" + ] + } + }, + "response": [] + }, + { + "name": "GET Contract Negotation By Id", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "// Parse the JSON response", + "let responseJson = pm.response.json();", + "", + "// Extract the \"contractAgreementId\" value", + "let contractAgreementId = responseJson[\"contractAgreementId\"];", + "", + "// Check if contractAgreementId is not undefined or empty", + "if (contractAgreementId) {", + " // Save contractAgreementId as an environment variable", + " pm.collectionVariables.set(\"contractAgreementId\", contractAgreementId);", + " console.log(\"Contract Agreement ID saved:\", contractAgreementId);", + "} else {", + " console.log(\"Contract Agreement ID not found in the response.\");", + "}", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}", + "type": "text" + } + ], + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/contractnegotiations/{{negotiationId}}", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "contractnegotiations", + "{{negotiationId}}" + ] + } + }, + "response": [] + }, + { + "name": "Get TransferProcess ID by agreement ID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "// Test that the response status code is 200", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "// Parse the JSON response", + "let responseJson = pm.response.json();", + "", + "// Extract the ID from the response and store it in a variable", + "let transferProcessId = responseJson[\"@id\"];", + "", + "// Log the extracted ID to ensure it's correct", + "console.log(\"Extracted Transfer Process ID:\", transferProcessId);", + "", + "// Save the transferProcessId as an environment variable if it exists", + "if (transferProcessId) {", + " pm.collectionVariables.set(\"transferProcessId\", transferProcessId);", + " console.log(\"Transfer Process ID saved:\", transferProcessId);", + "} else {", + " console.log(\"No transfer process ID found.\");", + "}", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"assetId\": \"0435bb8b-22d7-4f79-a50f-93611db92bc9\",\r\n \"counterPartyAddress\": \"{{PROVIDER_URL_DSP}}\",\r\n \"connectorId\": \"{{PROVIDER_ID}}\",\r\n \"contractId\": \"{{contractAgreementId}}\",\r\n \"transferType\": \"HttpData-PULL\",\r\n \"dataDestination\": {\r\n \"type\": \"HttpProxy\"\r\n },\r\n \"privateProperties\": {\r\n \"receiverHttpEndpoint\": \"{{BACKEND_SERVICE}}\"\r\n },\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"callbackAddresses\":{\r\n \"events\": [\r\n \"transfer.process.started\"\r\n ],\r\n \"uri\": \"http://mock-util-service:80/edr-log\"\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/transferprocesses", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "transferprocesses" + ] + } + }, + "response": [] + }, + { + "name": "Get EDR by ContractAgreementID", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "var responseJson = pm.response.json();", + "var transferProcessId = responseJson[0][\"transferProcessId\"];", + "pm.collectionVariables.set(\"transferProcessId\", transferProcessId);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": {\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\n },\n \"@type\": \"QuerySpec\",\n \"offset\": 0,\n \"limit\": 1,\n \"filterExpression\": [\n {\n \"operandLeft\": \"agreementId\",\n \"operator\": \"=\",\n \"operandRight\": \"{{contractAgreementId}}\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/edrs/request", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "edrs", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Get EDR by TransferProcessID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "// Test that the response status code is 200", + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "// Ensure 'responseBody' is declared only once. Use 'let' or 'var' based on your need.", + "let resBody = pm.response.json();", + "", + "// Check if the response contains the \"authorization\" property", + "if (resBody.hasOwnProperty(\"authorization\")) {", + " // Get the value of \"authorization\"", + " let authCode = resBody[\"authorization\"];", + "", + " // Set the collection variable with the value of \"authorization\"", + " pm.collectionVariables.set(\"AUTH_CODE\", authCode);", + "", + " // Log the value to the Postman console", + " console.log(\"Authorization Code saved:\", authCode);", + "} else {", + " console.log(\"Response does not contain 'authorization' property.\");", + "}", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/edrs/{{transferProcessId}}/dataaddress?auto_refresh=true", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "edrs", + "{{transferProcessId}}", + "dataaddress" + ], + "query": [ + { + "key": "auto_refresh", + "value": "true" + } + ] + } + }, + "response": [] + }, + { + "name": "Refresh Token", + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "grant_type", + "value": "refresh_token" + }, + { + "key": "refresh_token", + "value": "" + }, + { + "key": "client_id", + "value": "client_id" + }, + { + "key": "client_secret", + "value": "client_secret" + } + ], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "grant_type", + "value": "refresh_token", + "type": "text" + }, + { + "key": "refresh_token", + "value": "", + "type": "text" + }, + { + "key": "client_id", + "value": "client_id", + "type": "text" + }, + { + "key": "client_secret", + "value": "client_secret", + "type": "text" + } + ] + }, + "url": { + "raw": "https://edc-country-risk-provider-hostname/api/public/token?grant_type=refresh_token&refresh_token=&client_id", + "protocol": "https", + "host": [ + "country-risk-edc-provider", + "int", + "demo", + "catena-x", + "net" + ], + "path": [ + "api", + "public", + "token" + ], + "query": [ + { + "key": "grant_type", + "value": "refresh_token" + }, + { + "key": "refresh_token", + "value": "refresh_token" + }, + { + "key": "client_id", + "value": "client_id" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Execute Requests", + "item": [ + { + "name": "Public Api GetAllRatingsScoresForEachBpn", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{AUTH_CODE}}", + "type": "string" + }, + { + "key": "key", + "value": "Authorization", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{COUNTRY_RISK_PUBLIC_URL}}/getAllRatingsScoresForEachBpn?datasource[]={\n \"dataSourceName\": \"CPI Rating 2021\",\n \"yearPublished\": 2021\n}&bpns[]={\n \"bpn\": \"BPN-0001\",\n \"country\": \"ES\"\n}&name=John&email=John@email.com&companyName=TestCompany", + "host": [ + "{{COUNTRY_RISK_PUBLIC_URL}}" + ], + "path": [ + "getAllRatingsScoresForEachBpn" + ], + "query": [ + { + "key": "datasource[]", + "value": "{\n \"dataSourceName\": \"CPI Rating 2021\",\n \"yearPublished\": 2021\n}" + }, + { + "key": "bpns[]", + "value": "{\n \"bpn\": \"BPN-0001\",\n \"country\": \"ES\"\n}" + }, + { + "key": "name", + "value": "John" + }, + { + "key": "email", + "value": "John@email.com" + }, + { + "key": "companyName", + "value": "TestCompany" + } + ] + } + }, + "response": [] + }, + { + "name": "Public Api GetAllRatingsForCompany", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{AUTH_CODE}}", + "type": "string" + }, + { + "key": "key", + "value": "Authorization", + "type": "string" + } + ] + }, + "method": "GET", + "header": [], + "url": { + "raw": "{{COUNTRY_RISK_PUBLIC_URL}}/getAllRatingsForCompany?year=2021&name=John&email=John@email.com&companyName=TestCompany", + "host": [ + "{{COUNTRY_RISK_PUBLIC_URL}}" + ], + "path": [ + "getAllRatingsForCompany" + ], + "query": [ + { + "key": "year", + "value": "2021" + }, + { + "key": "name", + "value": "John" + }, + { + "key": "email", + "value": "John@email.com" + }, + { + "key": "companyName", + "value": "TestCompany" + } + ] + } + }, + "response": [] + } + ] + } + ] + } + ] + }, + { + "name": "BPDM", + "item": [ + { + "name": "Check Setups", + "item": [ + { + "name": "Assets", + "item": [ + { + "name": "Get Asset", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpec\",\r\n \"offset\": 0,\r\n \"limit\": 10,\r\n \"sortOrder\": \"DESC\",\r\n \"sortField\": \"fieldName\",\r\n \"filterExpression\": []\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{PROVIDER_URL}}/management/v3/assets/request", + "host": [ + "{{PROVIDER_URL}}" + ], + "path": [ + "management", + "v3", + "assets", + "request" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Policy", + "item": [ + { + "name": "Get Policy", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpec\",\r\n \"offset\": 0,\r\n \"limit\": 10,\r\n \"sortOrder\": \"DESC\",\r\n \"filterExpression\": []\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BPDM_PROVIDER_URL}}/management/v2/policydefinitions/request", + "host": [ + "{{BPDM_PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "policydefinitions", + "request" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Contracts", + "item": [ + { + "name": "Get Contracts", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpec\",\r\n \"offset\": 0,\r\n \"limit\": 10,\r\n \"sortOrder\": \"DESC\",\r\n \"filterExpression\": []\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BPDM_PROVIDER_URL}}/management/v2/contractdefinitions/request", + "host": [ + "{{BPDM_PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "contractdefinitions", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Create Contract", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@id\": \"country-risk-test-to-bpdm4\",\r\n \"@type\": \"ContractDefinition\",\r\n \"accessPolicyId\": \"{{POLICY_ID}}\",\r\n \"contractPolicyId\": \"{{POLICY_ID}}\",\r\n \"assetsSelector\": {\r\n \"@type\": \"CriterionDto\",\r\n \"operandLeft\": \"{{EDC_NAMESPACE}}id\",\r\n \"operator\": \"in\",\r\n \"operandRight\": [\r\n \"ASSETS NEEDEED\"\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{BPDM_PROVIDER_URL}}/management/v2/contractdefinitions", + "host": [ + "{{BPDM_PROVIDER_URL}}" + ], + "path": [ + "management", + "v2", + "contractdefinitions" + ] + } + }, + "response": [] + } + ] + } + ] + }, + { + "name": "Negotiate Country Risk to BPDM Provider", + "item": [ + { + "name": "Query Catalog", + "item": [ + { + "name": "Query Catalog", + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"CatalogRequest\",\r\n \"counterPartyAddress\": \"{{BPDM_PROVIDER_URL_DSP}}\",\r\n \"counterPartyId\": \"{{PROVIDER_ID}}\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 50,\r\n \"sortOrder\": \"DESC\",\r\n \"sortField\": \"fieldName\",\r\n \"filterExpression\": []\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/catalog/request", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "catalog", + "request" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Select Offer", + "item": [ + { + "name": "Select Pool Member Read Access", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "var responseJson = pm.response.json();", + "var offerId = responseJson[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"@id\"];", + "var assetId = responseJson[\"dcat:dataset\"][\"id\"];", + "pm.collectionVariables.set(\"OFFER\", offerId);", + "pm.collectionVariables.set(\"SELECTED_ASSET\", assetId)", + "pm.collectionVariables.set(\"SELECTED_PURPOSE\", \"\")" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"CatalogRequest\",\r\n \"counterPartyAddress\": \"{{BPDM_PROVIDER_URL_DSP}}\",\r\n \"counterPartyId\": \"{{PROVIDER_ID}}\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 1,\r\n \"filterExpression\": [\r\n {\r\n \"operandLeft\": \"https://purl.org/dc/terms/subject\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"cx-taxo:ReadAccessPoolForCatenaXMember\"\r\n },\r\n {\r\n \"operandLeft\": \"https://w3id.org/catenax/ontology/common/version\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"6.0\"\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/catalog/request", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "catalog", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Select Gate Output Read Access", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "var responseJson = pm.response.json();", + "var offerId = responseJson[\"dcat:dataset\"][\"odrl:hasPolicy\"][\"@id\"];", + "var assetId = responseJson[\"dcat:dataset\"][\"id\"];", + "pm.collectionVariables.set(\"OFFER\", offerId);", + "pm.collectionVariables.set(\"SELECTED_ASSET\", assetId)", + "pm.collectionVariables.set(\"SELECTED_PURPOSE\", \"cx.bpdm.gate.download:1\")" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "auth": { + "type": "noauth" + }, + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"CatalogRequest\",\r\n \"counterPartyAddress\": \"{{BPDM_PROVIDER_URL_DSP}}\",\r\n \"counterPartyId\": \"{{PROVIDER_ID}}\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"querySpec\": {\r\n \"offset\": 0,\r\n \"limit\": 1,\r\n \"filterExpression\": [\r\n {\r\n \"operandLeft\": \"https://purl.org/dc/terms/subject\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"cx-taxo:ReadAccessGateOutputForSharingMember\"\r\n },\r\n {\r\n \"operandLeft\": \"https://w3id.org/catenax/ontology/common/version\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"6.0\"\r\n },\r\n {\r\n \"operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/BusinessPartnerNumber\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"{{BPNL_SHARING_MEMBER}}\"\r\n }\r\n ]\r\n }\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/catalog/request", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "catalog", + "request" + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Negotiate", + "item": [ + { + "name": "Initiate EDR Negotation", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "// Parse the JSON response", + "let responseJson = pm.response.json();", + "", + "// Extract the \"@id\" value", + "let negotiationId = responseJson[\"@id\"];", + "", + "// Check if negotiationId is not undefined or empty", + "if (negotiationId) {", + " // Save negotiationId as an environment variable", + " pm.collectionVariables.set(\"negotiationId\", negotiationId);", + " console.log(\"Negotiation ID saved:\", negotiationId);", + "} else {", + " console.log(\"Negotiation ID not found in the response.\");", + "}", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"@context\": [\n \"https://w3id.org/tractusx/policy/v1.0.0\",\n \"http://www.w3.org/ns/odrl.jsonld\",\n {\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\n }\n ],\n \"@type\": \"ContractRequest\",\n \"edc:counterPartyAddress\": \"{{BPDM_PROVIDER_URL_DSP}}\",\n \"edc:protocol\": \"dataspace-protocol-http\",\n \"edc:counterPartyId\": \"{{PROVIDER_ID}}\",\n \"edc:policy\": {\n \"@id\": \"{{OFFER}}\",\n \"@type\": \"Offer\",\n \"permission\": [\n {\n \"action\": \"use\",\n \"constraint\": {\n \"and\": [\n {\n \"leftOperand\": \"FrameworkAgreement\",\n \"operator\": \"eq\",\n \"rightOperand\": \"businessPartner:1.0\"\n },\n {\n \"leftOperand\": \"UsagePurpose\",\n \"operator\": \"eq\",\n \"rightOperand\": \"{{SELECTED_PURPOSE}}\"\n }\n ]\n }\n }\n ],\n \"target\": \"{{SELECTED_ASSET}}\",\n \"assigner\": \"{{PROVIDER_ID}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/edrs", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "edrs" + ] + } + }, + "response": [] + }, + { + "name": "GET Contract Negotation By Id", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "// Parse the JSON response", + "let responseJson = pm.response.json();", + "", + "// Extract the \"contractAgreementId\" value", + "let contractAgreementId = responseJson[\"contractAgreementId\"];", + "", + "// Check if contractAgreementId is not undefined or empty", + "if (contractAgreementId) {", + " // Save contractAgreementId as an environment variable", + " pm.collectionVariables.set(\"contractAgreementId\", contractAgreementId);", + " console.log(\"Contract Agreement ID saved:\", contractAgreementId);", + "} else {", + " console.log(\"Contract Agreement ID not found in the response.\");", + "}", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}", + "type": "text" + } + ], + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/contractnegotiations/{{negotiationId}}", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "contractnegotiations", + "{{negotiationId}}" + ] + } + }, + "response": [] + }, + { + "name": "Get EDR by agreement ID", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "var responseJson = pm.response.json();", + "var transferProcessId = responseJson[0][\"transferProcessId\"];", + "pm.collectionVariables.set(\"transferProcessId\", transferProcessId);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"@context\": {\r\n \"@vocab\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpec\",\r\n \"offset\": 0,\r\n \"limit\": 1,\r\n \"filterExpression\": [\r\n {\r\n \"operandLeft\": \"agreementId\",\r\n \"operator\": \"=\",\r\n \"operandRight\": \"{{contractAgreementId}}\"\r\n }\r\n ]\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/edrs/request", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "edrs", + "request" + ] + } + }, + "response": [] + }, + { + "name": "Get Authorization", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "var responseJson = pm.response.json();", + "var transferToken = responseJson[\"authorization\"];", + "pm.collectionVariables.set(\"TRANSFER_TOKEN\", transferToken);" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "x-api-key", + "value": "{{X-API-KEY}}" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{CONSUMER_URL}}/management/v2/edrs/{{transferProcessId}}/dataaddress?auto_refresh=true", + "host": [ + "{{CONSUMER_URL}}" + ], + "path": [ + "management", + "v2", + "edrs", + "{{transferProcessId}}", + "dataaddress" + ], + "query": [ + { + "key": "auto_refresh", + "value": "true" + } + ] + } + }, + "response": [] + } + ] + }, + { + "name": "Execute Requests", + "item": [ + { + "name": "Gate", + "item": [ + { + "name": "/output/business-partners/search", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{TRANSFER_TOKEN}}", + "type": "string" + }, + { + "key": "key", + "value": "Authorization", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "[\n\n]", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{BPDM_PROVIDER_URL}}/api/public/output/business-partners/search?page=0&size=100", + "host": [ + "{{BPDM_PROVIDER_URL}}" + ], + "path": [ + "api", + "public", + "output", + "business-partners", + "search" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Number of page to get results from" + }, + { + "key": "size", + "value": "100", + "description": "Size of each page" + } + ] + }, + "description": "Get page of business partners output data filtered by a collection of external IDs. An empty external ID list will return a paginated list of all business partners." + }, + "response": [ + { + "name": "The requested page of business partners", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "[\n \"\",\n \"\"\n]", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/output/business-partners/search?page=0&size=10", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "output", + "business-partners", + "search" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Number of page to get results from" + }, + { + "key": "size", + "value": "10", + "description": "Size of each page" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"content\": [\n {\n \"address\": {\n \"addressBpn\": \"\",\n \"alternativePostalAddress\": {\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"country\": \"ZA\",\n \"administrativeAreaLevel1\": \"\",\n \"postalCode\": \"\",\n \"city\": \"\",\n \"deliveryServiceType\": \"PRIVATE_BAG\",\n \"deliveryServiceQualifier\": \"\",\n \"deliveryServiceNumber\": \"\"\n },\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"physicalPostalAddress\": {\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"country\": \"EA\",\n \"administrativeAreaLevel1\": \"\",\n \"administrativeAreaLevel2\": \"\",\n \"administrativeAreaLevel3\": \"\",\n \"postalCode\": \"\",\n \"city\": \"\",\n \"district\": \"\",\n \"street\": {\n \"namePrefix\": \"\",\n \"additionalNamePrefix\": \"\",\n \"name\": \"\",\n \"nameSuffix\": \"\",\n \"additionalNameSuffix\": \"\",\n \"houseNumber\": \"\",\n \"houseNumberSupplement\": \"\",\n \"milestone\": \"\",\n \"direction\": \"\"\n },\n \"companyPostalCode\": \"\",\n \"industrialZone\": \"\",\n \"building\": \"\",\n \"floor\": \"\",\n \"door\": \"\"\n },\n \"states\": [\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"INACTIVE\"\n },\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"ACTIVE\"\n }\n ],\n \"name\": \"\",\n \"addressType\": \"SiteMainAddress\"\n },\n \"createdAt\": \"\",\n \"externalId\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"value\": \"\",\n \"issuingBody\": \"\"\n },\n {\n \"type\": \"\",\n \"value\": \"\",\n \"issuingBody\": \"\"\n }\n ],\n \"isOwnCompanyData\": \"\",\n \"legalEntity\": {\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"legalEntityBpn\": \"\",\n \"states\": [\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"ACTIVE\"\n },\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"INACTIVE\"\n }\n ],\n \"legalName\": \"\",\n \"shortName\": \"\",\n \"legalForm\": \"\"\n },\n \"nameParts\": [\n \"\",\n \"\"\n ],\n \"roles\": [\n \"ONE_TIME_SUPPLIER\",\n \"ONE_TIME_CUSTOMER\"\n ],\n \"states\": [\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"INACTIVE\"\n },\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"ACTIVE\"\n }\n ],\n \"updatedAt\": \"\",\n \"site\": {\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"siteBpn\": \"\",\n \"states\": [\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"INACTIVE\"\n },\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"ACTIVE\"\n }\n ],\n \"name\": \"\"\n }\n },\n {\n \"address\": {\n \"addressBpn\": \"\",\n \"alternativePostalAddress\": {\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"country\": \"JM\",\n \"administrativeAreaLevel1\": \"\",\n \"postalCode\": \"\",\n \"city\": \"\",\n \"deliveryServiceType\": \"PO_BOX\",\n \"deliveryServiceQualifier\": \"\",\n \"deliveryServiceNumber\": \"\"\n },\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"physicalPostalAddress\": {\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"country\": \"KE\",\n \"administrativeAreaLevel1\": \"\",\n \"administrativeAreaLevel2\": \"\",\n \"administrativeAreaLevel3\": \"\",\n \"postalCode\": \"\",\n \"city\": \"\",\n \"district\": \"\",\n \"street\": {\n \"namePrefix\": \"\",\n \"additionalNamePrefix\": \"\",\n \"name\": \"\",\n \"nameSuffix\": \"\",\n \"additionalNameSuffix\": \"\",\n \"houseNumber\": \"\",\n \"houseNumberSupplement\": \"\",\n \"milestone\": \"\",\n \"direction\": \"\"\n },\n \"companyPostalCode\": \"\",\n \"industrialZone\": \"\",\n \"building\": \"\",\n \"floor\": \"\",\n \"door\": \"\"\n },\n \"states\": [\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"INACTIVE\"\n },\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"INACTIVE\"\n }\n ],\n \"name\": \"\",\n \"addressType\": \"LegalAndSiteMainAddress\"\n },\n \"createdAt\": \"\",\n \"externalId\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"value\": \"\",\n \"issuingBody\": \"\"\n },\n {\n \"type\": \"\",\n \"value\": \"\",\n \"issuingBody\": \"\"\n }\n ],\n \"isOwnCompanyData\": \"\",\n \"legalEntity\": {\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"legalEntityBpn\": \"\",\n \"states\": [\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"INACTIVE\"\n },\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"INACTIVE\"\n }\n ],\n \"legalName\": \"\",\n \"shortName\": \"\",\n \"legalForm\": \"\"\n },\n \"nameParts\": [\n \"\",\n \"\"\n ],\n \"roles\": [\n \"SUPPLIER\",\n \"ONE_TIME_SUPPLIER\"\n ],\n \"states\": [\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"ACTIVE\"\n },\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"ACTIVE\"\n }\n ],\n \"updatedAt\": \"\",\n \"site\": {\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"siteBpn\": \"\",\n \"states\": [\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"ACTIVE\"\n },\n {\n \"validFrom\": \"\",\n \"validTo\": \"\",\n \"type\": \"ACTIVE\"\n }\n ],\n \"name\": \"\"\n }\n }\n ],\n \"contentSize\": \"\",\n \"page\": \"\",\n \"totalElements\": \"\",\n \"totalPages\": \"\"\n}" + }, + { + "name": "On malformed pagination request", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "[\n \"\",\n \"\"\n]", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/output/business-partners/search?page=0&size=10", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "output", + "business-partners", + "search" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Number of page to get results from" + }, + { + "key": "size", + "value": "10", + "description": "Size of each page" + } + ] + } + }, + "status": "Bad Request", + "code": 400, + "_postman_previewlanguage": "text", + "header": [], + "cookie": [], + "body": "" + } + ] + } + ] + }, + { + "name": "Pool", + "item": [ + { + "name": "/members/legal-entities/search", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "value", + "value": "{{TRANSFER_TOKEN}}", + "type": "string" + }, + { + "key": "key", + "value": "Authorization", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"bpnLs\": [\n\n ],\n \"legalName\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{BPDM_PROVIDER_URL}}/api/public/members/legal-entities/search?page=0&size=10", + "host": [ + "{{BPDM_PROVIDER_URL}}" + ], + "path": [ + "api", + "public", + "members", + "legal-entities", + "search" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Number of page to get results from" + }, + { + "key": "size", + "value": "10", + "description": "Size of each page" + } + ] + } + }, + "response": [ + { + "name": "OK", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"bpnLs\": [\n \"\",\n \"\"\n ],\n \"legalName\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/members/legal-entities/search?page=0&size=10", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "members", + "legal-entities", + "search" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Number of page to get results from" + }, + { + "key": "size", + "value": "10", + "description": "Size of each page" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"content\": [\n {\n \"bpnl\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"currentness\": \"\",\n \"identifiers\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\",\n \"issuingBody\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\",\n \"issuingBody\": \"\"\n }\n ],\n \"isCatenaXMemberData\": \"\",\n \"legalAddress\": {\n \"bpna\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"identifiers\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n }\n ],\n \"isCatenaXMemberData\": \"\",\n \"physicalPostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"AT\"\n },\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"KH\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"administrativeAreaLevel2\": \"\",\n \"administrativeAreaLevel3\": \"\",\n \"postalCode\": \"\",\n \"district\": \"\",\n \"street\": {\n \"name\": \"\",\n \"houseNumber\": \"\",\n \"houseNumberSupplement\": \"\",\n \"milestone\": \"\",\n \"direction\": \"\",\n \"namePrefix\": \"\",\n \"additionalNamePrefix\": \"\",\n \"nameSuffix\": \"\",\n \"additionalNameSuffix\": \"\"\n },\n \"companyPostalCode\": \"\",\n \"industrialZone\": \"\",\n \"building\": \"\",\n \"floor\": \"\",\n \"door\": \"\"\n },\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\",\n \"name\": \"\",\n \"alternativePostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"RW\"\n },\n \"deliveryServiceNumber\": \"\",\n \"deliveryServiceType\": \"PO_BOX\",\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"QA\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"postalCode\": \"\",\n \"deliveryServiceQualifier\": \"\"\n },\n \"bpnLegalEntity\": \"\",\n \"bpnSite\": \"\",\n \"addressType\": \"LegalAddress\"\n },\n \"legalName\": \"\",\n \"relations\": [\n {\n \"endBpnl\": \"\",\n \"startBpnl\": \"\",\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"CX_LEGAL_PREDECESSOR_OF\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"endBpnl\": \"\",\n \"startBpnl\": \"\",\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"CX_LEGAL_PREDECESSOR_OF\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\",\n \"legalShortName\": \"\",\n \"legalForm\": {\n \"name\": \"\",\n \"technicalKey\": \"\",\n \"abbreviation\": \"\"\n }\n },\n {\n \"bpnl\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"currentness\": \"\",\n \"identifiers\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\",\n \"issuingBody\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\",\n \"issuingBody\": \"\"\n }\n ],\n \"isCatenaXMemberData\": \"\",\n \"legalAddress\": {\n \"bpna\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"identifiers\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n }\n ],\n \"isCatenaXMemberData\": \"\",\n \"physicalPostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"UM\"\n },\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"JE\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"administrativeAreaLevel2\": \"\",\n \"administrativeAreaLevel3\": \"\",\n \"postalCode\": \"\",\n \"district\": \"\",\n \"street\": {\n \"name\": \"\",\n \"houseNumber\": \"\",\n \"houseNumberSupplement\": \"\",\n \"milestone\": \"\",\n \"direction\": \"\",\n \"namePrefix\": \"\",\n \"additionalNamePrefix\": \"\",\n \"nameSuffix\": \"\",\n \"additionalNameSuffix\": \"\"\n },\n \"companyPostalCode\": \"\",\n \"industrialZone\": \"\",\n \"building\": \"\",\n \"floor\": \"\",\n \"door\": \"\"\n },\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\",\n \"name\": \"\",\n \"alternativePostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"GP\"\n },\n \"deliveryServiceNumber\": \"\",\n \"deliveryServiceType\": \"PO_BOX\",\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"PT\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"postalCode\": \"\",\n \"deliveryServiceQualifier\": \"\"\n },\n \"bpnLegalEntity\": \"\",\n \"bpnSite\": \"\",\n \"addressType\": \"LegalAndSiteMainAddress\"\n },\n \"legalName\": \"\",\n \"relations\": [\n {\n \"endBpnl\": \"\",\n \"startBpnl\": \"\",\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"CX_LEGAL_SUCCESSOR_OF\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"endBpnl\": \"\",\n \"startBpnl\": \"\",\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"CX_LEGAL_PREDECESSOR_OF\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\",\n \"legalShortName\": \"\",\n \"legalForm\": {\n \"name\": \"\",\n \"technicalKey\": \"\",\n \"abbreviation\": \"\"\n }\n }\n ],\n \"contentSize\": \"\",\n \"page\": \"\",\n \"totalElements\": \"\",\n \"totalPages\": \"\"\n}" + } + ] + }, + { + "name": "/members/sites/search Copy", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"legalEntityBpns\": [\n \"\",\n \"\"\n ],\n \"siteBpns\": [\n \"\",\n \"\"\n ],\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/members/sites/search?page=0&size=10", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "members", + "sites", + "search" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Number of page to get results from" + }, + { + "key": "size", + "value": "10", + "description": "Size of each page" + } + ] + } + }, + "response": [ + { + "name": "OK", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"legalEntityBpns\": [\n \"\",\n \"\"\n ],\n \"siteBpns\": [\n \"\",\n \"\"\n ],\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/members/sites/search?page=0&size=10", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "members", + "sites", + "search" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Number of page to get results from" + }, + { + "key": "size", + "value": "10", + "description": "Size of each page" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"content\": [\n {\n \"bpnLegalEntity\": \"\",\n \"bpns\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"isCatenaXMemberData\": \"\",\n \"mainAddress\": {\n \"bpna\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"identifiers\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n }\n ],\n \"isCatenaXMemberData\": \"\",\n \"physicalPostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"KY\"\n },\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"IL\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"administrativeAreaLevel2\": \"\",\n \"administrativeAreaLevel3\": \"\",\n \"postalCode\": \"\",\n \"district\": \"\",\n \"street\": {\n \"name\": \"\",\n \"houseNumber\": \"\",\n \"houseNumberSupplement\": \"\",\n \"milestone\": \"\",\n \"direction\": \"\",\n \"namePrefix\": \"\",\n \"additionalNamePrefix\": \"\",\n \"nameSuffix\": \"\",\n \"additionalNameSuffix\": \"\"\n },\n \"companyPostalCode\": \"\",\n \"industrialZone\": \"\",\n \"building\": \"\",\n \"floor\": \"\",\n \"door\": \"\"\n },\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\",\n \"name\": \"\",\n \"alternativePostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"AI\"\n },\n \"deliveryServiceNumber\": \"\",\n \"deliveryServiceType\": \"PRIVATE_BAG\",\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"XU\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"postalCode\": \"\",\n \"deliveryServiceQualifier\": \"\"\n },\n \"bpnLegalEntity\": \"\",\n \"bpnSite\": \"\",\n \"addressType\": \"LegalAndSiteMainAddress\"\n },\n \"name\": \"\",\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\"\n },\n {\n \"bpnLegalEntity\": \"\",\n \"bpns\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"isCatenaXMemberData\": \"\",\n \"mainAddress\": {\n \"bpna\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"identifiers\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n }\n ],\n \"isCatenaXMemberData\": \"\",\n \"physicalPostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"LB\"\n },\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"PH\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"administrativeAreaLevel2\": \"\",\n \"administrativeAreaLevel3\": \"\",\n \"postalCode\": \"\",\n \"district\": \"\",\n \"street\": {\n \"name\": \"\",\n \"houseNumber\": \"\",\n \"houseNumberSupplement\": \"\",\n \"milestone\": \"\",\n \"direction\": \"\",\n \"namePrefix\": \"\",\n \"additionalNamePrefix\": \"\",\n \"nameSuffix\": \"\",\n \"additionalNameSuffix\": \"\"\n },\n \"companyPostalCode\": \"\",\n \"industrialZone\": \"\",\n \"building\": \"\",\n \"floor\": \"\",\n \"door\": \"\"\n },\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\",\n \"name\": \"\",\n \"alternativePostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"PS\"\n },\n \"deliveryServiceNumber\": \"\",\n \"deliveryServiceType\": \"PO_BOX\",\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"AT\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"postalCode\": \"\",\n \"deliveryServiceQualifier\": \"\"\n },\n \"bpnLegalEntity\": \"\",\n \"bpnSite\": \"\",\n \"addressType\": \"LegalAddress\"\n },\n \"name\": \"\",\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\"\n }\n ],\n \"contentSize\": \"\",\n \"page\": \"\",\n \"totalElements\": \"\",\n \"totalPages\": \"\"\n}" + } + ] + }, + { + "name": "/members/addresses/search Copy", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"addressBpns\": [\n \"\",\n \"\"\n ],\n \"legalEntityBpns\": [\n \"\",\n \"\"\n ],\n \"siteBpns\": [\n \"\",\n \"\"\n ],\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/members/addresses/search?page=0&size=10", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "members", + "addresses", + "search" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Number of page to get results from" + }, + { + "key": "size", + "value": "10", + "description": "Size of each page" + } + ] + } + }, + "response": [ + { + "name": "OK", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"addressBpns\": [\n \"\",\n \"\"\n ],\n \"legalEntityBpns\": [\n \"\",\n \"\"\n ],\n \"siteBpns\": [\n \"\",\n \"\"\n ],\n \"name\": \"\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/members/addresses/search?page=0&size=10", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "members", + "addresses", + "search" + ], + "query": [ + { + "key": "page", + "value": "0", + "description": "Number of page to get results from" + }, + { + "key": "size", + "value": "10", + "description": "Size of each page" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"content\": [\n {\n \"bpna\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"identifiers\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n }\n ],\n \"isCatenaXMemberData\": \"\",\n \"physicalPostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"RE\"\n },\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"VG\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"administrativeAreaLevel2\": \"\",\n \"administrativeAreaLevel3\": \"\",\n \"postalCode\": \"\",\n \"district\": \"\",\n \"street\": {\n \"name\": \"\",\n \"houseNumber\": \"\",\n \"houseNumberSupplement\": \"\",\n \"milestone\": \"\",\n \"direction\": \"\",\n \"namePrefix\": \"\",\n \"additionalNamePrefix\": \"\",\n \"nameSuffix\": \"\",\n \"additionalNameSuffix\": \"\"\n },\n \"companyPostalCode\": \"\",\n \"industrialZone\": \"\",\n \"building\": \"\",\n \"floor\": \"\",\n \"door\": \"\"\n },\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"INACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\",\n \"name\": \"\",\n \"alternativePostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"YT\"\n },\n \"deliveryServiceNumber\": \"\",\n \"deliveryServiceType\": \"PO_BOX\",\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"SK\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"postalCode\": \"\",\n \"deliveryServiceQualifier\": \"\"\n },\n \"bpnLegalEntity\": \"\",\n \"bpnSite\": \"\",\n \"addressType\": \"LegalAndSiteMainAddress\"\n },\n {\n \"bpna\": \"\",\n \"confidenceCriteria\": {\n \"checkedByExternalDataSource\": \"\",\n \"confidenceLevel\": \"\",\n \"lastConfidenceCheckAt\": \"\",\n \"nextConfidenceCheckAt\": \"\",\n \"numberOfSharingMembers\": \"\",\n \"sharedByOwner\": \"\"\n },\n \"createdAt\": \"\",\n \"identifiers\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"\"\n },\n \"value\": \"\"\n }\n ],\n \"isCatenaXMemberData\": \"\",\n \"physicalPostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"ZR\"\n },\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"CH\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"administrativeAreaLevel2\": \"\",\n \"administrativeAreaLevel3\": \"\",\n \"postalCode\": \"\",\n \"district\": \"\",\n \"street\": {\n \"name\": \"\",\n \"houseNumber\": \"\",\n \"houseNumberSupplement\": \"\",\n \"milestone\": \"\",\n \"direction\": \"\",\n \"namePrefix\": \"\",\n \"additionalNamePrefix\": \"\",\n \"nameSuffix\": \"\",\n \"additionalNameSuffix\": \"\"\n },\n \"companyPostalCode\": \"\",\n \"industrialZone\": \"\",\n \"building\": \"\",\n \"floor\": \"\",\n \"door\": \"\"\n },\n \"states\": [\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n },\n {\n \"type\": {\n \"name\": \"\",\n \"technicalKey\": \"ACTIVE\"\n },\n \"validFrom\": \"\",\n \"validTo\": \"\"\n }\n ],\n \"updatedAt\": \"\",\n \"name\": \"\",\n \"alternativePostalAddress\": {\n \"city\": \"\",\n \"country\": {\n \"name\": \"\",\n \"technicalKey\": \"SR\"\n },\n \"deliveryServiceNumber\": \"\",\n \"deliveryServiceType\": \"PO_BOX\",\n \"geographicCoordinates\": {\n \"latitude\": \"\",\n \"longitude\": \"\",\n \"altitude\": \"\"\n },\n \"administrativeAreaLevel1\": {\n \"countryCode\": \"SO\",\n \"regionCode\": \"\",\n \"regionName\": \"\"\n },\n \"postalCode\": \"\",\n \"deliveryServiceQualifier\": \"\"\n },\n \"bpnLegalEntity\": \"\",\n \"bpnSite\": \"\",\n \"addressType\": \"LegalAddress\"\n }\n ],\n \"contentSize\": \"\",\n \"page\": \"\",\n \"totalElements\": \"\",\n \"totalPages\": \"\"\n}" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "PROVIDER_URL", + "value": "https://edc-country-risk-provider-hostname/api/public", + "type": "string" + }, + { + "key": "ASSET_COUNTRY_RISK_SHARING_APIS", + "value": "GET_COUNTRY_RISK_SHARING_APIS", + "type": "string" + }, + { + "key": "COUNTRY_RISK_BACKEND_URL", + "value": "https://country-risk-backend-hostname/api/public", + "type": "string" + }, + { + "key": "COMPANY_ID", + "value": "BPNL0000000XXXX1", + "type": "string" + }, + { + "key": "ASSET_TOKEN_URL", + "value": "https://auth-url-hostname:8080/auth/realms/CX-Central/protocol/openid-connect/token", + "type": "string" + }, + { + "key": "ASSET_CLIENT_ID", + "value": "client_id", + "type": "string" + }, + { + "key": "ASSET_CLIENT_SECRET", + "value": "vault/path/to/asset-client-secret", + "type": "string" + }, + { + "key": "X-API-KEY", + "value": "", + "type": "string" + }, + { + "key": "POLICY_ID", + "value": "COUNTRY_RISK_POLICY", + "type": "string" + }, + { + "key": "BPNL_SHARING_MEMBER", + "value": "BPNL0000000XXXX2", + "type": "string" + }, + { + "key": "PROVIDER_URL_DSP", + "value": "https://edc-country-risk-provider-hostname/api/public", + "type": "string" + }, + { + "key": "PROVIDER_ID", + "value": "BPNL0000000XXXX1", + "type": "string" + }, + { + "key": "CONTRACT_ID", + "value": "COUNTRY_RISK_CONTRACT" + }, + { + "key": "EDC_NAMESPACE", + "value": "https://w3id.org/edc/v0.0.1/ns/", + "type": "string" + }, + { + "key": "CONSUMER_URL", + "value": "https://edc-country-risk-consumer-hostname/api/public", + "type": "string" + }, + { + "key": "COUNTRY_RISK_SHARING_PATH", + "value": "/api/sharing", + "type": "string" + }, + { + "key": "negotiationId", + "value": "", + "type": "string" + }, + { + "key": "contractAgreementId", + "value": "", + "type": "string" + }, + { + "key": "lastNegotiatedTransferProcessId", + "value": "", + "type": "string" + }, + { + "key": "COUNTRY_RISK_PUBLIC_URL", + "value": "https://edc-country-risk-provider-hostname/api/public", + "type": "string" + }, + { + "key": "AUTH_CODE", + "value": "", + "type": "string" + }, + { + "key": "OFFER_ID_COUNTRY_RISK_SHARING_APIS", + "value": "", + "type": "string" + }, + { + "key": "transferProcessId", + "value": "" + }, + { + "key": "BPDM_PROVIDER_URL_DSP", + "value": "https://edc-bpdm-provider-hostname/api/v1/dsp", + "type": "string" + }, + { + "key": "BPDM_PROVIDER_URL", + "value": "https://edc-bpdm-provider-hostname", + "type": "string" + }, + { + "key": "TRANSFERPROCESS", + "value": "" + }, + { + "key": "PROVIDER_EDC_DATASPACE_API", + "value": "https://edc-hostname/api/public", + "type": "string" + }, + { + "key": "OFFER", + "value": "" + }, + { + "key": "SELECTED_ASSET", + "value": "" + }, + { + "key": "SELECTED_PURPOSE", + "value": "" + }, + { + "key": "TRANSFER_TOKEN", + "value": "" + }, + { + "key": "BPDM_PROVIDER_URL_PUBLIC", + "value": "https://edc-hostname/api/public", + "type": "string" + } + ] +} \ No newline at end of file