From e026c22e7b556eb56c7cf782075ebf1ffd76d6b1 Mon Sep 17 00:00:00 2001 From: Richard Treier Date: Fri, 13 Oct 2023 14:58:48 +0200 Subject: [PATCH] chore: prepare 5.0.0 release (#564) * chore: prepare release * fix: openapi.yaml, postman_collection.json Test Connector Remote for Eclipse EDC 0.2.1 * docs: fix API Wrapper documentation and client examples * docs: create deployment guides for 5.0.0 * chore: bump versions for local demo docker compose * chore: fix CHANGELOG.md structure * feat: add custom auth possibility to the java client * docs: fix asset creation and transfer initiation in docs * docs: migrate docs using the management api --- .env | 6 +- .github/ISSUE_TEMPLATE/release.md | 12 +- CHANGELOG.md | 120 +- docker-compose-dev.yaml | 8 +- docker-compose.yaml | 43 +- .../goals/local-demo/4.2.0/README.md | 63 + .../goals/local-demo/README.md | 4 +- .../goals/production/4.2.0/README.md | 14 +- .../production/4.2.0/public-endpoints.yaml | 2 +- .../goals/production/README.md | 175 +- .../goals/production/public-endpoints.yaml | 650 ++++++ ...i.yaml => eclipse-edc-management-api.yaml} | 1778 +++++++++-------- .../documentation/oauth-data-address.md | 143 +- .../documentation/parameterized_assets.md | 60 +- .../documentation/pull-data-transfer.md | 138 +- docs/postman_collection.json | 235 +-- docs/sovity-edc-api-wrapper.yaml | 1523 ++++++++++++++ .../migration/DatabaseMigrationManager.java | 28 +- extensions/wrapper/README.md | 46 +- .../edc/client/examples/EdcClientSetup.java | 7 +- .../edc/client/examples/GreetingResource.java | 14 +- .../client/examples/GreetingResourceTest.java | 14 +- .../clients/java-client/build.gradle.kts | 4 +- .../sovity/edc/client/EdcClientBuilder.java | 11 + .../sovity/edc/client/EdcClientFactory.java | 4 + .../package-lock.json | 67 +- .../typescript-client-example/package.json | 3 +- .../src/routes/+page.svelte | 2 +- .../wrapper/wrapper-api/build.gradle.kts | 11 +- .../edc/ext/wrapper/api/ApiInformation.java | 4 + .../edc/ext/wrapper/api/ui/UiResource.java | 4 +- .../model/InitiateCustomTransferRequest.java | 4 +- .../wrapper/wrapper-ee-api/build.gradle.kts | 2 + .../api/ee/EnterpriseEditionResource.java | 39 +- extensions/wrapper/wrapper/README.md | 17 +- .../ui/pages/asset/AssetApiServiceTest.java | 5 +- launchers/README.md | 6 +- ...st.java => ManagementApiTransferTest.java} | 2 +- ...st.java => Ms8ConnectorMigrationTest.java} | 2 +- .../e2e/connector/ConnectorRemote.java | 58 +- 40 files changed, 4001 insertions(+), 1327 deletions(-) create mode 100644 docs/deployment-guide/goals/local-demo/4.2.0/README.md create mode 100644 docs/deployment-guide/goals/production/public-endpoints.yaml rename docs/{openapi.yaml => eclipse-edc-management-api.yaml} (68%) create mode 100644 docs/sovity-edc-api-wrapper.yaml rename launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/{ConnectorTransferTest.java => ManagementApiTransferTest.java} (98%) rename launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/{Ms8ConnectorTransferTest.java => Ms8ConnectorMigrationTest.java} (99%) diff --git a/.env b/.env index 819edf029..a72e24464 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ # Env variables for docker-compose.yaml -EDC_IMAGE=ghcr.io/sovity/edc-dev:4.2.0 -TEST_BACKEND_IMAGE=ghcr.io/sovity/test-backend:4.2.0 -EDC_UI_IMAGE=ghcr.io/sovity/edc-ui:0.0.1-milestone-8-sovity13 +EDC_IMAGE=ghcr.io/sovity/edc-dev:5.0.0 +TEST_BACKEND_IMAGE=ghcr.io/sovity/test-backend:5.0.0 +EDC_UI_IMAGE=ghcr.io/sovity/edc-ui:2.0.0 EDC_UI_ACTIVE_PROFILE=sovity-open-source diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index aedfeca49..9de568cbe 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -12,13 +12,22 @@ assignees: "" Feel free to edit this release checklist in-progress depending on what tasks need to be done: -- [ ] Release [edc-ui](https://github.com/sovity/edc-ui), this might require several steps. +- [ ] Release [edc-ui](https://github.com/sovity/edc-ui), this might require several steps: _Link to EDC UI Release here_ - [ ] Decide a release version depending on major/minor/patch changes in the CHANGELOG.md. - [ ] Update this issue's title to the new version - [ ] `release-prep` PR: - [ ] Write or review the current [Productive Deployment Guide](https://github.com/sovity/edc-extensions/blob/main/docs/deployment-guide/goals/production) - [ ] Write or review the current [Development Deployment Guide](https://github.com/sovity/edc-extensions/blob/main/docs/deployment-guide/goals/development) - [ ] Write or review the current [Local Demo Deployment Guide](https://github.com/sovity/edc-extensions/blob/main/docs/deployment-guide/goals/local-demo) + - [ ] For Major version updates: If we want to continue supporting the old major version: + - [ ] Keep the old Productive Development Guide in a separate location. + - [ ] Add a note to the old version about its deprecation status. + - [ ] Add a Link the old version in the new version for discoverability. + - [ ] Check all links in the old version. + - [ ] Keep the old Productive Development Guide in a separate location. + - [ ] Add a note to the old version about its deprecation status. + - [ ] Add a Link the old version in the new version for discoverability. + - [ ] Check all links in the old version. - [ ] Update the CHANGELOG.md. - [ ] Add a clean `Unreleased` version. - [ ] Add the version to the old section. @@ -30,6 +39,7 @@ Feel free to edit this release checklist in-progress depending on what tasks nee - [ ] Write or review a release summary. - [ ] Write or review the compatible versions section. - [ ] Add a link to the EDC UI Release to the "EDC UI" section. + - [ ] Add a link to the EDC UI Release Deployment Migration Notes from the Deployment Migration section if the EDC UI has Deployment Migration Notes. - [ ] Remove empty sections from the patch notes. - [ ] Replace the existing `docker-compose.yaml` with `docker-compose-dev.yaml`. - [ ] Set the version for `EDC_IMAGE` of diff --git a/CHANGELOG.md b/CHANGELOG.md index f91f76e2d..99683c459 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,43 +4,91 @@ All notable changes to this project will be documented in this file. ## [x.x.x] - UNRELEASED -### Major Changes +### Overview + +### EDC UI + +### EDC Extensions -- Upgrade to core-EDC version `0.2.1` -- Now using the `Dataspace Protocol` -- Major changes to the management API - - Examples for the new requests are located in the postman collection in the `docs` folder - - The `OpenAPI` file has been updated to represent the EDC version `0.1.2` -- Reworked Deployment Guide & Docker-Compose: +#### Major Changes + +#### Minor Changes + +### Deployment Migration Notes + +#### Compatible Versions + +## [5.0.0] - 10.10.2023 + +### Overview + +Migration from Eclipse EDC Milestone 8 to Eclispe EDC 0.2.1. + +The API Wrapper and API Client Libraries can now be used to fully control a sovity EDC Connector. + +### EDC UI + +https://github.com/sovity/edc-ui/releases/tag/v2.0.0 + +### EDC Extensions + +#### Major Changes + +- Bump Eclipse EDC Version to `0.2.1`: + - Now using the Data Space Protocol (DSP) over the ~~IDS Protocol~~. + - Major changes to the Management API. See the postman collection / OpenAPI file. +- The Getting Started Docker Compose file is no longer to be used as reference for deployments: - The Getting Started Docker Compose file now launches connectors for local demo purposes. - For productive deployments, a detailed deployment guide has been added. - The Dev-Images now also require a PostgreSQL Database. -### Minor Changes +#### Minor Changes + +- All Connector UI Endpoints were migrated to our UI API Wrapper. New UI API Wrapper Endpoints: + - Asset Page + - Create Asset + - Delete Asset + - Catalog / Data Offers + - Contract Definition Page + - Contract Negotiation Start / Detail + - Create Contract Definition + - Delete Contract Definition + - Policy Definition Page + - Create Policy Definition + - Delete Policy Definition + - Dashboard Page +- New modules with common UI models and mappers for the Connector UI and Broker UI: `:extensions:wrapper:wrapper-common-api` and `:extensions:wrapper:wrapper-common-mappers`. +- New module with centralized Vocab and utilities for dealing with EDC / DCAT JSON-LD: `:utils:json-and-jsonld-utils` +- New module with utilities for parsing DCAT Catalog responses for use in the UI API Wrapper and the Broker Server: `:utils:catalog-parser` +- New modules with utilities for E2E Testing Connectors: `:utils:test-connector-remote` and `:extensions:test-backend-controller` + +#### Patch Changes + +- New modules in `:launchers:common` and `:launchers:connectors` so building different variants no longer requires separate builds. +- New module `:extensions:wrapper:wrapper-api` split from `:extensions:wrapper:wrapper` so integration tests in `wrapper` can use the Java Client Library. +- New JUnit E2E Tests in `:launchers:connectors:sovity-dev` that start two connectors and test the data exchange. -- UI API Wrapper Model: - - UiPolicy + PolicyMapper for EDC UI and Broker Server - - UiAsset + AssetMapper for EDC UI and Broker Server -- UI API Wrapper Endpoints: - - Asset Page - - Create Asset - - Delete Asset - - Catalog / Data Offers - - Contract Definition Page - - Contract Negotiation Create / By ID - - Create Contract Definition - - Delete Contract Definition - - Policy Definition Page - - Create Policy Definition - - Delete Policy Definition - - Dashboard Page -- DCAT Catalog Service: Parse DCAT Catalog responses for use in the UI API Wrapper and the Broker Server. -- JSON and JSON-LD Utilities: Centralized Vocab collection for dealing with EDC / DCAT JSON-LD - -### Migration Notes - -1. The Connector Endpoint changed to `https://[FQDN]/api/dsp`, used to be `https://[FQDN]/api/v1/ids/data`. -2. The `v1` Management API has been removed in favor of the `JSON-LD` `v2` Management API. All endpoints have a `v2` prefix now (example: `http://localhost:11002/api/v1/management/assets/request` is now available at `http://localhost:11002/api/management/v2/assets/request`) +### Deployment Migration Notes + +1. Deployment Migration Notes for the EDC UI: https://github.com/sovity/edc-ui/releases/tag/v2.0.0 +2. The Connector Endpoint changed to `https://[FQDN]/api/dsp` from ~~`https://[FQDN]/api/v1/ids/data`~~. +3. The Management Endpoint changed to `https://[FQDN]/api/management` from ~~`https://[FQDN]/api/v1/management`~~. +4. The `v1` Eclipse EDC Management API has been replaced by the Eclipse EDC `JSON-LD` `v2` Management API. Our Postman Collection shows some example requests. + However, a switch to our [API Wrapper](extensions/wrapper/README.md) is recommended. Despite our Use Case API Wrapper API still being in development, + the Connector UI API Wrapper is fully functional and can be used in concatenation with our type-safe generated API Client Libraries to both provide and + consume data offers. +5. The Connector now uses the Data Space Protocol (DSP) instead of the IDS Protocol. This requires different paths to be available from the internet. + Please refer to our deployment guide for more information. +6. If the old protocol endpoint required HTTP communication to pass as a workaround for a certain bug, this should be undone now, + with all protocol endpoints being secured by HTTPS/TLS. + +#### Compatible Versions + +- Connector Backend Docker Images: + - Dev EDC: `ghcr.io/sovity/edc-dev:5.0.0` + - sovity EDC CE: `ghcr.io/sovity/edc-ce:5.0.0` + - MDS EDC CE: `ghcr.io/sovity/edc-ce-mds:5.0.0` +- Connector UI Docker Image: `ghcr.io/sovity/edc-ui:2.0.0` ## [4.2.0] - 2023-09-01 @@ -52,7 +100,7 @@ MDS 1.2 release using MS8 EDC. - https://github.com/sovity/edc-ui/releases/tag/v0.0.1-milestone-8-sovity13 -### EDC-Extensions +### Detailed Changes #### Patch Changes @@ -64,7 +112,7 @@ MDS 1.2 release using MS8 EDC. - Connector Backend Docker Images: - Dev EDC: `ghcr.io/sovity/edc-dev:4.2.0` - - Sovity EDC CE: `ghcr.io/sovity/edc-ce:4.2.0` + - sovity EDC CE: `ghcr.io/sovity/edc-ce:4.2.0` - MDS EDC CE: `ghcr.io/sovity/edc-ce-mds:4.2.0` - Connector UI Docker Image: `ghcr.io/sovity/edc-ui:0.0.1-milestone-8-sovity13` @@ -99,7 +147,7 @@ Security improvements of container image and enhancements for the `ReferringConn - Connector Backend Docker Images: - Dev EDC: `ghcr.io/sovity/edc-dev:4.1.0` - - Sovity EDC CE: `ghcr.io/sovity/edc-ce:4.1.0` + - sovity EDC CE: `ghcr.io/sovity/edc-ce:4.1.0` - MDS EDC CE: `ghcr.io/sovity/edc-ce-mds:4.1.0` - Connector UI Docker Image: `ghcr.io/sovity/edc-ui:0.0.1-milestone-8-sovity12` @@ -127,7 +175,7 @@ No changes besides docker image versions. - Connector Backend Docker Images: - Dev EDC: `ghcr.io/sovity/edc-dev:4.0.1` - - Sovity EDC CE: `ghcr.io/sovity/edc-ce:4.0.1` + - sovity EDC CE: `ghcr.io/sovity/edc-ce:4.0.1` - MDS EDC CE: `ghcr.io/sovity/edc-ce-mds:4.0.1` - Connector UI Docker Image: `ghcr.io/sovity/edc-ui:0.0.1-milestone-8-sovity11` @@ -163,7 +211,7 @@ No changes besides docker image versions. - Connector Backend Docker Images: - Dev EDC: `ghcr.io/sovity/edc-dev:4.0.0` - - Sovity EDC CE: `ghcr.io/sovity/edc-ce:4.0.0` + - sovity EDC CE: `ghcr.io/sovity/edc-ce:4.0.0` - MDS EDC CE: `ghcr.io/sovity/edc-ce-mds:4.0.0` - Connector UI Docker Image: `ghcr.io/sovity/edc-ui:0.0.1-milestone-8-sovity9` diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml index cd8988e00..ebe7c476d 100644 --- a/docker-compose-dev.yaml +++ b/docker-compose-dev.yaml @@ -7,8 +7,8 @@ services: environment: - EDC_UI_ACTIVE_PROFILE=${EDC_UI_ACTIVE_PROFILE} - EDC_UI_CONFIG_URL=edc-ui-config - - EDC_UI_DATA_MANAGEMENT_API_URL=http://localhost:11002/api/management - - EDC_UI_DATA_MANAGEMENT_API_KEY=ApiKeyDefaultValue + - EDC_UI_MANAGEMENT_API_URL=http://localhost:11002/api/management + - EDC_UI_MANAGEMENT_API_KEY=ApiKeyDefaultValue - EDC_UI_CATALOG_URLS=http://edc2:11003/api/dsp edc: @@ -51,8 +51,8 @@ services: environment: - EDC_UI_ACTIVE_PROFILE=${EDC_UI_ACTIVE_PROFILE} - EDC_UI_CONFIG_URL=edc-ui-config - - EDC_UI_DATA_MANAGEMENT_API_URL=http://localhost:22002/api/management - - EDC_UI_DATA_MANAGEMENT_API_KEY=ApiKeyDefaultValue + - EDC_UI_MANAGEMENT_API_URL=http://localhost:22002/api/management + - EDC_UI_MANAGEMENT_API_KEY=ApiKeyDefaultValue - EDC_UI_CATALOG_URLS=http://edc:11003/api/dsp edc2: diff --git a/docker-compose.yaml b/docker-compose.yaml index 2cf589c4b..ebe7c476d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,20 +3,20 @@ services: edc-ui: image: ${EDC_UI_IMAGE} ports: - - '11000:80' + - '11000:8080' environment: - EDC_UI_ACTIVE_PROFILE=${EDC_UI_ACTIVE_PROFILE} - EDC_UI_CONFIG_URL=edc-ui-config - - EDC_UI_DATA_MANAGEMENT_API_URL=http://localhost:11002/api/v1/management - - EDC_UI_DATA_MANAGEMENT_API_KEY=ApiKeyDefaultValue - - EDC_UI_CATALOG_URLS=http://edc2:11003/api/v1/ids/data + - EDC_UI_MANAGEMENT_API_URL=http://localhost:11002/api/management + - EDC_UI_MANAGEMENT_API_KEY=ApiKeyDefaultValue + - EDC_UI_CATALOG_URLS=http://edc2:11003/api/dsp edc: image: ${EDC_IMAGE} depends_on: - postgresql environment: - MY_EDC_NAME_KEBAB_CASE: "example-connector" + MY_EDC_NAME_KEBAB_CASE: "my-edc" MY_EDC_TITLE: "EDC Connector" MY_EDC_DESCRIPTION: "sovity Community Edition EDC Connector" MY_EDC_CURATOR_URL: "https://example.com" @@ -25,7 +25,7 @@ services: MY_EDC_MAINTAINER_NAME: "sovity GmbH" MY_EDC_FQDN: "edc" - EDC_API_AUTH_KEY: ApiKeyDefaultValue # Management API Key + EDC_API_AUTH_KEY: ApiKeyDefaultValue MY_EDC_JDBC_URL: jdbc:postgresql://postgresql:5432/edc MY_EDC_JDBC_USER: edc @@ -33,7 +33,7 @@ services: # docker compose local dev environment overrides (don't use with non-dev images) MY_EDC_PROTOCOL: "http://" - MY_EDC_IDS_BASE_URL: "http://edc:11003" + EDC_DSP_CALLBACK_ADDRESS: http://edc:11003/api/dsp EDC_WEB_REST_CORS_ENABLED: 'true' EDC_WEB_REST_CORS_HEADERS: 'origin,content-type,accept,authorization,X-Api-Key' EDC_WEB_REST_CORS_ORIGINS: '*' @@ -43,27 +43,25 @@ services: - '11003:11003' - '11004:11004' - '11005:5005' - volumes: - - ./docs/getting-started/secrets:/secrets edc-ui2: image: ${EDC_UI_IMAGE} ports: - - '22000:80' + - '22000:8080' environment: - EDC_UI_ACTIVE_PROFILE=${EDC_UI_ACTIVE_PROFILE} - EDC_UI_CONFIG_URL=edc-ui-config - - EDC_UI_DATA_MANAGEMENT_API_URL=http://localhost:22002/api/v1/management - - EDC_UI_DATA_MANAGEMENT_API_KEY=ApiKeyDefaultValue - - EDC_UI_CATALOG_URLS=http://edc:11003/api/v1/ids/data + - EDC_UI_MANAGEMENT_API_URL=http://localhost:22002/api/management + - EDC_UI_MANAGEMENT_API_KEY=ApiKeyDefaultValue + - EDC_UI_CATALOG_URLS=http://edc:11003/api/dsp edc2: image: ${EDC_IMAGE} depends_on: - postgresql2 environment: - MY_EDC_NAME_KEBAB_CASE: "edc2" - MY_EDC_TITLE: "EDC Connector" + MY_EDC_NAME_KEBAB_CASE: "my-edc2" + MY_EDC_TITLE: "EDC Connector 2" MY_EDC_DESCRIPTION: "sovity Community Edition EDC Connector" MY_EDC_CURATOR_URL: "https://example.com" MY_EDC_CURATOR_NAME: "Example GmbH" @@ -71,7 +69,7 @@ services: MY_EDC_MAINTAINER_NAME: "sovity GmbH" MY_EDC_FQDN: "edc2" - EDC_API_AUTH_KEY: ApiKeyDefaultValue # Management API Key + EDC_API_AUTH_KEY: ApiKeyDefaultValue MY_EDC_JDBC_URL: jdbc:postgresql://postgresql2:5432/edc MY_EDC_JDBC_USER: edc @@ -79,7 +77,7 @@ services: # docker compose local dev environment overrides (don't use with non-dev images) MY_EDC_PROTOCOL: "http://" - MY_EDC_IDS_BASE_URL: "http://edc2:11003" + EDC_DSP_CALLBACK_ADDRESS: http://edc2:11003/api/dsp EDC_WEB_REST_CORS_ENABLED: 'true' EDC_WEB_REST_CORS_HEADERS: 'origin,content-type,accept,authorization,X-Api-Key' EDC_WEB_REST_CORS_ORIGINS: '*' @@ -89,8 +87,6 @@ services: - '22003:11003' - '22004:11004' - '22005:5005' - volumes: - - ./docs/getting-started/secrets:/secrets postgresql: image: docker.io/bitnami/postgresql:11 @@ -100,7 +96,7 @@ services: POSTGRESQL_PASSWORD: edc POSTGRESQL_DATABASE: edc ports: - - '11543:5432' + - '54321:5432' volumes: - 'postgresql:/bitnami/postgresql' @@ -112,10 +108,15 @@ services: POSTGRESQL_PASSWORD: edc POSTGRESQL_DATABASE: edc ports: - - '22543:5432' + - '54322:5432' volumes: - 'postgresql2:/bitnami/postgresql' + test-backend: + image: ${TEST_BACKEND_IMAGE} + ports: + - '33001:11001' + volumes: postgresql: driver: local diff --git a/docs/deployment-guide/goals/local-demo/4.2.0/README.md b/docs/deployment-guide/goals/local-demo/4.2.0/README.md new file mode 100644 index 000000000..d01a005a3 --- /dev/null +++ b/docs/deployment-guide/goals/local-demo/4.2.0/README.md @@ -0,0 +1,63 @@ +Deployment Goal: Local Demo +======== +> This is for an old major version sovity EDC CE 4.2.0. [Go back](../README.md) + +> On how to deploy a productive connector with joining an existing Data Space, please refer +> to our [Productive Deployment Guide](../../production/4.2.0/README.md). + +## Quick Start + +To quickly start using our sovity EDC CE or MDS EDC CE, we offer a quick +start [docker-compose.yaml](https://github.com/sovity/edc-extensions/blob/v4.2.0/docker-compose.yaml) file. + + + + + + + + + + + + + + +
Launch two sovity EDC CE ConnectorsLaunch two MDS EDC CE
+ +```shell script +# Run with Bash from the root directory of the project +# Use the release tag 4.2.0: https://github.com/sovity/edc-extensions/releases/tag/v4.2.0 + +# Log-In to the Github Container Registry +docker login ghcr.io + +# Start sovity EDC Connectors +docker compose up +``` + + + +```shell script +# Run with Bash from the root directory of the project +# Use the release tag 4.2.0: https://github.com/sovity/edc-extensions/releases/tag/v4.2.0 + +# Log-In to the Github Container Registry +docker login ghcr.io + +# Start MDS EDC Connectors +EDC_UI_ACTIVE_PROFILE=mds-open-source docker compose up +``` + +
+ +## Quick Start: Default Configuration + +The default configuration launches two local EDC Connectors with the following credentials: + +| | First Connector | Second Connector | +|---------------------|---------------------------------------------------------------|:------------------------------------------------------------------------| +| Homepage | http://localhost:11000 | http://localhost:22000 | +| Management Endpoint | http://localhost:11002/api/management | http://localhost:22002/api/management | +| Management API Key | `ApiKeyDefaultValue` | `ApiKeyDefaultValue` | +| Connector Endpoint | http://edc:11003/api/dsp
Requires Docker Compose Network | http://edc2:22003/api/dsp
Requires Docker Compose Network | diff --git a/docs/deployment-guide/goals/local-demo/README.md b/docs/deployment-guide/goals/local-demo/README.md index b453ec54b..8fcd66bbd 100644 --- a/docs/deployment-guide/goals/local-demo/README.md +++ b/docs/deployment-guide/goals/local-demo/README.md @@ -1,8 +1,10 @@ Deployment Goal: Local Demo ======== +> This is for our latest version. There is another guide for [4.2.0](4.2.0/README.md). + > On how to deploy a productive connector with joining an existing Data Space, please refer -> to our [Productive Deployment Guide](../production). +> to our [Productive Deployment Guide](../production/README.md). ## Quick Start diff --git a/docs/deployment-guide/goals/production/4.2.0/README.md b/docs/deployment-guide/goals/production/4.2.0/README.md index 07d970e24..ef17248f0 100644 --- a/docs/deployment-guide/goals/production/4.2.0/README.md +++ b/docs/deployment-guide/goals/production/4.2.0/README.md @@ -1,6 +1,8 @@ -Deployment Goal: Production (EDC CE 4.2.0) +Deployment Goal: Production ======== +> This is for an old major version sovity EDC CE 4.2.0. [Go back](../README.md) + ## About this Guide This is a productive deployment guide for self-hosting a functional sovity CE EDC Connector or MDS CE EDC Connector. @@ -37,9 +39,9 @@ The EDC Backend opens up multiple ports with different functionalities. They are proxy (at least the protocol endpoint needs to be). - The sovity EDC Connector is meant to be deployed with a reverse proxy merging the following ports: - - The UI's `80` port. Henceforth called the UI. - - The Backend's `11002` port. Henceforth called the Management API. - - The Backend's `11003` port. Henceforth called the Protocol API. + - The UI's `80` port. Henceforth, called the UI. + - The Backend's `11002` port. Henceforth, called the Management API. + - The Backend's `11003` port. Henceforth, called the Protocol API. - The mapping should look like this: - `/api/v1/ids` -> `edc:11003/api/v1/ids` - `/api/v1/management` -> `edc:11002/api/v1/management` @@ -56,7 +58,7 @@ proxy (at least the protocol endpoint needs to be). Authority / DAPS and the configured certificates. - Exposing to the internet: - The Protocol API must be reachable via the internet. The required endpoints can be found in - this [ms8-public-endpoints.yaml](public-endpoints.yaml) + this [public-endpoints.yaml](public-endpoints.yaml) - Exposing the UI or the Management Endpoint to the internet requires an intermediate auth proxy. ## EDC UI Configuration @@ -71,7 +73,7 @@ EDC_UI_ACTIVE_PROFILE: sovity-open-source (or mds-open-source) EDC_UI_DATA_MANAGEMENT_API_URL: https://[EDC URL]/api/v1/management # Management API Key -EDC_API_AUTH_KEY: "ApiKeyDefaultValue" +EDC_UI_DATA_MANAGEMENT_API_KEY: "ApiKeyDefaultValue" # Enable config fetching from the backend EDC_UI_CONFIG_URL: "edc-ui-config" diff --git a/docs/deployment-guide/goals/production/4.2.0/public-endpoints.yaml b/docs/deployment-guide/goals/production/4.2.0/public-endpoints.yaml index 317ae181c..421213278 100644 --- a/docs/deployment-guide/goals/production/4.2.0/public-endpoints.yaml +++ b/docs/deployment-guide/goals/production/4.2.0/public-endpoints.yaml @@ -4,7 +4,7 @@ info: description: Required publicly exposed EDC Connector endpoints version: 4.2.0 servers: - - url: https://your-edc + - url: https://[MY_EDC_FQDN] tags: - name: Protocol API description: Port 11003 on the Backend Container. diff --git a/docs/deployment-guide/goals/production/README.md b/docs/deployment-guide/goals/production/README.md index d078a13e4..0d7fe8253 100644 --- a/docs/deployment-guide/goals/production/README.md +++ b/docs/deployment-guide/goals/production/README.md @@ -1,6 +1,177 @@ Productive Deployment Guide ======== -> For deploying our latest release `4.2.0`, please refer to our [Deployment Guide 4.2.0](4.2.0/README.md). +> This is for our latest version. There is another guide for [4.2.0](4.2.0/README.md). + +## About this Guide + +This is a productive deployment guide for self-hosting a functional sovity CE EDC Connector or MDS CE EDC Connector. + +## Requirements + +A productive EDC Connector deployment has strict requirements, with slight errors in configuration already causing +contract negotiations / data transfer to fail. + +In general a productive EDC Connector requires a DAPS Server, DAPS Credentials, a reverse proxy configured in detail due +to technical reasons, reachability via the internet and well-defined URLs across all configurations. + +## Deployment Units + +To deploy an EDC multiple deployment units must be deployed and configured. + +| Deployment Unit | Version / Details | +|----------------------------------------------------------------|---------------------------------------------------------------------------------------------| +| An Auth Proxy / Auth solution of your choice. | (deployment specific, required to secure UI and management API) | +| Reverse Proxy that merges the UI+Backend and removes the ports | (deployment specific) | +| Postgresql | 13 or compatible version | +| EDC Backend | edc-ce or edc-ce-mds, see [CHANGELOG.md](../../../../CHANGELOG.md) for compatible versions. | +| EDC UI | edc-ui, see [CHANGELOG.md](../../../../CHANGELOG.md) for compatible versions. | + +## Configuration + +### Reverse Proxy Configuration + +To make the deployment work, the connector needs to be exposed to the internet. Connector-to-Connector +communication is asynchronous and done with authentication via the DAPS. Thus, if the target connector cannot reach +your connector under its self-declared URLs, contract negotiation and transfer processes will fail. + +The EDC Backend opens up multiple ports with different functionalities. They are expected to be merged by a reverse +proxy (at least the protocol endpoint needs to be). + +- The sovity EDC Connector is meant to be deployed with a reverse proxy merging the following ports: + - The UI's `8080` port. Henceforth, called the UI. + - The Backend's `11002` port. Henceforth, called the Management API. + - The Backend's `11003` port. Henceforth, called the Protocol API. +- The mapping should look like this: + - `/api/dsp` -> `edc:11003/api/dsp` + - `/api/management` -> `edc:11002/api/management` + - All other requests should be mapped to `edc-ui:80` +- Regarding TLS/HTTPS: + - All endpoints need to be secured by TLS/HTTPS. A productive connector won't work without it. + - All endpoint should have HTTP to HTTPS redirects. +- Regarding Authentication: + - The UI and the Management API need to be secured by an auth proxy. Otherwise, access to either would mean full + control of the application. + - The backend's `11003` port needs to be unsecured. Authentication between connectors is done via the Data Space + Authority / DAPS and the configured certificates. +- Exposing to the internet: + - The Protocol API must be reachable via the internet. The required endpoints can be found in + this [public-endpoints.yaml](public-endpoints.yaml) + - Exposing the UI or the Management Endpoint to the internet requires an intermediate auth proxy. + +## EDC UI Configuration + +A sovity EDC UI deployment requires the following config properties: + +```yaml +# Active Profile +EDC_UI_ACTIVE_PROFILE: sovity-open-source (or mds-open-source) + +# Management API URL +EDC_UI_MANAGEMENT_API_URL: https://[EDC URL]/api/management + +# Management API Key +EDC_UI_MANAGEMENT_API_KEY: "ApiKeyDefaultValue" + +# Enable config fetching from the backend +EDC_UI_CONFIG_URL: "edc-ui-config" +``` + +## EDC Backend Configuration + +A sovity EDC CE or MDS EDC CE Backend deployment requires: + +- A running DAPS +- (MDS Only) A running Clearing House +- DAPS Access + and [a generated SKI/AKI pair and .jks file](#faq) +- The following configuration properties + +> [!WARNING] +> Please be careful with overriding any of the ENV Vars set in our [launchers/.env](../../../../launchers/.env). Our +> defaults +> will respect overrides, and the Core EDC ENV Vars can be in some cases sensitive to edge cases such as trailing +> slashes. + +```yaml +# Connector Host Name +MY_EDC_FQDN: "my-edc-deployment1.example.com" + +# Connector Technical Name +MY_EDC_NAME_KEBAB_CASE: "example-connector" + +# Connector Localized Name / Title +MY_EDC_TITLE: "EDC Connector" + +# Connector Description Text +MY_EDC_DESCRIPTION: "sovity Community Edition EDC Connector" + +# Connector Curator +# The company using the EDC Connector, configuring data offers, etc. +MY_EDC_CURATOR_URL: "https://example.com" +MY_EDC_CURATOR_NAME: "Example GmbH" + +# Database Connection +MY_EDC_JDBC_URL: jdbc:postgresql://postgresql:5432/edc +MY_EDC_JDBC_USER: edc +MY_EDC_JDBC_PASSWORD: edc + +# Management API Key +EDC_API_AUTH_KEY: ApiKeyDefaultValue + +# Connector Maintainer +# The company hosting the EDC Connector +MY_EDC_MAINTAINER_URL: "https://sovity.de" +MY_EDC_MAINTAINER_NAME: "sovity GmbH" + +# (MDS Only) Clearing House +EDC_CLEARINGHOUSE_LOG_URL: 'https://clearing.test.mobility-dataspace.eu/messages/log' + +# DAPS URL +EDC_OAUTH_TOKEN_URL: 'https://daps.test.mobility-dataspace.eu/token' +EDC_OAUTH_PROVIDER_JWKS_URL: 'https://daps.test.mobility-dataspace.eu/jwks.json' + +# DAPS Credentials +EDC_OAUTH_CLIENT_ID: '_your SKI/AKI_' +EDC_KEYSTORE: '_path to .jks file in container_' +EDC_KEYSTORE_PASSWORD: '_your keystore password_' +EDC_OAUTH_CERTIFICATE_ALIAS: 1 +EDC_OAUTH_PRIVATE_KEY_ALIAS: 1 +``` + +## FAQ + +### What should the client ID entry look like? + +Example of a client-ID entry: + +`EDC_OAUTH_CLIENT_ID: 7X:7Y:...:B2:94:keyid:6A:2B:...:28:80` + +### How do you get the SKI and AKI of a p12 and how do you convert it to a jks? + +You can use a script (if you're on WSL or Linux) to generate the SKI, AKI and jks file. + +1. Make sure you're on Linux or on a bash console (e.g. WSL or Git Bash) and have openssl and keytool installed +2. Navigate in the console to the resources/docs directory +3. Run the [script](./generate_ski_aki.sh) `./generate_ski_aki.sh [filepath].p12 [password]` and + substitute `[filepath]` to the p12 certificate + filepath and `[password]` to the certificate password +4. The jks file will be generated in the same folder as your p12 file and the SKI/AKI combination is printed out in the + console. + Copy the SKI:AKI combination and use it to start the EDC (optionally also save it to your password manager). +5. The generated `.jks` file needs to be mounted into your productive running container. + +### Can I run a connector locally and consume data from an online connector? + +No, locally run connectors cannot exchange data with online connectors. A connector must have a proper URL + +configuration and be accesible from the data provider via REST calls. + +### (MDS Only) Can I disable the ClearingHouse-Client-Extension? + +Yes, it can still be disabled via configuration: + +```yaml +# Extension Configuration +CLEARINGHOUSE_CLIENT_EXTENSION_ENABLED: false # enabled by default +``` -The deployment guide for our future `5.0.0` release with Core EDC 0.2.x is still under construction. diff --git a/docs/deployment-guide/goals/production/public-endpoints.yaml b/docs/deployment-guide/goals/production/public-endpoints.yaml new file mode 100644 index 000000000..c3ae39932 --- /dev/null +++ b/docs/deployment-guide/goals/production/public-endpoints.yaml @@ -0,0 +1,650 @@ +openapi: 3.0.1 +info: + title: sovity EDC CE Public Endpoints + version: 5.0.0 + description: | + These are the required publicly exposed endpoints on our sovity EDC Community Edition Connectors. + + As the Eclipse EDC Connectors uses Data Space Protocol (DSP) for connector-to-connector communication, this includes all protocol endpoints. + + Please note that the DSP HTTP endpoints use JSON-LD documents, which must be semantically interpreted and thus cannot be represented correctly via OpenAPI. + + Links: + - [DSP Version 0.8 Full Specification](https://github.com/International-Data-Spaces-Association/ids-specification/tree/v0.8) + - [DSP Version 0.8 HTTP OpenAPI](https://github.com/boschresearch/py-cx-ids/blob/ed62e4ad92e4715551e081a9d27f58ea6919faaa/pycxids/core/http_binding/http_binding_openapi.yaml) by Matthias Binzer + license: + name: "Apache 2.0" + url: "http://www.apache.org/licenses/LICENSE-2.0.html" +servers: + - url: https://[MY_EDC_FQDN]/api/dsp +tags: + - name: "Catalog" + description: "Catalog endpoints" + + - name: "Negotiation" + description: "Negotiation Process - Provider side" + + - name: "Negotiation Callbacks" + description: "Negotiation Process Callbacks - Consumer side" + + - name: "Transfer" + description: "Transfer Process" + +paths: + /catalog/request: + post: + tags: + - "Catalog" + requestBody: + required: True + content: + application/json: + schema: + $ref: "#/components/schemas/CatalogRequestMessage" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DcatCatalog" + description: "Result" + /catalog/datasets/{id}: + get: + tags: + - "Catalog" + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + "200": + description: "Result" + content: + application/json: + schema: + $ref: "#/components/schemas/DcatDataset" + + /negotiations/{id}: + get: + tags: + - "Negotiation" + parameters: + - name: id + in: path + required: true + schema: + type: string + responses: + "200": + description: "Result" + content: + application/json: + schema: + $ref: "#/components/schemas/ContractNegotiation" + + /negotiations/request: + post: + tags: + - "Negotiation" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ContractRequestMessage" + responses: + "201": + description: "The provider connector must return an HTTP 201 (Created) response with the location header set to the location of the contract negotiation and a body containing the ContractNegotiation message" + content: + application/json: + schema: + $ref: "#/components/schemas/ContractNegotiation" + /negotiations/{id}/request: + post: + tags: + - "Negotiation" + description: "The consumer must include the processId. The consumer must include either the offer or offerId property." + parameters: + - name: id + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ContractRequestMessage" + responses: + "200": + description: "If the message is successfully processed, the provider connector must return and HTTP 200 (OK) response. The response body is not specified and clients are not required to process it." + /negotiations/{id}/events: + post: + tags: + - "Negotiation" + description: "The consumer must include the processId. The consumer must include either the offer or offerId property." + parameters: + - name: id + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ContractNegotiationEventMessage" + responses: + "200": + description: "Result" + /negotiations/{id}/agreement/verification: + post: + tags: + - "Negotiation" + description: "TODO" + parameters: + - name: id + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ContractAgreementVerificationMessage" + responses: + "200": + description: "Result" + /negotiations/{id}/termination: + post: + tags: + - "Negotiation" + description: "TODO" + parameters: + - name: id + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ContractNegotiationTerminationMessage" + responses: + "200": + description: "Result" + + /negotiations/{id}/offer: + post: + tags: + - "Negotiation Callbacks" + description: "Callback on the Consumer side" + parameters: + - name: id + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ContractOfferMessage" + responses: + "200": + description: "Result" + /negotiations/{id}/agreement: + post: + tags: + - "Negotiation Callbacks" + description: "Callback on the Consumer side" + parameters: + - name: id + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/ContractAgreementMessage" + responses: + "200": + description: "Result" + + /transfers/request: + post: + tags: + - "Transfer" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransferRequestMessage" + responses: + "201": + description: "The provider connector must return an HTTP 201 (Created) response with the location header set to the location of the transfer process and a body containing the TransferProcess message" + content: + application/json: + schema: + $ref: "#/components/schemas/TransferProcess" + + +components: + schemas: + + DspaceFilter: + type: object + + CatalogRequestMessage: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + description: "TODO: not finished yet" + properties: + "@type": + type: string + default: "dspace:CatalogRequestMessage" + filter: + $ref: "#/components/schemas/DspaceFilter" + + ContractRequestMessage: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + description: "TODO: not finished yet" + properties: + "@type": + type: string + default: "dspace:ContractRequestMessage" + dspace:dataset: + type: string + description: "@id of the dataset" + dspace:dataSet: + type: string + description: "Only there for compatibility reasons. Seems to be a type in the spec" + dspace:processId: + type: string + description: "TODO: Deprecated? To be removed?" + dspace:offer: + $ref: "#/components/schemas/OdrlOffer" + dspace:callbackAddress: + type: string + + ContractNegotiationEventMessage: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + description: "TODO: not finished yet" + properties: + "@type": + type: string + default: "dspace:ContractNegotiationEventMessage" + "dspace:processId": + type: string + "dspace:eventType": + type: string + enum: + - "https://w3id.org/dspace/v0.8/FINALIZED" + - "https://w3id.org/dspace/v0.8/ACCEPTED" + - "https://w3id.org/dspace/v0.8/TERMINATED" + + ContractAgreementVerificationMessage: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + description: "TODO: not finished yet" + properties: + "@type": + type: string + default: "dspace:ContractAgreementVerificationMessage" + "dspace:processId": + type: string + + ContractNegotiationTerminationMessage: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + description: "TODO: not finished yet" + properties: + "@type": + type: string + default: "dspace:ContractNegotiationTerminationMessage" + "dspace:processId": + type: string + "dspace:code": + type: string + description: "TODO: not documented?" + "dspace:reason": + description: "TODO: can be a link / @id too" + type: array + items: + $ref: "#/components/schemas/LanguageValue" + + ContractOfferMessage: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + description: "Used for Tranistion Requested -> Offered from Provider -> Consumer Callback endpoint" + properties: + "@type": + type: string + default: "dspace:ContractOfferMessage" + dspace:processId: + type: string + dspace:offer: + $ref: "#/components/schemas/OdrlOffer" + dspace:callbackAddress: + type: string + + ContractAgreementMessage: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + description: "Used for Tranistion Requested -> Agreed from Provider -> Consumer Callback endpoint" + properties: + "@type": + type: string + default: "dspace:ContractAgreementMessage" + dspace:processId: + type: string + dspace:agreement: + $ref: "#/components/schemas/OdrlAgreement" + dspace:callbackAddress: + type: string + + + ContractNegotiation: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + properties: + "@type": + type: string + default: "dspace:ContractNegotiation" + "dspace:processId": + type: string + "dspace:state": + $ref: "#/components/schemas/TransferState" + + TransferRequestMessage: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + description: "Used for Transfer Tranistion Start -> Requested from Consumer -> Provider" + properties: + "@type": + type: string + default: "dspace:TransferRequestMessage" + dspace:agreementId: + type: string + description: "The agreementId property refers to an existing contract agreement between the consumer and provider." + dct:format: + type: string + description: "The dct:format property is a format specified by a Distribution for the Asset associated with the agreement. This is generally obtained from the provider Catalog." + dspace:dataAddress: + type: string + description: "The dataAddress property must only be provided if the dct:format requires a push transfer." + dspace:callbackAddress: + type: string + + TransferStartMessage: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + description: "Used for Transfer Tranistion Requested -> Started from Provider -> Consumer" + properties: + "@type": + type: string + default: "dspace:TransferStartMessage" + dspace:processId: + type: string + dspace:dataAddress: + oneOf: + - type: object + additionalProperties: + type: string + - type: string + + TransferProcess: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + properties: + "@type": + type: string + default: "dspace:TransferProcess" + dspace:processId: + type: string + dspace:state: + $ref: "#/components/schemas/TransferState" + + NegotiationState: + type: string + enum: + - REQUESTED + - OFFERED + - ACCEPTED + - AGREED + - VERIFIED + - FINALIZED + - TERMINATED + + TransferState: + type: string + enum: + - REQUESTED + - STARTED + - TERMINATED + - COMPLETED + - SUSPENDED + + + LanguageValue: + type: object + properties: + "@value": + type: string + "@language": + type: string + + JsonLd: + type: object + properties: + "@context": + type: object + items: + type: string + default: { + "dct": "https://purl.org/dc/terms/", + "tx": "https://w3id.org/tractusx/v0.0.1/ns/", + "edc": "https://w3id.org/edc/v0.0.1/ns/", + "dcat": "https://www.w3.org/ns/dcat/", + "odrl": "http://www.w3.org/ns/odrl/2/", + "dspace": "https://w3id.org/dspace/v0.8/" + } + "@id": + type: string + + + DcatDataset: + type: object + properties: + "@id": + type: string + "@type": + type: string + default: "dcat:Dataset" + dct:title: + type: string + dct:description: + type: string + dct:keyword: + type: array + items: + type: string + odrl:hasPolicy: + type: array + items: + $ref: "#/components/schemas/OdrlPolicy" + dcat:distribution: + $ref: "#/components/schemas/DcatDistribution" + + DcatCatalog: + allOf: + - $ref: "#/components/schemas/JsonLd" + - type: object + properties: + "@type": + type: string + default: "dcat:Catalog" + "dct:title": + type: string + "dct:publisher": + type: string + "dcat:keyword": + type: array + items: + type: string + dcat:service: + $ref: "#/components/schemas/DcatService" + dcat:dataset: + type: array + items: + $ref: "#/components/schemas/DcatDataset" + default: [] + + DcatDistribution: + type: object + properties: + "@type": + type: string + dct:format: + type: string + dcat:accessService: + type: string + + DcatService: + type: object + properties: + "@id": + type: string + "@type": + type: string + dct:terms: + type: string + dct:endpointUrl: + type: string + + + OdrlOperand: + type: object + properties: + value: + type: string + OdrlConstraint: + type: object + properties: + odrl:leftOperand: + $ref: "#/components/schemas/OdrlOperand" + odrl:rightOperand: + $ref: "#/components/schemas/OdrlOperand" + odrl:operator: + type: string + + Action: + type: object + properties: + odrl:type: + type: string + + OdrlRule: + type: object + properties: + odrl:action: + oneOf: + - type: string + - $ref: "#/components/schemas/Action" + odrl:constraint: + $ref: "#/components/schemas/OdrlConstraint" + odrl:duty: + type: array + items: + type: string # TODO: what is this exactly? + OdrlPolicy: + description: "In IDS http binding explicitly does NOT have a target, because this is derived from the enclosing context!" + type: object + properties: + "@id": + type: string + "@type": + type: string + default: "odrl:Policy" + odrl:permission: + oneOf: + - $ref: "#/components/schemas/OdrlRule" + - type: array + items: + $ref: "#/components/schemas/OdrlRule" + odrl:prohibition: + oneOf: + - $ref: "#/components/schemas/OdrlRule" + - type: array + items: + $ref: "#/components/schemas/OdrlRule" + odrl:obligation: + oneOf: + - $ref: "#/components/schemas/OdrlRule" + - type: array + items: + $ref: "#/components/schemas/OdrlRule" + OdrlOffer: + description: "Only addition compared to the Policy: the target field" + allOf: + - $ref: "#/components/schemas/OdrlPolicy" + - type: object + properties: + "@type": + type: string + default: "odrl:Offer" + odrl:target: + type: string + OdrlAgreement: + description: "Agreement" + allOf: + - $ref: "#/components/schemas/OdrlPolicy" + - type: object + properties: + "@type": + type: string + default: "odrl:Agreement" + odrl:target: + type: string + dspace:timestamp: + oneOf: + - $ref: "#/components/schemas/DspaceTimestamp" + - type: string + dspace:consumerId: + type: string + dspace:providerId: + type: string + DspaceTimestamp: + description: "xsd:dateTime" + properties: + "@type": + type: string + default: "xsd:dateTime" + "@value": + type: string \ No newline at end of file diff --git a/docs/openapi.yaml b/docs/eclipse-edc-management-api.yaml similarity index 68% rename from docs/openapi.yaml rename to docs/eclipse-edc-management-api.yaml index 92b4b02b4..181094d05 100644 --- a/docs/openapi.yaml +++ b/docs/eclipse-edc-management-api.yaml @@ -1,26 +1,10 @@ openapi: 3.0.1 info: - title: EDC REST API - description: EDC REST APIs - merged by OpenApiMerger - version: 0.1.2-SNAPSHOT + title: management-api + description: REST API documentation for the Eclipse EDC management-api. This does not include endpoints of the sovity EDC API Wrapper. + version: 0.2.1 servers: - - url: / -tags: - - name: Data Plane control API - description: 'Api targeted by the Control Plane to delegate a data transfer (Provider - Push or Streaming) to the Data Plane after the contract has been successfully - negotiated and agreed between the two participants. ' - - name: Data Plane public API - description: "The public API of the Data Plane is a data proxy enabling a data consumer\ - \ to actively querydata from the provider data source (e.g. backend Rest API,\ - \ internal database...) through its Data Planeinstance. Thus the Data Plane is\ - \ the only entry/output door for the data, which avoids the provider to exposedirectly\ - \ its data externally.The Data Plane public API being a proxy, it supports all\ - \ verbs (i.e. GET, POST, PUT, PATCH, DELETE), whichcan then conveyed until the\ - \ data source is required. This is especially useful when the actual data sourceis\ - \ a Rest API itself.In the same manner, any set of arbitrary query parameters,\ - \ path parameters and request body are supported (in the limits fixed by the HTTP\ - \ server) and can also conveyed to the actual data source." + - url: https://[MY_EDC_FQDN]/api/management paths: /callback/{processId}/deprovision: post: @@ -45,7 +29,7 @@ paths: default: description: default response content: - application/json: {} + application/json: { } /callback/{processId}/provision: post: tags: @@ -69,7 +53,7 @@ paths: default: description: default response content: - application/json: {} + application/json: { } /check/health: get: tags: @@ -83,10 +67,7 @@ paths: content: application/json: schema: - type: array - example: null - items: - $ref: '#/components/schemas/HealthStatus' + $ref: '#/components/schemas/HealthStatus' /check/liveness: get: tags: @@ -100,10 +81,7 @@ paths: content: application/json: schema: - type: array - example: null - items: - $ref: '#/components/schemas/HealthStatus' + $ref: '#/components/schemas/HealthStatus' /check/readiness: get: tags: @@ -117,10 +95,7 @@ paths: content: application/json: schema: - type: array - example: null - items: - $ref: '#/components/schemas/HealthStatus' + $ref: '#/components/schemas/HealthStatus' /check/startup: get: tags: @@ -134,170 +109,32 @@ paths: content: application/json: schema: - type: array - example: null - items: - $ref: '#/components/schemas/HealthStatus' - /instances: - get: - tags: - - Dataplane Selector - operationId: getAll - responses: - default: - description: default response - content: - application/json: - schema: - type: array - example: null - items: - $ref: '#/components/schemas/DataPlaneInstance' - post: - tags: - - Dataplane Selector - operationId: addEntry - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataPlaneInstance' - responses: - default: - description: default response - content: - application/json: {} - /instances/select: + $ref: '#/components/schemas/HealthStatus' + /select: post: tags: - Dataplane Selector + description: Finds the best fitting data plane instance for a particular query operationId: find requestBody: content: - application/json: - schema: - $ref: '#/components/schemas/SelectionRequest' - responses: - default: - description: default response - content: - application/json: - schema: - $ref: '#/components/schemas/DataPlaneInstance' - /token: - get: - tags: - - Consumer Pull Token Validation - description: "Checks that the provided token has been signed by the present\ - \ entity and asserts its validity. If token is valid, then the data address\ - \ contained in its claims is decrypted and returned back to the caller." - operationId: validate - parameters: - - name: Authorization - in: header - required: true - style: simple - explode: false - schema: - type: string - example: null - responses: - "200": - description: Token is valid - "400": - description: Request was malformed - "403": - description: Token is invalid - /transfer: - post: - tags: - - Data Plane control API - description: Initiates a data transfer for the given request. The transfer will - be performed asynchronously. - operationId: initiateTransfer - requestBody: - content: - application/json: + '*/*': schema: - $ref: '#/components/schemas/DataFlowRequest' + $ref: '#/components/schemas/SelectionRequestSchema' responses: "200": - description: Data transfer initiated - "400": - description: Failed to validate request - /transfer/{processId}: - get: - tags: - - Data Plane control API - description: Get the current state of a data transfer. - operationId: getTransferState - parameters: - - name: processId - in: path - required: true - style: simple - explode: false - schema: - type: string - example: null - responses: - "200": - description: Missing access token - /transferprocess/{processId}/complete: - post: - tags: - - Transfer Process Control Api - description: "Requests completion of the transfer process. Due to the asynchronous\ - \ nature of transfers, a successful response only indicates that the request\ - \ was successfully received" - operationId: complete - parameters: - - name: processId - in: path - required: true - style: simple - explode: false - schema: - type: string - example: null - responses: - "400": - description: "Request was malformed, e.g. id was null" + description: The DataPlane instance that fits best for the given selection + request content: - application/json: + '*/*': schema: - type: array - example: null - items: - $ref: '#/components/schemas/ApiErrorDetail' - /transferprocess/{processId}/fail: - post: - tags: - - Transfer Process Control Api - description: "Requests completion of the transfer process. Due to the asynchronous\ - \ nature of transfers, a successful response only indicates that the request\ - \ was successfully received" - operationId: fail - parameters: - - name: processId - in: path - required: true - style: simple - explode: false - schema: - type: string - example: null - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TransferProcessFailStateDto' - required: true - responses: + $ref: '#/components/schemas/DataPlaneInstanceSchema' + "204": + description: No suitable DataPlane instance was found "400": - description: "Request was malformed, e.g. id was null" + description: Request body was malformed content: - application/json: + '*/*': schema: type: array example: null @@ -316,7 +153,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AssetUpdateRequestDto' + $ref: '#/components/schemas/Asset' responses: "200": description: Asset was updated successfully @@ -331,6 +168,7 @@ paths: $ref: '#/components/schemas/ApiErrorDetail' "404": description: "Asset could not be updated, because it does not exist." + deprecated: true post: tags: - Asset @@ -348,7 +186,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/IdResponseDto' + $ref: '#/components/schemas/IdResponse' "400": description: Request body was malformed content: @@ -368,6 +206,7 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' + deprecated: true /v2/assets/request: post: tags: @@ -378,7 +217,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/QuerySpecDto' + $ref: '#/components/schemas/QuerySpec' responses: "200": description: The assets matching the query @@ -388,7 +227,7 @@ paths: type: array example: null items: - $ref: '#/components/schemas/AssetResponseDto' + $ref: '#/components/schemas/Asset' "400": description: Request body was malformed content: @@ -398,6 +237,7 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' + deprecated: true /v2/assets/{assetId}/dataaddress: put: tags: @@ -417,7 +257,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AssetUpdateRequestDto' + $ref: '#/components/schemas/Asset' responses: "200": description: Asset was updated successfully @@ -439,6 +279,7 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' + deprecated: true /v2/assets/{id}: get: tags: @@ -460,7 +301,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AssetResponseDto' + $ref: '#/components/schemas/Asset' "400": description: "Request was malformed, e.g. id was null" content: @@ -479,6 +320,7 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' + deprecated: true delete: tags: - Asset @@ -528,6 +370,7 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' + deprecated: true /v2/assets/{id}/dataaddress: get: tags: @@ -549,7 +392,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DataAddressDto' + $ref: '#/components/schemas/DataAddress' "400": description: "Request was malformed, e.g. id was null" content: @@ -568,6 +411,24 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' + deprecated: true + /v2/catalog/dataset/request: + post: + tags: + - Catalog + operationId: getDataset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DatasetRequest' + responses: + default: + description: Gets single dataset from a connector + content: + application/json: + schema: + $ref: '#/components/schemas/Dataset' /v2/catalog/request: post: tags: @@ -577,7 +438,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CatalogRequestDto' + $ref: '#/components/schemas/CatalogRequest' responses: default: description: Gets contract offers (=catalog) of a single connector @@ -595,7 +456,7 @@ paths: content: '*/*': schema: - $ref: '#/components/schemas/QuerySpecDto' + $ref: '#/components/schemas/QuerySpec' responses: "200": description: The contract agreements matching the query @@ -605,7 +466,7 @@ paths: type: array example: null items: - $ref: '#/components/schemas/ContractAgreementDto' + $ref: '#/components/schemas/ContractAgreement' "400": description: Request body was malformed content: @@ -636,7 +497,47 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ContractAgreementDto' + $ref: '#/components/schemas/ContractAgreement' + "400": + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: An contract agreement with the given ID does not exist + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + /v2/contractagreements/{id}/negotiation: + get: + tags: + - Contract Agreement + description: Gets a contract negotiation with the given contract agreement ID + operationId: getNegotiationByAgreementId + parameters: + - name: id + in: path + required: true + style: simple + explode: false + schema: + type: string + example: null + responses: + "200": + description: The contract negotiation + content: + application/json: + schema: + $ref: '#/components/schemas/ContractNegotiation' "400": description: "Request was malformed, e.g. id was null" content: @@ -666,7 +567,7 @@ paths: content: '*/*': schema: - $ref: '#/components/schemas/ContractDefinitionRequestDto' + $ref: '#/components/schemas/ContractDefinitionInput' responses: "204": description: Contract definition was updated successfully @@ -697,7 +598,7 @@ paths: content: '*/*': schema: - $ref: '#/components/schemas/ContractDefinitionRequestDto' + $ref: '#/components/schemas/ContractDefinitionInput' responses: "200": description: contract definition was created successfully. Returns the Contract @@ -705,7 +606,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/IdResponseDto' + $ref: '#/components/schemas/IdResponse' "400": description: Request body was malformed content: @@ -735,7 +636,7 @@ paths: content: '*/*': schema: - $ref: '#/components/schemas/QuerySpecDto' + $ref: '#/components/schemas/QuerySpec' responses: "200": description: The contract definitions matching the query @@ -745,7 +646,7 @@ paths: type: array example: null items: - $ref: '#/components/schemas/ContractDefinitionResponseDto' + $ref: '#/components/schemas/ContractDefinitionOutput' "400": description: Request was malformed content: @@ -776,7 +677,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ContractDefinitionResponseDto' + $ref: '#/components/schemas/ContractDefinitionOutput' "400": description: "Request was malformed, e.g. id was null" content: @@ -846,7 +747,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/NegotiationInitiateRequestDto' + $ref: '#/components/schemas/ContractRequest' responses: "200": description: The negotiation was successfully initiated. Returns the contract @@ -854,7 +755,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/IdResponseDto' + $ref: '#/components/schemas/IdResponse' links: poll-state: operationId: getNegotiationState @@ -879,7 +780,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/QuerySpecDto' + $ref: '#/components/schemas/QuerySpec' responses: "200": description: The contract negotiations that match the query @@ -889,7 +790,7 @@ paths: type: array example: null items: - $ref: '#/components/schemas/ContractNegotiationDto' + $ref: '#/components/schemas/ContractNegotiation' "400": description: Request was malformed content: @@ -920,7 +821,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ContractNegotiationDto' + $ref: '#/components/schemas/ContractNegotiation' "400": description: "Request was malformed, e.g. id was null" content: @@ -962,7 +863,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ContractAgreementDto' + $ref: '#/components/schemas/ContractAgreement' "400": description: "Request was malformed, e.g. id was null" content: @@ -1024,6 +925,7 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' + deprecated: true /v2/contractnegotiations/{id}/decline: post: tags: @@ -1067,6 +969,7 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' + deprecated: true /v2/contractnegotiations/{id}/state: get: tags: @@ -1107,27 +1010,43 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' - /v2/policydefinitions: + /v2/contractnegotiations/{id}/terminate: post: tags: - - Policy Definition - description: Creates a new policy definition - operationId: createPolicyDefinition + - Contract Negotiation + description: Terminates the contract negotiation. + operationId: terminateNegotiation + parameters: + - name: id + in: path + required: true + style: simple + explode: false + schema: + type: string + example: null requestBody: content: application/json: schema: - $ref: '#/components/schemas/PolicyDefinitionRequestDto' + $ref: '#/components/schemas/TerminateNegotiationSchema' responses: "200": - description: policy definition was created successfully. Returns the Policy - Definition Id and created timestamp + description: ContractNegotiation is terminating + links: + poll-state: + operationId: getNegotiationState + "400": + description: Request was malformed content: application/json: schema: - $ref: '#/components/schemas/IdResponseDto' - "400": - description: Request body was malformed + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: A contract negotiation with the given ID does not exist content: application/json: schema: @@ -1135,9 +1054,18 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' - "409": - description: "Could not create policy definition, because a contract definition\ - \ with that ID already exists" + /v2/dataplanes: + get: + tags: + - Dataplane Selector + description: Returns a list of all currently registered data plane instances + operationId: getAll + responses: + "204": + description: A (potentially empty) list of currently registered data plane + instances + "400": + description: Request body was malformed content: application/json: schema: @@ -1145,29 +1073,21 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' - /v2/policydefinitions/request: post: tags: - - Policy Definition - description: Returns all policy definitions according to a query - operationId: queryPolicyDefinitions + - Dataplane Selector + description: Adds one datatplane instance to the internal database of the selector + operationId: addEntry requestBody: content: application/json: schema: - $ref: '#/components/schemas/QuerySpecDto' + $ref: '#/components/schemas/DataPlaneInstanceSchema' responses: "200": - description: The policy definitions matching the query - content: - application/json: - schema: - type: array - example: null - items: - $ref: '#/components/schemas/PolicyDefinitionResponseDto' + description: Entry was added successfully to the database "400": - description: Request was malformed + description: Request body was malformed content: application/json: schema: @@ -1175,39 +1095,29 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' - /v2/policydefinitions/{id}: - get: + /v2/dataplanes/select: + post: tags: - - Policy Definition - description: Gets a policy definition with the given ID - operationId: getPolicyDefinition - parameters: - - name: id - in: path - required: true - style: simple - explode: false - schema: - type: string - example: null + - Dataplane Selector + description: Finds the best fitting data plane instance for a particular query + operationId: find_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SelectionRequestSchema' responses: "200": - description: The policy definition + description: The DataPlane instance that fits best for the given selection + request content: application/json: schema: - $ref: '#/components/schemas/PolicyDefinitionResponseDto' + $ref: '#/components/schemas/DataPlaneInstanceSchema' + "204": + description: No suitable DataPlane instance was found "400": - description: "Request was malformed, e.g. id was null" - content: - application/json: - schema: - type: array - example: null - items: - $ref: '#/components/schemas/ApiErrorDetail' - "404": - description: An policy definition with the given ID does not exist + description: Request body was malformed content: application/json: schema: @@ -1215,7 +1125,115 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' - put: + /v2/policydefinitions: + post: + tags: + - Policy Definition + description: Creates a new policy definition + operationId: createPolicyDefinition + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDefinitionInput' + responses: + "200": + description: policy definition was created successfully. Returns the Policy + Definition Id and created timestamp + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponse' + "400": + description: Request body was malformed + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + "409": + description: "Could not create policy definition, because a contract definition\ + \ with that ID already exists" + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + /v2/policydefinitions/request: + post: + tags: + - Policy Definition + description: Returns all policy definitions according to a query + operationId: queryPolicyDefinitions + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QuerySpec' + responses: + "200": + description: The policy definitions matching the query + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/PolicyDefinitionOutput' + "400": + description: Request was malformed + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + /v2/policydefinitions/{id}: + get: + tags: + - Policy Definition + description: Gets a policy definition with the given ID + operationId: getPolicyDefinition + parameters: + - name: id + in: path + required: true + style: simple + explode: false + schema: + type: string + example: null + responses: + "200": + description: The policy definition + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDefinitionOutput' + "400": + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: An policy definition with the given ID does not exist + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + put: tags: - Policy Definition description: "Updates an existing Policy, If the Policy is not found, an error\ @@ -1234,7 +1252,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PolicyDefinitionUpdateDto' + $ref: '#/components/schemas/PolicyDefinitionInput' responses: "200": description: policy definition was updated successfully. Returns the Policy @@ -1316,7 +1334,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TransferRequestDto' + $ref: '#/components/schemas/TransferRequest' responses: "200": description: The transfer was successfully initiated. Returns the transfer @@ -1324,7 +1342,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/IdResponseDto' + $ref: '#/components/schemas/IdResponse' links: poll-state: operationId: getTransferProcessState @@ -1349,7 +1367,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/QuerySpecDto' + $ref: '#/components/schemas/QuerySpec' responses: "200": description: The transfer processes matching the query @@ -1359,7 +1377,7 @@ paths: type: array example: null items: - $ref: '#/components/schemas/TransferProcessDto' + $ref: '#/components/schemas/TransferProcess' "400": description: Request was malformed content: @@ -1390,7 +1408,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TransferProcessDto' + $ref: '#/components/schemas/TransferProcess' "400": description: "Request was malformed, e.g. id was null" content: @@ -1515,7 +1533,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TerminateTransferDto' + $ref: '#/components/schemas/TerminateTransfer' responses: "200": description: Request to cancel the transfer process was successfully received @@ -1550,93 +1568,204 @@ paths: example: null items: $ref: '#/components/schemas/ApiErrorDetail' - /{any}: - get: + /v3/assets: + put: tags: - - Data Plane public API - description: Send `GET` data query to the Data Plane. - operationId: get + - Asset + description: "Updates an asset with the given ID if it exists. If the asset\ + \ is not found, no further action is taken. DANGER ZONE: Note that updating\ + \ assets can have unexpected results, especially for contract offers that\ + \ have been sent out or are ongoing in contract negotiations." + operationId: updateAsset_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssetInput' responses: + "200": + description: Asset was updated successfully "400": - description: Missing access token - "403": - description: Access token is expired or invalid - "500": - description: Failed to transfer data - put: + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: "Asset could not be updated, because it does not exist." + post: tags: - - Data Plane public API - description: Send `PUT` data query to the Data Plane. - operationId: put + - Asset + description: Creates a new asset together with a data address + operationId: createAsset_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssetInput' responses: + "200": + description: Asset was created successfully. Returns the asset Id and created + timestamp + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponse' "400": - description: Missing access token - "403": - description: Access token is expired or invalid - "500": - description: Failed to transfer data + description: Request body was malformed + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + "409": + description: "Could not create asset, because an asset with that ID already\ + \ exists" + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + /v3/assets/request: post: tags: - - Data Plane public API - description: Send `POST` data query to the Data Plane. - operationId: post + - Asset + description: ' all assets according to a particular query' + operationId: requestAssets_1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/QuerySpec' responses: + "200": + description: The assets matching the query + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/AssetOutput' "400": - description: Missing access token - "403": - description: Access token is expired or invalid - "500": - description: Failed to transfer data - delete: + description: Request body was malformed + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + /v3/assets/{id}: + get: tags: - - Data Plane public API - description: Send `DELETE` data query to the Data Plane. - operationId: delete + - Asset + description: Gets an asset with the given ID + operationId: getAsset_1 + parameters: + - name: id + in: path + required: true + style: simple + explode: false + schema: + type: string + example: null responses: + "200": + description: The asset + content: + application/json: + schema: + $ref: '#/components/schemas/AssetOutput' "400": - description: Missing access token - "403": - description: Access token is expired or invalid - "500": - description: Failed to transfer data - patch: + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: An asset with the given ID does not exist + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + delete: tags: - - Data Plane public API - description: Send `PATCH` data query to the Data Plane. - operationId: patch + - Asset + description: "Removes an asset with the given ID if possible. Deleting an asset\ + \ is only possible if that asset is not yet referenced by a contract agreement,\ + \ in which case an error is returned. DANGER ZONE: Note that deleting assets\ + \ can have unexpected results, especially for contract offers that have been\ + \ sent out or ongoing or contract negotiations." + operationId: removeAsset_1 + parameters: + - name: id + in: path + required: true + style: simple + explode: false + schema: + type: string + example: null responses: + "200": + description: Asset was deleted successfully "400": - description: Missing access token - "403": - description: Access token is expired or invalid - "500": - description: Failed to transfer data -components: - schemas: - Action: - type: object - properties: - constraint: - $ref: '#/components/schemas/Constraint' - includedIn: - type: string - example: null - type: - type: string - example: null - example: null - ApiErrorDetail: - type: object - properties: - invalidValue: - type: string - example: null - message: - type: string - example: null - path: - type: string - example: null + description: "Request was malformed, e.g. id was null" + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + "404": + description: An asset with the given ID does not exist + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' + "409": + description: "The asset cannot be deleted, because it is referenced by a\ + \ contract agreement" + content: + application/json: + schema: + type: array + example: null + items: + $ref: '#/components/schemas/ApiErrorDetail' +components: + schemas: + ApiErrorDetail: + type: object + properties: + invalidValue: + type: object + example: null + message: + type: string + example: null + path: + type: string + example: null type: type: string example: null @@ -1648,6 +1777,8 @@ components: type: integer format: int64 example: null + dataAddress: + $ref: '#/components/schemas/DataAddress' id: type: string example: null @@ -1672,22 +1803,17 @@ components: dataAddress: $ref: '#/components/schemas/DataAddress' example: null - AssetResponseDto: + AssetInput: type: object properties: - '@context': - type: object - example: null '@id': type: string example: null '@type': type: string - example: null - createdAt: - type: integer - format: int64 - example: null + example: https://w3id.org/edc/v0.0.1/ns/Asset + dataAddress: + $ref: '#/components/schemas/DataAddress' privateProperties: type: object additionalProperties: @@ -1700,18 +1826,31 @@ components: type: object example: null example: null - example: null - AssetUpdateRequestDto: - required: - - properties + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@id': asset-id + properties: + key: value + privateProperties: + privateKey: privateValue + dataAddress: + type: HttpData + AssetOutput: type: object properties: - '@context': - type: object + '@id': + type: string example: null '@type': type: string + example: https://w3id.org/edc/v0.0.1/ns/Asset + createdAt: + type: integer + format: int64 example: null + dataAddress: + $ref: '#/components/schemas/DataAddress' privateProperties: type: object additionalProperties: @@ -1724,10 +1863,23 @@ components: type: object example: null example: null - example: null + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@id': asset-id + edc:properties: + edc:key: value + edc:privateProperties: + edc:privateKey: privateValue + edc:dataAddress: + edc:type: HttpData + edc:createdAt: 1688465655 CallbackAddress: type: object properties: + '@type': + type: string + example: https://w3id.org/edc/v0.0.1/ns/CallbackAddress authCodeId: type: string example: null @@ -1750,41 +1902,59 @@ components: example: null Catalog: type: object - properties: - contractOffers: - type: array - example: null - items: - $ref: '#/components/schemas/ContractOffer' - dataServices: - type: array - example: null - items: - $ref: '#/components/schemas/DataService' - datasets: - type: array - example: null - items: - $ref: '#/components/schemas/Dataset' - id: - type: string - example: null - properties: - type: object - additionalProperties: - type: object - example: null - example: null - example: null - CatalogRequestDto: - required: - - providerUrl + description: DCAT catalog + example: + '@id': 7df65569-8c59-4013-b1c0-fa14f6641bf2 + '@type': dcat:Catalog + dcat:dataset: + '@id': bcca61be-e82e-4da6-bfec-9716a56cef35 + '@type': dcat:Dataset + odrl:hasPolicy: + '@id': OGU0ZTMzMGMtODQ2ZS00ZWMxLThmOGQtNWQxNWM0NmI2NmY4:YmNjYTYxYmUtZTgyZS00ZGE2LWJmZWMtOTcxNmE1NmNlZjM1:NDY2ZTZhMmEtNjQ1Yy00ZGQ0LWFlZDktMjdjNGJkZTU4MDNj + '@type': odrl:Set + odrl:permission: + odrl:target: bcca61be-e82e-4da6-bfec-9716a56cef35 + odrl:action: + odrl:type: http://www.w3.org/ns/odrl/2/use + odrl:constraint: + odrl:and: + - odrl:leftOperand: https://w3id.org/edc/v0.0.1/ns/inForceDate + odrl:operator: + '@id': odrl:gteq + odrl:rightOperand: 2023-07-07T07:19:58.585601395Z + - odrl:leftOperand: https://w3id.org/edc/v0.0.1/ns/inForceDate + odrl:operator: + '@id': odrl:lteq + odrl:rightOperand: 2023-07-12T07:19:58.585601395Z + odrl:prohibition: [ ] + odrl:obligation: [ ] + odrl:target: bcca61be-e82e-4da6-bfec-9716a56cef35 + dcat:distribution: + - '@type': dcat:Distribution + dct:format: + '@id': HttpData + dcat:accessService: 5e839777-d93e-4785-8972-1005f51cf367 + edc:description: description + edc:id: bcca61be-e82e-4da6-bfec-9716a56cef35 + dcat:service: + '@id': 5e839777-d93e-4785-8972-1005f51cf367 + '@type': dcat:DataService + dct:terms: connector + dct:endpointUrl: http://localhost:16806/protocol + edc:participantId: urn:connector:provider + '@context': + dct: https://purl.org/dc/terms/ + edc: https://w3id.org/edc/v0.0.1/ns/ + dcat: https://www.w3.org/ns/dcat/ + odrl: http://www.w3.org/ns/odrl/2/ + dspace: https://w3id.org/dspace/v0.8/ + CatalogRequest: type: object properties: - '@context': - type: object - example: null '@type': + type: string + example: https://w3id.org/edc/v0.0.1/ns/CatalogRequest + counterPartyAddress: type: string example: null protocol: @@ -1792,39 +1962,32 @@ components: example: null providerUrl: type: string + description: please use counterPartyAddress instead example: null + deprecated: true querySpec: - $ref: '#/components/schemas/QuerySpecDto' - example: null - Constraint: - required: - - edctype - type: object - properties: - edctype: - type: string - example: null - example: null - discriminator: - propertyName: edctype - ContractAgreementDto: - required: - - '@id' - - assetId - - consumerId - - policy - - providerId + $ref: '#/components/schemas/QuerySpec' + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': CatalogRequest + counterPartyAddress: http://provider-address + protocol: dataspace-protocol-http + querySpec: + offset: 0 + limit: 50 + sortOrder: DESC + sortField: fieldName + filterExpression: [ ] + ContractAgreement: type: object properties: - '@context': - type: object - example: null '@id': type: string example: null '@type': type: string - example: null + example: https://w3id.org/edc/v0.0.1/ns/ContractAgreement assetId: type: string example: null @@ -1840,19 +2003,31 @@ components: providerId: type: string example: null - example: null - ContractDefinitionRequestDto: + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': https://w3id.org/edc/v0.0.1/ns/ContractAgreement + '@id': negotiation-id + providerId: provider-id + consumerId: consumer-id + assetId: asset-id + contractSigningDate: 1688465655 + policy: + '@context': http://www.w3.org/ns/odrl.jsonld + '@type': Set + '@id': offer-id + permission: + - target: asset-id + action: display + ContractDefinitionInput: type: object properties: - '@context': - type: object - example: null '@id': type: string example: null '@type': type: string - example: null + example: https://w3id.org/edc/v0.0.1/ns/ContractDefinition accessPolicyId: type: string example: null @@ -1860,23 +2035,26 @@ components: type: array example: null items: - $ref: '#/components/schemas/CriterionDto' + $ref: '#/components/schemas/Criterion' contractPolicyId: type: string example: null - example: null - ContractDefinitionResponseDto: + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@id': definition-id + accessPolicyId: asset-policy-id + contractPolicyId: contract-policy-id + assetsSelector: [ ] + ContractDefinitionOutput: type: object properties: - '@context': - type: object - example: null '@id': type: string example: null '@type': type: string - example: null + example: https://w3id.org/edc/v0.0.1/ns/ContractDefinition accessPolicyId: type: string example: null @@ -1884,7 +2062,7 @@ components: type: array example: null items: - $ref: '#/components/schemas/CriterionDto' + $ref: '#/components/schemas/Criterion' contractPolicyId: type: string example: null @@ -1892,19 +2070,23 @@ components: type: integer format: int64 example: null - example: null - ContractNegotiationDto: + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@id': definition-id + edc:accessPolicyId: asset-policy-id + edc:contractPolicyId: contract-policy-id + edc:assetsSelector: [ ] + edc:createdAt: 1688465655 + ContractNegotiation: type: object properties: - '@context': - type: object - example: null '@id': type: string example: null '@type': type: string - example: null + example: https://w3id.org/edc/v0.0.1/ns/ContractNegotiation callbackAddresses: type: array example: null @@ -1916,9 +2098,8 @@ components: counterPartyAddress: type: string example: null - createdAt: - type: integer - format: int64 + counterPartyId: + type: string example: null errorDetail: type: string @@ -1935,50 +2116,105 @@ components: enum: - CONSUMER - PROVIDER - updatedAt: - type: integer - format: int64 - example: null - example: null - ContractOffer: + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': https://w3id.org/edc/v0.0.1/ns/ContractNegotiation + '@id': negotiation-id + type: PROVIDER + protocol: dataspace-protocol-http + counterPartyId: counter-party-id + counterPartyAddress: http://counter/party/address + state: VERIFIED + contractAgreementId: contract:agreement:id + errorDetail: eventual-error-detail + createdAt: 1688465655 + callbackAddresses: + - transactional: false + uri: http://callback/url + events: + - contract.negotiation + - transfer.process + authKey: auth-key + authCodeId: auth-code-id + ContractOfferDescription: type: object properties: + '@type': + type: string + example: https://w3id.org/edc/v0.0.1/ns/ContractOfferDescription assetId: type: string example: null - id: + offerId: type: string example: null policy: $ref: '#/components/schemas/Policy' - providerId: - type: string - example: null example: null - ContractOfferDescription: + ContractRequest: type: object properties: - assetId: + '@type': type: string + example: https://w3id.org/edc/v0.0.1/ns/ContractRequest + callbackAddresses: + type: array example: null - offerId: + items: + $ref: '#/components/schemas/CallbackAddress' + connectorAddress: type: string example: null - policy: - $ref: '#/components/schemas/Policy' - example: null - CriterionDto: - required: - - operandLeft - - operator + connectorId: + type: string + description: please use providerId instead + example: null + deprecated: true + consumerId: + type: string + description: this field is not used anymore + example: null + deprecated: true + offer: + $ref: '#/components/schemas/ContractOfferDescription' + protocol: + type: string + example: null + providerId: + type: string + example: null + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': https://w3id.org/edc/v0.0.1/ns/ContractRequest + connectorAddress: http://provider-address + protocol: dataspace-protocol-http + providerId: provider-id + offer: + offerId: offer-id + assetId: asset-id + policy: + '@context': http://www.w3.org/ns/odrl.jsonld + '@type': Set + '@id': offer-id + permission: + - target: asset-id + action: display + callbackAddresses: + - transactional: false + uri: http://callback/url + events: + - contract.negotiation + - transfer.process + authKey: auth-key + authCodeId: auth-code-id + Criterion: type: object properties: - '@context': - type: object - example: null '@type': type: string - example: null + example: https://w3id.org/edc/v0.0.1/ns/Criterion operandLeft: type: object example: null @@ -1988,71 +2224,32 @@ components: operator: type: string example: null - example: null + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': Criterion + operandLeft: fieldName + operator: = + operandRight: some value DataAddress: type: object properties: - properties: - type: object - additionalProperties: - type: string - example: null - example: null - example: null - DataAddressDto: - required: - - properties - type: object - properties: - '@context': - type: object - example: null '@type': type: string - example: null - properties: - type: object - additionalProperties: - type: string - example: null + example: https://w3id.org/edc/v0.0.1/ns/DataAddress + type: + type: string example: null example: null - DataFlowRequest: + DataPlaneInstanceSchema: type: object properties: - callbackAddress: - type: string - format: url - example: null - destinationDataAddress: - $ref: '#/components/schemas/DataAddress' - id: + '@id': type: string example: null - processId: + '@type': type: string - example: null - properties: - type: object - additionalProperties: - type: string - example: null - example: null - sourceDataAddress: - $ref: '#/components/schemas/DataAddress' - traceContext: - type: object - additionalProperties: - type: string - example: null - example: null - trackable: - type: boolean - example: null - example: null - DataPlaneInstance: - type: object - properties: + example: https://w3id.org/edc/v0.0.1/ns/DataPlaneInstance allowedDestTypes: uniqueItems: true type: array @@ -2067,19 +2264,10 @@ components: items: type: string example: null - id: - type: string - example: null lastActive: type: integer format: int64 example: null - properties: - type: object - additionalProperties: - type: object - example: null - example: null turnCount: type: integer format: int32 @@ -2088,59 +2276,74 @@ components: type: string format: url example: null - example: null - DataRequestDto: + example: + '@id': your-dataplane-id + url: http://somewhere.com:1234/api/v1 + allowedSourceTypes: + - source-type1 + - source-type2 + allowedDestTypes: + - your-dest-type + Dataset: type: object - properties: - assetId: - type: string - example: null - connectorId: - type: string - example: null - contractId: - type: string - example: null - id: - type: string - example: null - example: null - DataService: + description: DCAT dataset + example: + '@id': bcca61be-e82e-4da6-bfec-9716a56cef35 + '@type': dcat:Dataset + odrl:hasPolicy: + '@id': OGU0ZTMzMGMtODQ2ZS00ZWMxLThmOGQtNWQxNWM0NmI2NmY4:YmNjYTYxYmUtZTgyZS00ZGE2LWJmZWMtOTcxNmE1NmNlZjM1:NDY2ZTZhMmEtNjQ1Yy00ZGQ0LWFlZDktMjdjNGJkZTU4MDNj + '@type': odrl:Set + odrl:permission: + odrl:target: bcca61be-e82e-4da6-bfec-9716a56cef35 + odrl:action: + odrl:type: http://www.w3.org/ns/odrl/2/use + odrl:constraint: + odrl:and: + - odrl:leftOperand: https://w3id.org/edc/v0.0.1/ns/inForceDate + odrl:operator: + '@id': odrl:gteq + odrl:rightOperand: 2023-07-07T07:19:58.585601395Z + - odrl:leftOperand: https://w3id.org/edc/v0.0.1/ns/inForceDate + odrl:operator: + '@id': odrl:lteq + odrl:rightOperand: 2023-07-12T07:19:58.585601395Z + odrl:prohibition: [ ] + odrl:obligation: [ ] + odrl:target: bcca61be-e82e-4da6-bfec-9716a56cef35 + dcat:distribution: + - '@type': dcat:Distribution + dct:format: + '@id': HttpData + dcat:accessService: 5e839777-d93e-4785-8972-1005f51cf367 + edc:description: description + edc:id: bcca61be-e82e-4da6-bfec-9716a56cef35 + '@context': + dct: https://purl.org/dc/terms/ + edc: https://w3id.org/edc/v0.0.1/ns/ + dcat: https://www.w3.org/ns/dcat/ + odrl: http://www.w3.org/ns/odrl/2/ + dspace: https://w3id.org/dspace/v0.8/ + DatasetRequest: type: object properties: - endpointUrl: - type: string - example: null - id: + '@type': type: string - example: null - terms: + example: https://w3id.org/edc/v0.0.1/ns/CatalogRequest + counterPartyAddress: type: string example: null - example: null - Dataset: - type: object - properties: - distributions: - type: array - example: null - items: - $ref: '#/components/schemas/Distribution' - id: + protocol: type: string example: null - offers: - type: object - additionalProperties: - $ref: '#/components/schemas/Policy' - example: null - properties: - type: object - additionalProperties: - type: object - example: null - example: null - example: null + querySpec: + $ref: '#/components/schemas/QuerySpec' + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': DatasetRequest + '@id': dataset-id + counterPartyAddress: http://counter-party-address + protocol: dataspace-protocol-http DeprovisionedResource: type: object properties: @@ -2157,39 +2360,6 @@ components: type: string example: null example: null - Distribution: - type: object - properties: - dataService: - $ref: '#/components/schemas/DataService' - format: - type: string - example: null - example: null - Duty: - type: object - properties: - action: - $ref: '#/components/schemas/Action' - assignee: - type: string - example: null - assigner: - type: string - example: null - consequence: - $ref: '#/components/schemas/Duty' - constraints: - type: array - example: null - items: - $ref: '#/components/schemas/Constraint' - parentPermission: - $ref: '#/components/schemas/Permission' - target: - type: string - example: null - example: null Failure: type: object properties: @@ -2227,23 +2397,21 @@ components: type: boolean example: null example: null - IdResponseDto: + IdResponse: type: object properties: - '@context': - type: object - example: null '@id': type: string example: null - '@type': - type: string - example: null createdAt: type: integer format: int64 example: null - example: null + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@id': id-value + createdAt: 1688465655 JsonArray: type: array properties: @@ -2299,181 +2467,86 @@ components: - "FALSE" - "NULL" example: null - NegotiationInitiateRequestDto: - type: object - properties: - '@context': - type: object - example: null - '@type': - type: string - example: null - callbackAddresses: - type: array - example: null - items: - $ref: '#/components/schemas/CallbackAddress' - connectorAddress: - type: string - example: null - connectorId: - type: string - example: null - consumerId: - type: string - example: null - offer: - $ref: '#/components/schemas/ContractOfferDescription' - protocol: - type: string - example: null - providerId: - type: string - example: null - example: null NegotiationState: type: object properties: - '@context': - type: object - example: null - '@type': - type: string - example: null state: type: string example: null example: null - Permission: - type: object - properties: - action: - $ref: '#/components/schemas/Action' - assignee: - type: string - example: null - assigner: - type: string - example: null - constraints: - type: array - example: null - items: - $ref: '#/components/schemas/Constraint' - duties: - type: array - example: null - items: - $ref: '#/components/schemas/Duty' - target: - type: string - example: null - example: null Policy: type: object - properties: - '@type': - type: string - example: null - enum: - - SET - - OFFER - - CONTRACT - assignee: - type: string - example: null - assigner: - type: string - example: null - extensibleProperties: - type: object - additionalProperties: - type: object - example: null - example: null - inheritsFrom: - type: string - example: null - obligations: - type: array - example: null - items: - $ref: '#/components/schemas/Duty' - permissions: - type: array - example: null - items: - $ref: '#/components/schemas/Permission' - prohibitions: - type: array - example: null - items: - $ref: '#/components/schemas/Prohibition' - target: - type: string - example: null - example: null - PolicyDefinitionRequestDto: + description: ODRL policy + example: + '@context': http://www.w3.org/ns/odrl.jsonld + '@id': 0949ba30-680c-44e6-bc7d-1688cbe1847e + '@type': odrl:Set + permission: + target: http://example.com/asset:9898.movie + action: + type: http://www.w3.org/ns/odrl/2/use + constraint: + leftOperand: https://w3id.org/edc/v0.0.1/ns/left + operator: eq + rightOperand: value + prohibition: [ ] + obligation: [ ] + PolicyDefinitionInput: type: object properties: '@id': type: string example: null + '@type': + type: string + example: https://w3id.org/edc/v0.0.1/ns/PolicyDefinition policy: $ref: '#/components/schemas/Policy' - example: null - PolicyDefinitionResponseDto: + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@id': definition-id + policy: + '@context': http://www.w3.org/ns/odrl.jsonld + '@type': Set + uid: http://example.com/policy:1010 + permission: + - target: http://example.com/asset:9898.movie + action: display + constraint: + - leftOperand: spatial + operator: eq + rightOperand: https://www.wikidata.org/wiki/Q183 + comment: i.e Germany + PolicyDefinitionOutput: type: object properties: - '@context': - type: object - example: null '@id': type: string example: null '@type': type: string - example: null - createdAt: - type: integer - format: int64 - example: null + example: https://w3id.org/edc/v0.0.1/ns/PolicyDefinition policy: $ref: '#/components/schemas/Policy' - example: null - PolicyDefinitionUpdateDto: - type: object - properties: + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@id': definition-id policy: - $ref: '#/components/schemas/Policy' - example: null - Prohibition: - type: object - properties: - action: - $ref: '#/components/schemas/Action' - assignee: - type: string - example: null - assigner: - type: string - example: null - constraints: - type: array - example: null - items: - $ref: '#/components/schemas/Constraint' - target: - type: string - example: null - example: null + '@context': http://www.w3.org/ns/odrl.jsonld + '@type': Set + uid: http://example.com/policy:1010 + permission: + - target: http://example.com/asset:9898.movie + action: display + constraint: + - leftOperand: spatial + operator: eq + rightOperand: https://www.wikidata.org/wiki/Q183 + comment: i.e Germany + createdAt: 1688465655 ProvisionerWebhookRequest: - required: - - apiKeyJwt - - assetId - - contentDataAddress - - resourceDefinitionId - - resourceName type: object properties: apiKeyJwt: @@ -2494,20 +2567,17 @@ components: type: string example: null example: null - QuerySpecDto: + QuerySpec: type: object properties: - '@context': - type: object - example: null '@type': type: string - example: null + example: https://w3id.org/edc/v0.0.1/ns/QuerySpec filterExpression: type: array example: null items: - $ref: '#/components/schemas/CriterionDto' + $ref: '#/components/schemas/Criterion' limit: type: integer format: int32 @@ -2525,10 +2595,21 @@ components: enum: - ASC - DESC - example: null - SelectionRequest: + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': QuerySpec + offset: 5 + limit: 10 + sortOrder: DESC + sortField: fieldName + filterExpression: [ ] + SelectionRequestSchema: type: object properties: + '@type': + type: string + example: https://w3id.org/edc/v0.0.1/ns/SelectionRequest destination: $ref: '#/components/schemas/DataAddress' source: @@ -2536,84 +2617,130 @@ components: strategy: type: string example: null - example: null - TerminateTransferDto: - required: - - reason + example: + source: + '@type': https://w3id.org/edc/v0.0.1/ns/DataAddress + type: test-src1 + destination: + '@type': https://w3id.org/edc/v0.0.1/ns/DataAddress + type: test-dst2 + strategy: you_custom_strategy + TerminateNegotiationSchema: type: object properties: + '@id': + type: string + example: null + '@type': + type: string + example: https://w3id.org/edc/v0.0.1/ns/TerminateNegotiation reason: type: string example: null - example: null - TransferProcessDto: + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': https://w3id.org/edc/v0.0.1/ns/TerminateNegotiation + '@id': negotiation-id + reason: a reason to terminate + TerminateTransfer: type: object properties: - '@context': - type: object + '@type': + type: string + example: https://w3id.org/edc/v0.0.1/ns/TransferState + state: + type: string example: null + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': https://w3id.org/edc/v0.0.1/ns/TerminateTransfer + reason: a reason to terminate + TransferProcess: + type: object + properties: '@id': type: string example: null '@type': type: string - example: null + example: https://w3id.org/edc/v0.0.1/ns/TransferProcess callbackAddresses: type: array example: null items: $ref: '#/components/schemas/CallbackAddress' - createdAt: - type: integer - format: int64 + contractAgreementId: + type: string + example: null + counterPartyAddress: + type: string + example: null + counterPartyId: + type: string example: null - dataDestination: - $ref: '#/components/schemas/DataAddressDto' - dataRequest: - $ref: '#/components/schemas/DataRequestDto' errorDetail: type: string example: null + privateProperties: + type: object + additionalProperties: + type: object + example: null + example: null properties: type: object additionalProperties: type: string example: null + deprecated: true example: null - state: + deprecated: true + protocol: type: string example: null - stateTimestamp: - type: integer - format: int64 + state: + type: string example: null type: type: string example: null - updatedAt: - type: integer - format: int64 - example: null - example: null - TransferProcessFailStateDto: - required: - - errorMessage + enum: + - CONSUMER + - PROVIDER + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': https://w3id.org/edc/v0.0.1/ns/TransferProcess + '@id': process-id + correlationId: correlation-id + type: PROVIDER + state: STARTED + stateTimestamp: 1688465655 + assetId: asset-id + connectorId: connectorId + contractId: contractId + dataDestination: + type: data-destination-type + privateProperties: + private-key: private-value + errorDetail: eventual-error-detail + createdAt: 1688465655 + callbackAddresses: + - transactional: false + uri: http://callback/url + events: + - contract.negotiation + - transfer.process + authKey: auth-key + authCodeId: auth-code-id + TransferRequest: type: object properties: - errorMessage: + '@type': type: string - example: null - example: null - TransferRequestDto: - required: - - assetId - - connectorAddress - - connectorId - - contractId - - dataDestination - - protocol - type: object - properties: + example: https://w3id.org/edc/v0.0.1/ns/TransferRequest assetId: type: string example: null @@ -2633,12 +2760,6 @@ components: example: null dataDestination: $ref: '#/components/schemas/DataAddress' - id: - type: string - example: null - managedResources: - type: boolean - example: null privateProperties: type: object additionalProperties: @@ -2649,16 +2770,49 @@ components: type: object additionalProperties: type: string + description: "Deprecated as this field is not used anymore, please use\ + \ privateProperties instead" example: null + deprecated: true + description: "Deprecated as this field is not used anymore, please use privateProperties\ + \ instead" example: null + deprecated: true protocol: type: string example: null - example: null + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': https://w3id.org/edc/v0.0.1/ns/TransferRequest + protocol: dataspace-protocol-http + connectorAddress: http://provider-address + connectorId: provider-id + contractId: contract-id + assetId: asset-id + dataDestination: + type: data-destination-type + privateProperties: + private-key: private-value + callbackAddresses: + - transactional: false + uri: http://callback/url + events: + - contract.negotiation + - transfer.process + authKey: auth-key + authCodeId: auth-code-id TransferState: type: object properties: + '@type': + type: string + example: https://w3id.org/edc/v0.0.1/ns/TransferState state: type: string example: null - example: null + example: + '@context': + edc: https://w3id.org/edc/v0.0.1/ns/ + '@type': https://w3id.org/edc/v0.0.1/ns/TransferState + state: STARTED diff --git a/docs/getting-started/documentation/oauth-data-address.md b/docs/getting-started/documentation/oauth-data-address.md index 25c0099a0..4e14e1d0f 100644 --- a/docs/getting-started/documentation/oauth-data-address.md +++ b/docs/getting-started/documentation/oauth-data-address.md @@ -1,8 +1,11 @@ -How Can OAuth2 be used for Http-Data-Sources and Sinks? +Data Sources and Data Sinks protected by OAuth2 ======== -Overview -======== +> [!NOTE] +> This feature is only available in our sovity EDC Enterprise Edition. + +## Overview + OAuth2 protected APIs can be used for both Http-Data-Sources and Http-Data-Sinks. For both the following properties can be used: @@ -12,114 +15,112 @@ following properties can be used: | oauth2:clientId | The client id | | oauth2:clientSecret | The secret of the client authenticating to the OAuth2-Server | -Provider -======== +> [!NOTE] +> The only supported flow right now is the "Client Credentials" flow. + +## Data Sources secured via OAuth2 -UI --- +### Providing the Asset via the UI To provide data from an oauth2 protected API using the EDC-Ui an asset with the following `Custom Datasource Config (JSON)` can be created: ```json { - "properties": { - "type": "HttpData", - "baseUrl": "{{target-url}}", - "oauth2:tokenUrl": "{{token-url}}", - "oauth2:clientId": "{{client-id}}", - "oauth2:clientSecret": "{{client-secret}}" - } + "https://w3id.org/edc/v0.0.1/ns/type": "HttpData", + "https://w3id.org/edc/v0.0.1/ns/baseUrl": "{{target-url}}", + "oauth2:tokenUrl": "{{token-url}}", + "oauth2:clientId": "{{client-id}}", + "oauth2:clientSecret": "{{client-secret}}" } ``` -API ---- +### Providing the Asset via the Management API To create an asset providing oauth2 protected data the management-API of the EDC can be used to send the following request: -`POST` to `{{connector-base-url}}/control/data/assets` +`POST` to `https://{{FQDN}}/api/management/v2/assets` ```json { - "asset": { - "properties": { - "asset:prop:name": "test-asset", - "asset:prop:curatorOrganizationName": "organization", - "asset:prop:contenttype": "application/json", - "asset:prop:description": "description", - "asset:prop:datasource:http:hints:proxyBody": "false", - "asset:prop:datasource:http:hints:proxyMethod": "false", - "asset:prop:version": "1.0", - "asset:prop:id": "urn:artifact:test-asset:1.0", - "asset:prop:datasource:http:hints:proxyPath": "false", - "asset:prop:datasource:http:hints:proxyQueryParams": "false", - "asset:prop:originator": "{{originator-base-path}}/control/api/v1/ids/data", - "asset:prop:language": "https://w3id.org/idsa/code/EN" + "@type": "https://w3id.org/edc/v0.0.1/ns/Asset", + "https://w3id.org/edc/v0.0.1/ns/properties": { + "https://w3id.org/edc/v0.0.1/ns/id": "my-asset-1.0", + "http://www.w3.org/ns/dcat#version": "1.0", + "http://purl.org/dc/terms/language": "https://w3id.org/idsa/code/EN", + "http://purl.org/dc/terms/title": "test-document", + "http://purl.org/dc/terms/description": "my test document", + "http://www.w3.org/ns/dcat#keyword": [ + "keyword1", + "keyword2" + ], + "http://purl.org/dc/terms/creator": { + "http://xmlns.com/foaf/0.1/name": "My Org" + }, + "http://purl.org/dc/terms/license": "https://creativecommons.org/licenses/by/4.0/", + "http://www.w3.org/ns/dcat#landingPage": "https://mydepartment.myorg.com/my-offer", + "http://www.w3.org/ns/dcat#mediaType": "text/plain", + "https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyMethod": "false", + "https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyPath": "false", + "https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyQueryParams": "false", + "https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyBody": "false", + "http://purl.org/dc/terms/publisher": { + "http://xmlns.com/foaf/0.1/homepage": "https://myorg.com/" } }, - "dataAddress": { - "properties": { - "type": "HttpData", - "baseUrl": "{{target-url}}", - "oauth2:tokenUrl": "{{token-url}}", - "oauth2:clientId": "{{client-id}}", - "oauth2:clientSecret": "{{client-secret}}" - } + "https://w3id.org/edc/v0.0.1/ns/privateProperties": {}, + "https://w3id.org/edc/v0.0.1/ns/dataAddress": { + "https://w3id.org/edc/v0.0.1/ns/type": "HttpData", + "https://w3id.org/edc/v0.0.1/ns/baseUrl": "{{target-url}}", + "oauth2:tokenUrl": "{{token-url}}", + "oauth2:clientId": "{{client-id}}", + "oauth2:clientSecret": "{{client-secret}}" } } ``` -Consumer -======== +## Data Sinks secured by OAuth2 -UI --- +### Initiating the Transfer via the UI To start a transfer to an oauth2 protected API using the EDC-Ui a transfer with the following `Custom Datasink Config (JSON)` type can be started: ```json { - "properties": { - "type": "HttpData", - "baseUrl": "{{target-url}}", - "oauth2:tokenUrl": "{{token-url}}", - "oauth2:clientId": "{{client-id}}", - "oauth2:clientSecret": "{{client-secret}}" - } + "https://w3id.org/edc/v0.0.1/ns/type": "HttpData", + "https://w3id.org/edc/v0.0.1/ns/baseUrl": "{{target-url}}", + "oauth2:tokenUrl": "{{token-url}}", + "oauth2:clientId": "{{client-id}}", + "oauth2:clientSecret": "{{client-secret}}" } ``` -API ---- +### Initiating the Transfer via the Management API To start a transfer to an oauth2 protected API the management-API of the EDC can be used to send the following request: -`POST` to `{{connector-base-url}}/control/data/transferprocess` +`POST` to `https://{{FQDN}}/api/management/v2/transferprocesses` ```json { - "protocol": "ids-multipart", - "assetId": "urn:artifact:http", - "contractId": "{{contract-id}}", - "dataDestination": { - "properties": { - "type": "HttpData", - "baseUrl": "{{target-url}}", - "oauth2:tokenUrl": "{{token-url}}", - "oauth2:clientId": "{{client-id}}", - "oauth2:clientSecret": "{{client-secret}}" - } - }, - "transferType": { - "contentType": "application/octet-stream", - "isFinite": true + "@type": "https://w3id.org/edc/v0.0.1/ns/TransferRequest", + "https://w3id.org/edc/v0.0.1/ns/assetId": "{{ASSET_ID}}", + "https://w3id.org/edc/v0.0.1/ns/contractId": "{{CONTRACT_ID}}", + "https://w3id.org/edc/v0.0.1/ns/connectorAddress": "https://{{PROVIDER_EDC_FQDN}}/api/dsp", + "https://w3id.org/edc/v0.0.1/ns/connectorId": "{{PROVIDER_EDC_PARTICIPANT_ID}}", + "https://w3id.org/edc/v0.0.1/ns/dataDestination": { + "https://w3id.org/edc/v0.0.1/ns/type": "HttpData", + "https://w3id.org/edc/v0.0.1/ns/baseUrl": "{{target-url}}", + "oauth2:tokenUrl": "{{token-url}}", + "oauth2:clientId": "{{client-id}}", + "oauth2:clientSecret": "{{client-secret}}" }, - "managedResources": false, - "connectorAddress": "https://{{providerConnectorUrl}}/api/v1/ids/data", - "connectorId": "consumer" + "https://w3id.org/edc/v0.0.1/ns/properties": {}, + "https://w3id.org/edc/v0.0.1/ns/privateProperties": {}, + "https://w3id.org/edc/v0.0.1/ns/protocol": "dataspace-protocol-http", + "https://w3id.org/edc/v0.0.1/ns/managedResources": false } ``` diff --git a/docs/getting-started/documentation/parameterized_assets.md b/docs/getting-started/documentation/parameterized_assets.md index 0dd74a073..44fc31369 100644 --- a/docs/getting-started/documentation/parameterized_assets.md +++ b/docs/getting-started/documentation/parameterized_assets.md @@ -6,46 +6,42 @@ Provider Asset Create an `Custom Datasource Config (JSON)` asset over the edc-ui using the following Json: ```json { - "properties": { - "type": "HttpData", - "baseUrl": "https://google.de", - "proxyPath": "true", - "proxyBody": "true", - "proxyMethod": "true", - "proxyQueryParams": "true" - } + "https://w3id.org/edc/v0.0.1/ns/type": "HttpData", + "https://w3id.org/edc/v0.0.1/ns/baseUrl": "https://app.mydepartment.myorg.com/api", + "https://w3id.org/edc/v0.0.1/ns/proxyPath": "true", + "https://w3id.org/edc/v0.0.1/ns/proxyBody": "true", + "https://w3id.org/edc/v0.0.1/ns/proxyMethod": "true", + "https://w3id.org/edc/v0.0.1/ns/proxyQueryParams": "true" } ``` Start Transfer ======== -Start a transfer using the `transferprocess`-POST-Endpoint on the management API using the following JSON. -Make sure to update the `contractId` and `dataDestination`. -The relevant fields for API parametrization are located in the properties of the `transferProcessDTO` (not in `dataDestination`). -In this example `pathSegments`, `method` and `queryParams` are passed. +Start a transfer using the Management API using the following JSON: + +The relevant fields for API parametrization are located in the properties section of the transfer process, +not the data address of the data sink. + +`POST` to `https://{{FQDN}}/api/management/v2/transferprocesses` ```json { - "protocol": "ids-multipart", - "assetId": "urn:artifact:google", - "contractId": "cd:8495f437-a38c-40b9-a653-7e64d2cf6b08", - "dataDestination": { - "properties": { - "type": "HttpData", - "assetId": "urn:artifact:google", - "baseUrl": "https://webhook.site/6eddc60d-e863-41c3-9f0b-2cb4045977a5" - } - }, - "properties": { - "pathSegments": "search", - "method": "GET", - "queryParams": "q=sovity" + "@type": "https://w3id.org/edc/v0.0.1/ns/TransferRequest", + "https://w3id.org/edc/v0.0.1/ns/assetId": "{{ASSET_ID}}", + "https://w3id.org/edc/v0.0.1/ns/contractId": "{{CONTRACT_ID}}", + "https://w3id.org/edc/v0.0.1/ns/connectorAddress": "https://{{PROVIDER_EDC_FQDN}}/api/dsp", + "https://w3id.org/edc/v0.0.1/ns/connectorId": "{{PROVIDER_EDC_PARTICIPANT_ID}}", + "https://w3id.org/edc/v0.0.1/ns/dataDestination": { + "https://w3id.org/edc/v0.0.1/ns/type": "HttpData", + "https://w3id.org/edc/v0.0.1/ns/baseUrl": "{{target-url}}" }, - "transferType": { - "contentType": "application/octet-stream", - "isFinite": true + "https://w3id.org/edc/v0.0.1/ns/privateProperties": { + "https://w3id.org/edc/v0.0.1/ns/pathSegments": "my-endpoint", + "https://w3id.org/edc/v0.0.1/ns/method": "POST", + "https://w3id.org/edc/v0.0.1/ns/queryParams": "filter=abc&limit=10", + "https://w3id.org/edc/v0.0.1/ns/contentType": "application/json", + "https://w3id.org/edc/v0.0.1/ns/body": "{\"myBody\": \"myValue\"}" }, - "managedResources": false, - "connectorAddress": "http://provider-connector-controlplane-1:8282/api/v1/ids/data", - "connectorId": "consumer" + "https://w3id.org/edc/v0.0.1/ns/protocol": "dataspace-protocol-http", + "https://w3id.org/edc/v0.0.1/ns/managedResources": false } ``` diff --git a/docs/getting-started/documentation/pull-data-transfer.md b/docs/getting-started/documentation/pull-data-transfer.md index 22834b42b..55e7fbddb 100644 --- a/docs/getting-started/documentation/pull-data-transfer.md +++ b/docs/getting-started/documentation/pull-data-transfer.md @@ -1,97 +1,105 @@ -How Can a Pull-Data-Transfer Be Performed? +Consuming Data via HttpProxy / HTTP Pull ======== -Overview -======== +> [!WARNING] +> This feature is only available for our sovity EDC Enterprise Edition. + +## Overview The following diagram describes the sequence of actions involved in a Pull-Data-Transfer: -![pull-data-transfer.png](images%2Fpull-data-transfer.png) +![pull-data-transfer.png](images/pull-data-transfer.png) -Provider -======== -Steps: -1. Create an `Rest-Api-Endpoint` (Technically a HttpData)-Type Asset -2. Create a Policy -3. Create a ContractDefinition +The Use Case Application is involved in steps 3, 4 and 11 of the diagram. It should provide an endpoint for receiving +the EDR (3). These information can then be used to start the tranfser request (4). The result of the transfer request +will contain the data (11). -Consumer -======== -Steps: -1. Prepare a `Pulling-Backend` -2. Negotiate a Contract with the Provider -3. Start a Data-Transfer using the `Json-Type` +## Requirements -Preparing the Pulling-Backend ------------------------------ +- An active contract agreement for a data offer you want to consume. +- A Use Case Application / Pull Backend that can be reached from the EDC, and that can reach the Data Planes of that + EDC. -The `Pulling-Backend` is involved in steps 3, 4 and 11 of the diagram. It should provide an endpoint for receiving information regarding the `Data-Transfer-Request` (3). These information can then be used to start the `Pull-Data-Transfer` (4) and receiving the provider data (11). +## Initiating the Transfer -The current EDC-Implementation does not support dynamically setting the url of the Pulling-Backend. As a result sovity has to set the endpoint for the backend manually. Please provide us the corresponding endpoint. +For the EDC send an EDR to your backend application, you need to initiate a transfer process. -Provide an EndpointDataReference Endpoint (4) ---------------------------------------------- -The pulling backend should provide an endpoint to accept the following JSON using a POST Request. +This "transfer process" represents the lifetime of your EDR in which your backend application can initiate as many +transfers as it wants, using the EDR it has received. -Header: Content-Type: `application/json`, Authorization: `{{Auth-Key}}` +### Initiating the Transfer via the UI + +When initiating the transfer, select "Custom Transfer Process JSON", and provide: -Body: ```json { - "id": "2d5348ea-b1e0-4b69-a625-07e7b093944a", - "endpoint": "http://connector-a-dataplane-1:8185/public", - "authKey": "Authorization", - "authCode": "Token", - "properties": { - "cid": "cd:30c40c02-2e8f-4f16-8790-57e517d8b8ab" - } + "@type": "https://w3id.org/edc/v0.0.1/ns/TransferRequest", + "https://w3id.org/edc/v0.0.1/ns/dataDestination": { + "https://w3id.org/edc/v0.0.1/ns/type": "HttpProxy" + }, + "https://w3id.org/edc/v0.0.1/ns/properties": { + "https://w3id.org/edc/v0.0.1/ns/receiverHttpEndpoint": "{{target-pull-backend-url}}" + }, + "https://w3id.org/edc/v0.0.1/ns/protocol": "dataspace-protocol-http", + "https://w3id.org/edc/v0.0.1/ns/managedResources": false } ``` -To pull data a http request to the provided `{{endpoint}}` using the header: `{{authKey}}: {{authCode}}` should be started. +### Initiating the Transfer via the Management API -Starting the Data-Transfer using the "Json-Type" using the EDC-Ui -------------------------------------------------- +`POST` to `https://{{FQDN}}/api/management/v2/transferprocesses` -To trigger a Pull-Data-Transfer the `Json-Type` from the Transfer-Dialog has to be used with the following JSON input: ```json { - "properties": { - "type": "HttpProxy", - "assetId": "{{assetId}}" - } + "@type": "https://w3id.org/edc/v0.0.1/ns/TransferRequest", + "https://w3id.org/edc/v0.0.1/ns/assetId": "{{ASSET_ID}}", + "https://w3id.org/edc/v0.0.1/ns/contractId": "{{CONTRACT_ID}}", + "https://w3id.org/edc/v0.0.1/ns/connectorAddress": "https://{{PROVIDER_EDC_FQDN}}/api/dsp", + "https://w3id.org/edc/v0.0.1/ns/connectorId": "{{PROVIDER_EDC_PARTICIPANT_ID}}", + "https://w3id.org/edc/v0.0.1/ns/dataDestination": { + "https://w3id.org/edc/v0.0.1/ns/type": "HttpProxy", + "https://w3id.org/edc/v0.0.1/ns/baseUrl": "{{target-url}}" + }, + "https://w3id.org/edc/v0.0.1/ns/privateProperties": { + "https://w3id.org/edc/v0.0.1/ns/receiverHttpEndpoint": "{{target-pull-backend-url}}" + }, + "https://w3id.org/edc/v0.0.1/ns/protocol": "dataspace-protocol-http", + "https://w3id.org/edc/v0.0.1/ns/managedResources": false } ``` -`{{assetId}}`: Id of the asset that should be pulled for instance: urn:artifact:bitcoin -Starting the Data-Transfer using the EDC-Api -------------------------------------------------- +## Receiving an Endpoint Data Reference (EDR) + +Your backend receives the EDR from the EDC by the EDC calling the `{{target-pull-backend-url}}` endpoint. -To start a pull-http-transfer using the management-API of the EDC one can send the following request: +The EDC will `POST` on `{{target-pull-backend-url}}`: -`POST` to `{{connector-base-url}}/control/data/transferprocess` ```json { - "protocol": "ids-multipart", - "assetId": "urn:artifact:http-pull", - "contractId": "{{contract-id}}", - "dataDestination": { - "properties": { - "type": "HttpProxy", - "assetId": "urn:artifact:http-pull" - } - }, - "properties": { - "receiver.http.endpoint": "{{target-pull-backend-url}}" - }, - "transferType": { - "contentType": "application/octet-stream", - "isFinite": true - }, - "managedResources": false, - "connectorAddress": "https://{{providerConnectorUrl}}/api/v1/ids/data", - "connectorId": "consumer" + "id": "2d5348ea-b1e0-4b69-a625-07e7b093944a", + "endpoint": "http://connector-a-dataplane-1:8185/public", + "authKey": "Authorization", + "authCode": "Token ..." } ``` -The `receiver.http.endpoint` setting is used to set the endpoint of the Pulling-Backend dynamically. Note that this setting will be renamed `https://w3id.org/edc/v0.0.1/ns/receiverHttpEndpoint` in the future `0.1.0` version of the EDC. \ No newline at end of file +## Getting the Data + +Using that EDR, requesting `GET` on the EDR's `{{ endpoint }}` using the header `{{ authKey }}: {{ authCode }}` +will return the data. + +### Accessing the Contract ID + +The `authCode` JWT Token can be decoded to find the Contract Agreement ID. + +### Parameterized HTTP Data Sources + +- When method proxying is enabled on the providing side, the request method can be adjusted and will be used by the + providing EDC when fetching data from the data source. +- When path proxying is enabled on the providing side, any appended path to the `{{ endpoint }}` will be proxied through + to the data source. +- When query params proxying is enabled on the providing side, added query params will be passed through to the data + source. +- When request body proxying is enabled on the providing side, the request body and content-type headers will be proxied + to the provider side. + diff --git a/docs/postman_collection.json b/docs/postman_collection.json index a5fe51c35..d8f2180b4 100644 --- a/docs/postman_collection.json +++ b/docs/postman_collection.json @@ -1,7 +1,7 @@ { "info": { - "_postman_id": "91a35646-a337-4456-89d0-e3b96d21a593", - "name": "sovity EDC (0.1.2)", + "_postman_id": "c9b798b5-5495-49a2-830a-9f8718f34266", + "name": "sovity EDC (0.2.1)", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ @@ -15,9 +15,7 @@ "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 204 No Content (if new asset) or 409 Conflict (if asset already exists)\", function () {", - " pm.expect(pm.response.code).to.be.oneOf([204, 409])", - "});" + "" ], "type": "text/javascript" } @@ -34,7 +32,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"@context\": {\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\n },\n \"asset\": {\n \"properties\": {\n \"asset:prop:name\": \"http source\",\n \"asset:prop:description\": \"http source asset description\",\n \"edc:id\": \"{{ASSET_ID}}\"\n }\n },\n \"dataAddress\": {\n \"type\": \"HttpData\",\n \"baseUrl\": \"{{PROVIDER_EDC_SOURCE_URL}}\"\n }\n}", + "raw": "{\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/Asset\",\n \"https://w3id.org/edc/v0.0.1/ns/properties\": {\n \"https://w3id.org/edc/v0.0.1/ns/id\": \"{{ASSET_ID}}\",\n \"http://www.w3.org/ns/dcat#version\": \"1.0\",\n \"http://purl.org/dc/terms/language\": \"https://w3id.org/idsa/code/EN\",\n \"http://purl.org/dc/terms/title\": \"test-document\",\n \"http://purl.org/dc/terms/description\": \"my test document\",\n \"http://www.w3.org/ns/dcat#keyword\": [\n \"keyword1\", \n \"keyword2\"\n ],\n \"http://purl.org/dc/terms/creator\": {\n \"http://xmlns.com/foaf/0.1/name\": \"My Org\"\n },\n \"http://purl.org/dc/terms/license\": \"https://creativecommons.org/licenses/by/4.0/\",\n \"http://www.w3.org/ns/dcat#landingPage\": \"https://mydepartment.myorg.com/my-offer\",\n \"http://www.w3.org/ns/dcat#mediaType\": \"text/plain\",\n \"https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyMethod\": \"false\",\n \"https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyPath\": \"false\",\n \"https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyQueryParams\": \"false\",\n \"https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyBody\": \"false\",\n \"http://purl.org/dc/terms/publisher\": {\n \"http://xmlns.com/foaf/0.1/homepage\": \"https://myorg.com/\"\n }\n },\n \"https://w3id.org/edc/v0.0.1/ns/privateProperties\": {},\n \"https://w3id.org/edc/v0.0.1/ns/dataAddress\": {\n \"https://w3id.org/edc/v0.0.1/ns/type\": \"HttpData\",\n \"https://w3id.org/edc/v0.0.1/ns/baseUrl\": \"{{PROVIDER_EDC_SOURCE_URL}}\"\n }\n}", "options": { "raw": { "language": "json" @@ -42,11 +40,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/assets", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v3/assets", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v3", "assets" ] } @@ -60,9 +59,7 @@ "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 204 No Content (if new asset) or 409 Conflict (if asset already exists)\", function () {", - " pm.expect(pm.response.code).to.be.oneOf([204, 409])", - "});" + "" ], "type": "text/javascript" } @@ -79,7 +76,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"@context\": {\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\n },\n \"asset\": {\n \"properties\": {\n \"asset:prop:name\": \"test-document\",\n \"asset:prop:description\": \"test-document\",\n \"edc:id\": \"{{ASSET_ID}}\",\n \"asset:prop:contenttype\": \"text/plain\",\n \"asset:prop:version\": \"1.0\",\n \"type\": \"AzureStorage\",\n \"asset:prop:keywords\": \"keyword1,keyword2\",\n \"asset:prop:language\": \"https://w3id.org/idsa/code/EN\",\n \"asset:prop:publisher\": \"https://sovity.de/\",\n \"asset:prop:standardLicense\": \"https://creativecommons.org/licenses/by/4.0/\",\n \"asset:prop:endpointDocumentation\": \"https://github.com/Mobility-Data-Space/mobility-data-space/wiki/MDS-Ontology\",\n \"http://w3id.org/mds#transportMode\": \"Road\",\n \"http://w3id.org/mds#dataCategory\": \"Traffic Information\",\n \"http://w3id.org/mds#dataSubcategory\": \"Hazard Warnings\",\n \"http://w3id.org/mds#dataModel\": \"CSV\",\n \"http://w3id.org/mds#geoReferenceMethod\": \"Geo Ref Method Test\"\n }\n },\n \"dataAddress\": {\n \"type\": \"HttpData\",\n \"baseUrl\": \"{{PROVIDER_EDC_SOURCE_URL}}\"\n }\n}", + "raw": "{\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/Asset\",\n \"https://w3id.org/edc/v0.0.1/ns/properties\": {\n \"https://w3id.org/edc/v0.0.1/ns/id\": \"{{ASSET_ID}}\",\n \"http://www.w3.org/ns/dcat#version\": \"1.0\",\n \"http://purl.org/dc/terms/language\": \"https://w3id.org/idsa/code/EN\",\n \"http://purl.org/dc/terms/title\": \"test-document\",\n \"http://purl.org/dc/terms/description\": \"my test document\",\n \"http://www.w3.org/ns/dcat#keyword\": [\n \"keyword1\",\n \"keyword2\"\n ],\n \"http://purl.org/dc/terms/creator\": {\n \"http://xmlns.com/foaf/0.1/name\": \"My Org\"\n },\n \"http://purl.org/dc/terms/license\": \"https://creativecommons.org/licenses/by/4.0/\",\n \"http://www.w3.org/ns/dcat#landingPage\": \"https://mydepartment.myorg.com/my-offer\",\n \"http://www.w3.org/ns/dcat#mediaType\": \"text/plain\",\n \"https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyMethod\": \"false\",\n \"https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyPath\": \"false\",\n \"https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyQueryParams\": \"false\",\n \"https://semantic.sovity.io/dcat-ext#httpDatasourceHintsProxyBody\": \"false\",\n \"http://purl.org/dc/terms/publisher\": {\n \"http://xmlns.com/foaf/0.1/homepage\": \"https://myorg.com/\"\n },\n \"http://w3id.org/mds#transportMode\": \"Road\",\n \"http://w3id.org/mds#dataCategory\": \"Traffic Information\",\n \"http://w3id.org/mds#dataSubcategory\": \"Hazard Warnings\",\n \"http://w3id.org/mds#dataModel\": \"CSV\",\n \"http://w3id.org/mds#geoReferenceMethod\": \"Geo Ref Method Test\"\n },\n \"https://w3id.org/edc/v0.0.1/ns/privateProperties\": {},\n \"https://w3id.org/edc/v0.0.1/ns/dataAddress\": {\n \"https://w3id.org/edc/v0.0.1/ns/type\": \"HttpData\",\n \"https://w3id.org/edc/v0.0.1/ns/baseUrl\": \"{{PROVIDER_EDC_SOURCE_URL}}\"\n }\n}", "options": { "raw": { "language": "json" @@ -87,11 +84,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/assets", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v3/assets", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v3", "assets" ] } @@ -105,9 +103,7 @@ "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 204 No Content (if new asset) or 409 Conflict (if asset already exists)\", function () {", - " pm.expect(pm.response.code).to.be.oneOf([204, 409])", - "});" + "" ], "type": "text/javascript" } @@ -115,28 +111,14 @@ ], "request": { "method": "DELETE", - "header": [ - { - "key": "X-Api-Key", - "value": "ApiKeyDefaultValue", - "type": "default" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"asset\": {\n \"properties\": {\n \"asset:prop:name\": \"text-document\",\n \"asset:prop:contenttype\": \"text/plain\",\n \"asset:prop:version\": \"1.0\",\n \"asset:prop:id\": \"text-document\",\n \"type\": \"AzureStorage\"\n }\n },\n \"dataAddress\": {\n \"properties\": {\n \"type\": \"AzureStorage\",\n \"account\": \"{{storage_account}}\",\n \"container\": \"src-container\",\n \"blobname\": \"text-document.txt\",\n \"keyName\": \"{{storage_account}}-key1\"\n }\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, + "header": [], "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/assets/{{ASSET_ID}}", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/assets/{{ASSET_ID}}", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "assets", "{{ASSET_ID}}" ] @@ -151,7 +133,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpecDto\",\r\n \"offset\": 0,\r\n \"limit\": 10\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/QuerySpec\",\r\n \"https://w3id.org/edc/v0.0.1/ns/offset\": 0,\r\n \"https://w3id.org/edc/v0.0.1/ns/limit\": 10\r\n}", "options": { "raw": { "language": "json" @@ -159,11 +141,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/assets/request", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/assets/request", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "assets", "request" ] @@ -183,9 +166,7 @@ "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 204 No Content (if new asset) or 409 Conflict (if asset already exists)\", function () {", - " pm.expect(pm.response.code).to.be.oneOf([204, 409])", - "});" + "" ], "type": "text/javascript" } @@ -202,7 +183,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"@context\": {\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\n },\n \"@type\": \"PolicyDefinitionDto\",\n \"@id\": \"{{POLICY_ID}}\",\n \"policy\": {\n \"@context\": \"https://www.w3.org/ns/odrl.jsonld\",\n \"@type\": \"use\"\n }\n}", + "raw": "{\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/PolicyDefinition\",\n \"@id\": \"{{POLICY_ID}}\",\n \"https://w3id.org/edc/v0.0.1/ns/policy\": {\n \"@type\": \"http://www.w3.org/ns/odrl/2/Set\",\n \"http://www.w3.org/ns/odrl/2/permission\": [\n {\n \"http://www.w3.org/ns/odrl/2/action\": {\n \"http://www.w3.org/ns/odrl/2/type\": \"USE\"\n },\n \"http://www.w3.org/ns/odrl/2/constraint\": []\n }\n ]\n }\n}", "options": { "raw": { "language": "json" @@ -210,11 +191,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/policydefinitions", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/policydefinitions", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "policydefinitions" ] } @@ -228,9 +210,7 @@ "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 204 No Content (if new asset) or 409 Conflict (if asset already exists)\", function () {", - " pm.expect(pm.response.code).to.be.oneOf([204, 409])", - "});" + "" ], "type": "text/javascript" } @@ -247,7 +227,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"@context\": {\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"PolicyDefinitionDto\",\n \"@id\": \"{{POLICY_ID}}\",\n \"edc:policy\": {\n \"@context\": \"https://www.w3.org/ns/odrl.jsonld\",\n \"odrl:permission\": [\n {\n \"odrl:action\": {\n \"odrl:type\": \"USE\"\n },\n \"odrl:constraint\": [\n {\n \"odrl:leftOperand\": \"POLICY_EVALUATION_TIME\",\n \"odrl:operator\": {\n \"@id\": \"odrl:gteq\"\n },\n \"odrl:rightOperand\": \"2022-05-31T22:00:00.000Z\"\n },\n {\n \"odrl:leftOperand\": \"POLICY_EVALUATION_TIME\",\n \"odrl:operator\": {\n \"@id\": \"odrl:lt\"\n },\n \"odrl:rightOperand\": \"2030-06-30T22:00:00.000Z\"\n }\n ]\n }\n ]\n }\n}", + "raw": "{\n \"@type\": \"PolicyDefinitionDto\",\n \"@id\": \"{{POLICY_ID}}\",\n \"https://w3id.org/edc/v0.0.1/ns/policy\": {\n \"@type\": \"http://www.w3.org/ns/odrl/2/Set\",\n \"http://www.w3.org/ns/odrl/2/permission\": [\n {\n \"http://www.w3.org/ns/odrl/2/action\": {\n \"http://www.w3.org/ns/odrl/2/type\": \"USE\"\n },\n \"http://www.w3.org/ns/odrl/2/constraint\": [\n {\n \"http://www.w3.org/ns/odrl/2/leftOperand\": \"POLICY_EVALUATION_TIME\",\n \"http://www.w3.org/ns/odrl/2/operator\": {\n \"@id\": \"http://www.w3.org/ns/odrl/2/gteq\"\n },\n \"http://www.w3.org/ns/odrl/2/rightOperand\": \"2022-05-31T22:00:00.000Z\"\n },\n {\n \"http://www.w3.org/ns/odrl/2/leftOperand\": \"POLICY_EVALUATION_TIME\",\n \"http://www.w3.org/ns/odrl/2/operator\": {\n \"@id\": \"http://www.w3.org/ns/odrl/2/lt\"\n },\n \"http://www.w3.org/ns/odrl/2/rightOperand\": \"2030-06-30T22:00:00.000Z\"\n }\n ]\n }\n ]\n }\n}", "options": { "raw": { "language": "json" @@ -255,11 +235,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/policydefinitions", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/policydefinitions", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "policydefinitions" ] } @@ -273,9 +254,7 @@ "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 204 No Content (if new asset) or 409 Conflict (if asset already exists)\", function () {", - " pm.expect(pm.response.code).to.be.oneOf([204, 409])", - "});" + "" ], "type": "text/javascript" } @@ -292,7 +271,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"@context\": {\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\",\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"PolicyDefinitionDto\",\n \"@id\": \"{{POLICY_ID}}\",\n \"edc:policy\": {\n \"odrl:permission\": [\n {\n \"odrl:action\": {\n \"odrl:type\": \"USE\"\n },\n \"odrl:constraint\": [\n {\n \"odrl:leftOperand\": \"REFERRING_CONNECTOR\",\n \"odrl:operator\": {\n \"@id\": \"odrl:eq\"\n },\n \"odrl:rightOperand\": \"{{CONSUMER_EDC_PROTOCOL_URL}}\"\n }\n ]\n }\n ]\n }\n}", + "raw": "{\n \"@type\": \"PolicyDefinitionDto\",\n \"@id\": \"{{POLICY_ID}}\",\n \"https://w3id.org/edc/v0.0.1/ns/policy\": {\n \"@type\": \"http://www.w3.org/ns/odrl/2/Set\",\n \"http://www.w3.org/ns/odrl/2/permission\": [\n {\n \"http://www.w3.org/ns/odrl/2/action\": {\n \"http://www.w3.org/ns/odrl/2/type\": \"USE\"\n },\n \"http://www.w3.org/ns/odrl/2/constraint\": [\n {\n \"http://www.w3.org/ns/odrl/2/leftOperand\": \"REFERRING_CONNECTOR\",\n \"http://www.w3.org/ns/odrl/2/operator\": {\n \"@id\": \"http://www.w3.org/ns/odrl/2/eq\"\n },\n \"http://www.w3.org/ns/odrl/2/rightOperand\": \"{{CONSUMER_EDC_PARTICIPANT_ID}}\"\n }\n ]\n }\n ]\n }\n}", "options": { "raw": { "language": "json" @@ -300,11 +279,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/policydefinitions", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/policydefinitions", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "policydefinitions" ] } @@ -313,31 +293,18 @@ }, { "name": "2 Delete Policy", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 204 No Content (if new asset) or 409 Conflict (if asset already exists)\", function () {", - " pm.expect(pm.response.code).to.be.oneOf([204, 409])", - "});" - ], - "type": "text/javascript" - } - } - ], "request": { "method": "DELETE", "header": [ { "key": "X-Api-Key", - "value": "ApiKeyDefaultValue", + "value": "pass", "type": "default" } ], "body": { "mode": "raw", - "raw": "{\n \"asset\": {\n \"properties\": {\n \"asset:prop:name\": \"text-document\",\n \"asset:prop:contenttype\": \"text/plain\",\n \"asset:prop:version\": \"1.0\",\n \"asset:prop:id\": \"text-document\",\n \"type\": \"AzureStorage\"\n }\n },\n \"dataAddress\": {\n \"properties\": {\n \"type\": \"AzureStorage\",\n \"account\": \"{{storage_account}}\",\n \"container\": \"src-container\",\n \"blobname\": \"text-document.txt\",\n \"keyName\": \"{{storage_account}}-key1\"\n }\n }\n}", + "raw": "", "options": { "raw": { "language": "json" @@ -345,11 +312,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/policydefinitions/{{POLICY_ID}}", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/policydefinitions/{{POLICY_ID}}", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "policydefinitions", "{{POLICY_ID}}" ] @@ -370,7 +338,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpecDto\",\r\n \"offset\": 0,\r\n \"limit\": 10\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/QuerySpec\",\r\n \"https://w3id.org/edc/v0.0.1/ns/offset\": 0,\r\n \"https://w3id.org/edc/v0.0.1/ns/limit\": 10\r\n}", "options": { "raw": { "language": "json" @@ -378,11 +346,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/policydefinitions/request", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/policydefinitions/request", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "policydefinitions", "request" ] @@ -402,9 +371,7 @@ "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 204 No Content (if new asset) or 409 Conflict (if asset already exists)\", function () {", - " pm.expect(pm.response.code).to.be.oneOf([204, 409])", - "});" + "" ], "type": "text/javascript" } @@ -421,7 +388,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"@context\": {\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\n },\n \"@id\": \"{{CONTRACT_DEFINITION_ID}}\",\n \"@type\": \"ContractDefinition\",\n \"edc:accessPolicyId\": \"{{POLICY_ID}}\",\n \"edc:contractPolicyId\": \"{{POLICY_ID}}\",\n \"edc:assetsSelector\": [\n {\n \"@type\": \"CriterionDto\",\n \"edc:operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/id\",\n \"edc:operator\": \"=\",\n \"edc:operandRight\": \"{{ASSET_ID}}\"\n }\n ]\n}", + "raw": "{\n \"@id\": \"{{CONTRACT_DEFINITION_ID}}\",\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/ContractDefinition\",\n \"https://w3id.org/edc/v0.0.1/ns/accessPolicyId\": \"{{POLICY_ID}}\",\n \"https://w3id.org/edc/v0.0.1/ns/contractPolicyId\": \"{{POLICY_ID}}\",\n \"https://w3id.org/edc/v0.0.1/ns/assetsSelector\": [\n {\n \"@type\": \"CriterionDto\",\n \"https://w3id.org/edc/v0.0.1/ns/operandLeft\": \"https://w3id.org/edc/v0.0.1/ns/id\",\n \"https://w3id.org/edc/v0.0.1/ns/operator\": \"=\",\n \"https://w3id.org/edc/v0.0.1/ns/operandRight\": \"{{ASSET_ID}}\"\n }\n ]\n}", "options": { "raw": { "language": "json" @@ -429,11 +396,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/contractdefinitions", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/contractdefinitions", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "contractdefinitions" ] } @@ -447,9 +415,7 @@ "listen": "test", "script": { "exec": [ - "pm.test(\"Status code is 204 No Content (if new asset) or 409 Conflict (if asset already exists)\", function () {", - " pm.expect(pm.response.code).to.be.oneOf([204, 409])", - "});" + "" ], "type": "text/javascript" } @@ -459,11 +425,12 @@ "method": "DELETE", "header": [], "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/contractdefinitions/{{CONTRACT_DEFINITION_ID}}", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/contractdefinitions/{{CONTRACT_DEFINITION_ID}}", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "contractdefinitions", "{{CONTRACT_DEFINITION_ID}}" ] @@ -475,16 +442,10 @@ "name": "3 Request ContractDefinitions", "request": { "method": "POST", - "header": [ - { - "key": "X-Api-Key", - "value": "pass", - "type": "default" - } - ], + "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpecDto\",\r\n \"offset\": 0,\r\n \"limit\": 10\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/QuerySpec\",\r\n \"https://w3id.org/edc/v0.0.1/ns/offset\": 0,\r\n \"https://w3id.org/edc/v0.0.1/ns/limit\": 10\r\n}", "options": { "raw": { "language": "json" @@ -492,11 +453,12 @@ } }, "url": { - "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/contractdefinitions/request", + "raw": "{{PROVIDER_EDC_MANAGEMENT_URL}}/v2/contractdefinitions/request", "host": [ "{{PROVIDER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "contractdefinitions", "request" ] @@ -513,10 +475,16 @@ "name": "4 Request Catalog", "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Accept", + "value": "application/json", + "type": "default" + } + ], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"providerUrl\": \"{{PROVIDER_EDC_PROTOCOL_URL}}\",\r\n \"querySpec\": {\r\n \"@type\": \"QuerySpecDto\",\r\n \"offset\": 0,\r\n \"limit\": 10\r\n }\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/CatalogRequest\",\r\n \"https://w3id.org/edc/v0.0.1/ns/protocol\": \"dataspace-protocol-http\",\r\n \"https://w3id.org/edc/v0.0.1/ns/counterPartyAddress\": \"{{PROVIDER_EDC_PROTOCOL_URL}}\",\r\n \"https://w3id.org/edc/v0.0.1/ns/querySpec\": {\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/QuerySpec\",\r\n \"https://w3id.org/edc/v0.0.1/ns/offset\": 0,\r\n \"https://w3id.org/edc/v0.0.1/ns/limit\": 10\r\n }\r\n}", "options": { "raw": { "language": "json" @@ -524,11 +492,12 @@ } }, "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/catalog/request", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/catalog/request", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "catalog", "request" ] @@ -548,13 +517,13 @@ "header": [ { "key": "X-Api-Key", - "value": "ApiKeyDefaultValue", + "value": "pass", "type": "default" } ], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"NegotiationInitiateRequestDto\",\r\n \"connectorId\": \"provider\",\r\n \"consumerId\": \"consumer\",\r\n \"providerId\": \"provider\",\r\n \"connectorAddress\": \"{{PROVIDER_EDC_PROTOCOL_URL}}\",\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"offer\": {\r\n \"offerId\": \"{{CONTRACT_DEFINITION_ID}}:{{ASSET_ID}}:b95a4734-009b-44a8-aac6-d36ef5da43c4\",\r\n \"assetId\": \"{{ASSET_ID}}\",\r\n \"policy\": {\r\n \"@id\": \"{{CONTRACT_DEFINITION_ID}}:{{ASSET_ID}}:b95a4734-009b-44a8-aac6-d36ef5da43c4\",\r\n \"@type\": \"http://www.w3.org/ns/odrl/2/Set\",\r\n \"http://www.w3.org/ns/odrl/2/permission\": [],\r\n \"http://www.w3.org/ns/odrl/2/prohibition\": [],\r\n \"http://www.w3.org/ns/odrl/2/obligation\": [],\r\n \"http://www.w3.org/ns/odrl/2/target\": \"http-source\"\r\n }\r\n }\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/ContractRequest\",\r\n \"https://w3id.org/edc/v0.0.1/ns/consumerId\": \"{{CONSUMER_EDC_PARTICIPANT_ID}}\",\r\n \"https://w3id.org/edc/v0.0.1/ns/providerId\": \"{{PROVIDER_EDC_PARTICIPANT_ID}}\",\r\n \"https://w3id.org/edc/v0.0.1/ns/connectorAddress\": \"{{PROVIDER_EDC_PROTOCOL_URL}}\",\r\n \"https://w3id.org/edc/v0.0.1/ns/protocol\": \"dataspace-protocol-http\",\r\n \"https://w3id.org/edc/v0.0.1/ns/offer\": {\r\n \"https://w3id.org/edc/v0.0.1/ns/offerId\": \"Y29udHJhY3QtZGVmaW5pdGlvbi0x:aHR0cC1zb3VyY2UtMQ==:ZjM4ZTJlMTItN2RmMC00ZjU3LTgwNDMtYjM0MzMwYTVkMDA3\",\r\n \"https://w3id.org/edc/v0.0.1/ns/assetId\": \"{{ASSET_ID}}\",\r\n \"https://w3id.org/edc/v0.0.1/ns/policy\": {\r\n \"@id\": \"Y29udHJhY3QtZGVmaW5pdGlvbi0x:aHR0cC1zb3VyY2UtMQ==:ZjM4ZTJlMTItN2RmMC00ZjU3LTgwNDMtYjM0MzMwYTVkMDA3\",\r\n \"@type\": \"http://www.w3.org/ns/odrl/2/Set\",\r\n \"http://www.w3.org/ns/odrl/2/permission\": {\r\n \"http://www.w3.org/ns/odrl/2/target\": \"{{ASSET_ID}}\",\r\n \"http://www.w3.org/ns/odrl/2/action\": {\r\n \"http://www.w3.org/ns/odrl/2/type\": \"USE\"\r\n },\r\n \"http://www.w3.org/ns/odrl/2/constraint\": []\r\n },\r\n \"http://www.w3.org/ns/odrl/2/prohibition\": [],\r\n \"http://www.w3.org/ns/odrl/2/obligation\": [],\r\n \"http://www.w3.org/ns/odrl/2/target\": \"{{ASSET_ID}}\"\r\n }\r\n }\r\n}", "options": { "raw": { "language": "json" @@ -562,11 +531,12 @@ } }, "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/contractnegotiations", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/contractnegotiations", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "contractnegotiations" ] } @@ -586,7 +556,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpecDto\",\r\n \"offset\": 0,\r\n \"limit\": 10\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/QuerySpec\",\r\n \"https://w3id.org/edc/v0.0.1/ns/offset\": 0,\r\n \"https://w3id.org/edc/v0.0.1/ns/limit\": 10\r\n}", "options": { "raw": { "language": "json" @@ -594,11 +564,12 @@ } }, "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/contractnegotiations/request", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/contractnegotiations/request", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "contractnegotiations", "request" ], @@ -625,11 +596,12 @@ } ], "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/contractnegotiations/3f009db0-775d-4dfc-a965-decdf5a76aea/cancel", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/contractnegotiations/3f009db0-775d-4dfc-a965-decdf5a76aea/cancel", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "contractnegotiations", "3f009db0-775d-4dfc-a965-decdf5a76aea", "cancel" @@ -650,11 +622,12 @@ } ], "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/contractnegotiations/88687cb0-1d97-40c5-86c2-ad744afed538/decline", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/contractnegotiations/88687cb0-1d97-40c5-86c2-ad744afed538/decline", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "contractnegotiations", "88687cb0-1d97-40c5-86c2-ad744afed538", "decline" @@ -664,24 +637,25 @@ "response": [] }, { - "name": "5 Get ContractNegotiation", + "name": "5 Get Negotiation", "request": { "method": "GET", "header": [ { "key": "X-Api-Key", - "value": "ApiKeyDefaultValue", + "value": "pass", "type": "default" } ], "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/contractnegotiations/a4f61c8f-2406-4035-b091-ab73023643ac", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/contractnegotiations/88687cb0-1d97-40c5-86c2-ad744afed538", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "contractnegotiations", - "a4f61c8f-2406-4035-b091-ab73023643ac" + "88687cb0-1d97-40c5-86c2-ad744afed538" ] } }, @@ -699,7 +673,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpecDto\",\r\n \"offset\": 0,\r\n \"limit\": 10\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/QuerySpec\",\r\n \"https://w3id.org/edc/v0.0.1/ns/offset\": 0,\r\n \"https://w3id.org/edc/v0.0.1/ns/limit\": 10\r\n}", "options": { "raw": { "language": "json" @@ -707,35 +681,18 @@ } }, "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/contractagreements/request", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/contractagreements/request", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "contractagreements", "request" ] } }, "response": [] - }, - { - "name": "6 Get Contract Agreement", - "request": { - "method": "GET", - "header": [], - "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/contractagreements/{{CONTRACT_DEFINITION_ID}}:{{ASSET_ID}}:3de78ab9-9400-4996-b136-e6ac5201ddd8", - "host": [ - "{{CONSUMER_EDC_MANAGEMENT_URL}}" - ], - "path": [ - "contractagreements", - "{{CONTRACT_DEFINITION_ID}}:{{ASSET_ID}}:3de78ab9-9400-4996-b136-e6ac5201ddd8" - ] - } - }, - "response": [] } ] }, @@ -755,7 +712,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"TransferRequestDto\",\r\n \"dataDestination\": {\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/DataAddress\",\r\n \"edc:type\": \"HttpData\",\r\n \"edc:properties\": {\r\n \"edc:baseUrl\": \"{{CONSUMER_EDC_TRANSFER_TARGET_URL}}\"\r\n }\r\n },\r\n \"protocol\": \"dataspace-protocol-http\",\r\n \"managedResources\": false,\r\n \"assetId\": \"{{ASSET_ID}}\",\r\n \"contractId\": \"{{CONTRACT_DEFINITION_ID}}:{{ASSET_ID}}:2037d0ff-e874-453d-bbb0-64ceed620015\",\r\n \"connectorAddress\": \"{{PROVIDER_EDC_PROTOCOL_URL}}\",\r\n \"privateProperties\": {}\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/TransferRequest\",\r\n \"https://w3id.org/edc/v0.0.1/ns/assetId\": \"{{ASSET_ID}}\",\r\n \"https://w3id.org/edc/v0.0.1/ns/contractId\": \"Y29udHJhY3QtZGVmaW5pdGlvbi0x:aHR0cC1zb3VyY2UtMQ==:MWZhMDk2YzEtODcwNi00NjBiLWJlMmYtZmQyNDFkZWQxYjE3\",\r\n \"https://w3id.org/edc/v0.0.1/ns/connectorAddress\": \"{{PROVIDER_EDC_PROTOCOL_URL}}\",\r\n \"https://w3id.org/edc/v0.0.1/ns/connectorId\": \"{{PROVIDER_EDC_PARTICIPANT_ID}}\",\r\n \"https://w3id.org/edc/v0.0.1/ns/dataDestination\": {\r\n \"https://w3id.org/edc/v0.0.1/ns/type\": \"HttpData\",\r\n \"https://w3id.org/edc/v0.0.1/ns/baseUrl\": \"{{CONSUMER_EDC_TRANSFER_TARGET_URL}}\"\r\n },\r\n \"https://w3id.org/edc/v0.0.1/ns/properties\": {},\r\n \"https://w3id.org/edc/v0.0.1/ns/privateProperties\": {},\r\n \"https://w3id.org/edc/v0.0.1/ns/protocol\": \"dataspace-protocol-http\",\r\n \"https://w3id.org/edc/v0.0.1/ns/managedResources\": false\r\n}", "options": { "raw": { "language": "json" @@ -763,11 +720,12 @@ } }, "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/transferprocesses", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/transferprocesses", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "transferprocesses" ] } @@ -787,7 +745,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"QuerySpecDto\",\r\n \"offset\": 0,\r\n \"limit\": 10\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/QuerySpec\",\r\n \"https://w3id.org/edc/v0.0.1/ns/offset\": 0,\r\n \"https://w3id.org/edc/v0.0.1/ns/limit\": 10\r\n}", "options": { "raw": { "language": "json" @@ -795,11 +753,12 @@ } }, "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/transferprocesses/request", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/transferprocesses/request", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "transferprocesses", "request" ] @@ -820,7 +779,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"@context\": {\r\n \"edc\": \"https://w3id.org/edc/v0.0.1/ns/\"\r\n },\r\n \"@type\": \"TerminateTransferDto\",\r\n \"reason\": \"Termination reason\"\r\n}", + "raw": "{\r\n \"@type\": \"https://w3id.org/edc/v0.0.1/ns/TerminateTransfer\",\r\n \"https://w3id.org/edc/v0.0.1/ns/reason\": \"Termination reason\"\r\n}", "options": { "raw": { "language": "json" @@ -828,11 +787,12 @@ } }, "url": { - "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/transferprocesses/c715355b-1e4b-49a9-9ef0-956405e88fe3/terminate", + "raw": "{{CONSUMER_EDC_MANAGEMENT_URL}}/v2/transferprocesses/c715355b-1e4b-49a9-9ef0-956405e88fe3/terminate", "host": [ "{{CONSUMER_EDC_MANAGEMENT_URL}}" ], "path": [ + "v2", "transferprocesses", "c715355b-1e4b-49a9-9ef0-956405e88fe3", "terminate" @@ -865,10 +825,7 @@ "script": { "type": "text/javascript", "exec": [ - "pm.sendRequest(\"https://postman-echo.com/get\", function (err, response) {", - " console.log(response.json());", - "});", - "pm.environment.set(\"variable_key\", \"variable_value\");" + "" ] } }, @@ -885,12 +842,17 @@ "variable": [ { "key": "PROVIDER_EDC_MANAGEMENT_URL", - "value": "http://localhost:11002/api/management/v2", + "value": "http://localhost:11002/api/management", "type": "default" }, { "key": "PROVIDER_EDC_PROTOCOL_URL", - "value": "http://edc:11003/api/v1/protocol", + "value": "http://edc:11003/api/dsp", + "type": "default" + }, + { + "key": "PROVIDER_EDC_PARTICIPANT_ID", + "value": "my-edc", "type": "default" }, { @@ -900,12 +862,17 @@ }, { "key": "CONSUMER_EDC_MANAGEMENT_URL", - "value": "http://localhost:22002/api/management/v2", + "value": "http://localhost:22002/api/management", "type": "default" }, { "key": "CONSUMER_EDC_PROTOCOL_URL", - "value": "http://edc2:11003/api/v1/protocol", + "value": "http://edc2:11003/api/dsp", + "type": "default" + }, + { + "key": "CONSUMER_EDC_PARTICIPANT_ID", + "value": "my-edc2", "type": "default" }, { @@ -934,4 +901,4 @@ "type": "default" } ] -} +} \ No newline at end of file diff --git a/docs/sovity-edc-api-wrapper.yaml b/docs/sovity-edc-api-wrapper.yaml new file mode 100644 index 000000000..7c162e1b6 --- /dev/null +++ b/docs/sovity-edc-api-wrapper.yaml @@ -0,0 +1,1523 @@ +openapi: 3.0.1 +info: + title: sovity EDC API Wrapper + description: "sovity's EDC API Wrapper contains a selection of APIs for multiple\ + \ consumers, e.g. our EDC UI API, our generic Use Case API, our Commercial APIs,\ + \ etc. We bundled these APIs, so we can have an easier time generating our API\ + \ Client Libraries." + contact: + name: Sovity GmbH + url: https://github.com/sovity/edc-extensions/issues/new/choose + email: contact@sovity.de + license: + name: Apache 2.0 + url: https://github.com/sovity/edc-extensions/blob/main/LICENSE + version: 0.0.0 +externalDocs: + description: EDC API Wrapper Project in sovity/edc-extensions + url: https://github.com/sovity/edc-extensions/tree/main/extensions/wrapper +servers: +- url: "https://[MY_EDC_FQDN]/api/management" +tags: +- name: Enterprise Edition + description: sovity Enterprise Edition EDC API Endpoints. Requires our sovity Enterprise + Edition EDC Extensions. +- name: UI + description: EDC UI API Endpoints +- name: Use Case + description: Generic Use Case Application API Endpoints. +paths: + /wrapper/ee/connector-limits: + get: + tags: + - Enterprise Edition + description: Available and used resources of a connector. + operationId: connectorLimits + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/ConnectorLimits' + /wrapper/ee/file-upload/blobs/{blobId}/asset: + post: + tags: + - Enterprise Edition + summary: Create an asset from an uploaded file. + description: Creates an asset using the uploaded file as data source. + operationId: fileUploadCreateAsset + parameters: + - name: blobId + in: path + description: The Blob ID / URL the file was uploaded into. + required: true + schema: + type: string + requestBody: + description: Metadata for the Asset. File-related metadata might be overridden. + content: + application/json: + schema: + $ref: '#/components/schemas/UiAssetCreateRequest' + required: true + responses: + default: + description: default response + content: + '*/*': {} + /wrapper/ee/file-upload/blobs: + post: + tags: + - Enterprise Edition + summary: Requests a Blob for file upload. + description: Requests a Blob URL with a SAS Token so that the UI can directly + upload the file to the Azure Blob Storage. Returns the Blob ID / Token. + operationId: fileUploadRequestSasToken + responses: + default: + description: default response + content: + application/json: + schema: + type: string + /wrapper/ui/pages/asset-page/assets: + post: + tags: + - UI + description: Create a new Asset + operationId: createAsset + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UiAssetCreateRequest' + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + /wrapper/ui/pages/contract-definition-page/contract-definitions: + post: + tags: + - UI + description: Create a new Contract Definition + operationId: createContractDefinition + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDefinitionRequest' + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + /wrapper/ui/pages/policy-page/policy-definitions: + post: + tags: + - UI + description: Create a new Policy Definition + operationId: createPolicyDefinition + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDefinitionCreateRequest' + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + /wrapper/ui/pages/asset-page/assets/{assetId}: + delete: + tags: + - UI + description: Delete an Asset + operationId: deleteAsset + parameters: + - name: assetId + in: path + required: true + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + /wrapper/ui/pages/contract-definition-page/contract-definitions/{contractDefinitionId}: + delete: + tags: + - UI + description: Delete a Contract Definition + operationId: deleteContractDefinition + parameters: + - name: contractDefinitionId + in: path + required: true + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + /wrapper/ui/pages/policy-page/policy-definitions/{policyId}: + delete: + tags: + - UI + description: Delete a Policy Definition + operationId: deletePolicyDefinition + parameters: + - name: policyId + in: path + required: true + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + /wrapper/ui/pages/asset-page: + get: + tags: + - UI + description: Collect all data for Asset Page + operationId: getAssetPage + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/AssetPage' + /wrapper/ui/pages/catalog-page/data-offers: + get: + tags: + - UI + description: Fetch a connector's data offers + operationId: getCatalogPageDataOffers + parameters: + - name: connectorEndpoint + in: query + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UiDataOffer' + /wrapper/ui/pages/contract-agreement-page: + get: + tags: + - UI + description: Collect all data for the Contract Agreement Page + operationId: getContractAgreementPage + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/ContractAgreementPage' + /wrapper/ui/pages/contract-definition-page: + get: + tags: + - UI + description: Collect all data for Contract Definition Page + operationId: getContractDefinitionPage + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/ContractDefinitionPage' + /wrapper/ui/pages/catalog-page/contract-negotiations/{contractNegotiationId}: + get: + tags: + - UI + description: Get Contract Negotiation Information + operationId: getContractNegotiation + parameters: + - name: contractNegotiationId + in: path + required: true + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/UiContractNegotiation' + /wrapper/ui/pages/dashboard-page: + get: + tags: + - UI + description: Collect all data for the Dashboard Page + operationId: getDashboardPage + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardPage' + /wrapper/ui/pages/policy-page: + get: + tags: + - UI + description: Collect all data for Policy Definition Page + operationId: getPolicyDefinitionPage + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/PolicyDefinitionPage' + /wrapper/ui/pages/transfer-history-page: + get: + tags: + - UI + description: Collect all data for the Transfer History Page + operationId: getTransferHistoryPage + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/TransferHistoryPage' + /wrapper/ui/pages/transfer-history-page/transfer-processes/{transferProcessId}/asset: + get: + tags: + - UI + description: Queries a transfer process' asset + operationId: getTransferProcessAsset + parameters: + - name: transferProcessId + in: path + required: true + schema: + type: string + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/UiAsset' + /wrapper/ui/pages/catalog-page/contract-negotiations: + post: + tags: + - UI + description: Initiate a new Contract Negotiation + operationId: initiateContractNegotiation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ContractNegotiationRequest' + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/UiContractNegotiation' + /wrapper/ui/pages/contract-agreement-page/transfers/custom: + post: + tags: + - UI + description: "Initiate a Transfer Process via a custom Transfer Process JSON-LD.\ + \ Fields such as connectorId, assetId, providerConnectorId, providerConnectorAddress\ + \ will be set automatically." + operationId: initiateCustomTransfer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InitiateCustomTransferRequest' + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + /wrapper/ui/pages/contract-agreement-page/transfers: + post: + tags: + - UI + description: Initiate a Transfer Process + operationId: initiateTransfer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/InitiateTransferRequest' + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/IdResponseDto' + /wrapper/use-case-api/data-offer: + post: + tags: + - Use Case + description: "Creates a new data offer, consisting of an asset, a policy definition\ + \ and a contract definition." + operationId: createOffer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateOfferingDto' + responses: + default: + description: default response + content: + '*/*': {} + /wrapper/use-case-api/kpis: + get: + tags: + - Use Case + description: Basic KPIs about the running EDC Connector. + operationId: getKpis + responses: + default: + description: default response + content: + application/json: + schema: + $ref: '#/components/schemas/KpiResult' + /wrapper/use-case-api/supported-policy-functions: + get: + tags: + - Use Case + description: "List available functions in policies, prohibitions and obligations." + operationId: getSupportedFunctions + responses: + default: + description: default response + content: + application/json: + schema: + type: array + items: + type: string +components: + schemas: + ConnectorLimits: + required: + - numActiveConsumingContractAgreements + type: object + properties: + numActiveConsumingContractAgreements: + type: integer + description: Current amount of active consuming contract agreements. + format: int32 + maxActiveConsumingContractAgreements: + type: integer + description: Maximum amount of active consuming contract agreements. A value + of 'null' or a negative value means that there are no limit. + format: int32 + description: Available and used resources of a connector. + UiAssetCreateRequest: + required: + - dataAddressProperties + - id + type: object + properties: + id: + type: string + description: Asset Id + title: + type: string + description: Asset Title + language: + type: string + description: Asset Language + description: + type: string + description: Asset Description + publisherHomepage: + type: string + description: Asset Homepage + licenseUrl: + type: string + description: License URL + version: + type: string + description: Version + keywords: + type: array + description: Asset Keywords + items: + type: string + description: Asset Keywords + mediaType: + type: string + description: Asset MediaType + landingPageUrl: + type: string + description: Landing Page URL + dataCategory: + type: string + description: Data Category + dataSubcategory: + type: string + description: Data Subcategory + dataModel: + type: string + description: Data Model + geoReferenceMethod: + type: string + description: Geo-Reference Method + transportMode: + type: string + description: Transport Mode + dataAddressProperties: + type: object + additionalProperties: + type: string + description: Data Address + description: Data Address + additionalProperties: + type: object + additionalProperties: + type: string + description: Custom Asset Properties (that are strings) + description: Custom Asset Properties (that are strings) + additionalJsonProperties: + type: object + additionalProperties: + type: string + description: Custom Asset Properties (that are not strings but other JSON + values) + description: Custom Asset Properties (that are not strings but other JSON + values) + privateProperties: + type: object + additionalProperties: + type: string + description: Private Asset Properties (that are strings) + description: Private Asset Properties (that are strings) + privateJsonProperties: + type: object + additionalProperties: + type: string + description: Private Asset Properties (that are not strings but other + JSON values) + description: Private Asset Properties (that are not strings but other JSON + values) + description: Type-Safe OpenAPI generator friendly Asset Create DTO that supports + an opinionated subset of the original EDC Asset Entity. + IdResponseDto: + required: + - id + - lastUpdatedDate + type: object + properties: + id: + type: string + description: ID + lastUpdatedDate: + type: string + description: Change Date + format: date-time + description: Marks the operation as successful + ContractDefinitionRequest: + required: + - accessPolicyId + - assetSelector + - contractDefinitionId + - contractPolicyId + type: object + properties: + contractDefinitionId: + type: string + description: Contract Definition ID + contractPolicyId: + type: string + description: Contract Policy ID + accessPolicyId: + type: string + description: Access Policy ID + assetSelector: + type: array + description: List of Criteria for the contract + items: + $ref: '#/components/schemas/UiCriterion' + description: Data for creating a Contract Definition + UiCriterion: + required: + - operandLeft + - operandRight + - operator + type: object + properties: + operandLeft: + type: string + description: Left Operand + operator: + $ref: '#/components/schemas/UiCriterionOperator' + operandRight: + $ref: '#/components/schemas/UiCriterionLiteral' + description: Contract Definition Criterion as supported by the UI + UiCriterionLiteral: + type: object + properties: + type: + $ref: '#/components/schemas/UiCriterionLiteralType' + value: + type: string + description: Only for type VALUE. The single value representation. + valueList: + type: array + description: "Only for type VALUE_LIST. List of values, e.g. for the IN-Operator." + items: + type: string + description: "Only for type VALUE_LIST. List of values, e.g. for the IN-Operator." + description: Criterion Literal + UiCriterionLiteralType: + type: string + description: Value type of an asset selector criterion right expression value + enum: + - VALUE + - VALUE_LIST + UiCriterionOperator: + type: string + description: Operator for constraints + enum: + - EQ + - IN + - LIKE + OperatorDto: + type: string + description: Operator for policies + enum: + - EQ + - NEQ + - GT + - GEQ + - LT + - LEQ + - IN + - HAS_PART + - IS_A + - IS_ALL_OF + - IS_ANY_OF + - IS_NONE_OF + PolicyDefinitionCreateRequest: + required: + - policy + - policyDefinitionId + type: object + properties: + policyDefinitionId: + type: string + description: Policy Definition ID + policy: + $ref: '#/components/schemas/UiPolicyCreateRequest' + description: Data for creating a Policy Definition + UiPolicyConstraint: + required: + - left + - operator + - right + type: object + properties: + left: + type: string + description: Left side of the expression. + operator: + $ref: '#/components/schemas/OperatorDto' + right: + $ref: '#/components/schemas/UiPolicyLiteral' + description: ODRL AtomicConstraint as supported by our UI + UiPolicyCreateRequest: + type: object + properties: + constraints: + type: array + description: Conjunction of required expressions for the policy to evaluate + to TRUE. + items: + $ref: '#/components/schemas/UiPolicyConstraint' + description: Type-Safe OpenAPI generator friendly Policy Create DTO that supports + an opinionated subset of the original EDC Policy Entity. + UiPolicyLiteral: + required: + - type + type: object + properties: + type: + $ref: '#/components/schemas/UiPolicyLiteralType' + value: + type: string + description: Only for types STRING and JSON + valueList: + type: array + description: Only for type STRING_LIST + items: + type: string + description: Only for type STRING_LIST + description: "Sum type: A String, a list of Strings or a generic JSON value." + UiPolicyLiteralType: + type: string + description: Supported Types of values for the right hand side of an expression + enum: + - STRING + - STRING_LIST + - JSON + AssetPage: + required: + - assets + type: object + properties: + assets: + type: array + description: Visible Assets + items: + $ref: '#/components/schemas/UiAsset' + description: All data for the Asset Page + UiAsset: + required: + - assetId + - connectorEndpoint + - creatorOrganizationName + - participantId + - title + type: object + properties: + assetId: + type: string + description: Asset Id + connectorEndpoint: + type: string + description: Providing Connector's Connector Endpoint + participantId: + type: string + description: Providing Connector's Participant ID + title: + type: string + description: Asset Title + creatorOrganizationName: + type: string + description: Asset Organization Name + language: + type: string + description: Asset Language + description: + type: string + description: Asset Description + publisherHomepage: + type: string + description: Asset Homepage + licenseUrl: + type: string + description: License URL + version: + type: string + description: Version + keywords: + type: array + description: Asset Keywords + items: + type: string + description: Asset Keywords + mediaType: + type: string + description: Asset MediaType + landingPageUrl: + type: string + description: Homepage URL associated with the Asset + httpDatasourceHintsProxyMethod: + type: boolean + description: HTTP Datasource Hints Proxy Method + httpDatasourceHintsProxyPath: + type: boolean + description: HTTP Datasource Hints Proxy Path + httpDatasourceHintsProxyQueryParams: + type: boolean + description: HTTP Datasource Hints Proxy Query Params + httpDatasourceHintsProxyBody: + type: boolean + description: HTTP Datasource Hints Proxy Body + dataCategory: + type: string + description: Data Category + dataSubcategory: + type: string + description: Data Subcategory + dataModel: + type: string + description: Data Model + geoReferenceMethod: + type: string + description: Geo-Reference Method + transportMode: + type: string + description: Transport Mode + additionalProperties: + type: object + additionalProperties: + type: string + description: Unhandled Asset Properties (that were strings) + description: Unhandled Asset Properties (that were strings) + additionalJsonProperties: + type: object + additionalProperties: + type: string + description: Unhandled Asset Properties (that were not strings but other + JSON values) + description: Unhandled Asset Properties (that were not strings but other + JSON values) + privateProperties: + type: object + additionalProperties: + type: string + description: Private Asset Properties (that were strings) + description: Private Asset Properties (that were strings) + privateJsonProperties: + type: object + additionalProperties: + type: string + description: Private Asset Properties (that were not strings but other + JSON values) + description: Private Asset Properties (that were not strings but other JSON + values) + assetJsonLd: + type: string + description: Contains the entire asset in the JSON-LD format + description: Type-Safe Asset Metadata as needed by our UI + UiContractOffer: + required: + - contractOfferId + - policy + type: object + properties: + contractOfferId: + type: string + description: Contract Offer ID + policy: + $ref: '#/components/schemas/UiPolicy' + description: Catalog Data Offer's Contract Offer as required by the UI + UiDataOffer: + required: + - asset + - contractOffers + - endpoint + - participantId + type: object + properties: + endpoint: + type: string + description: Connector Endpoint + participantId: + type: string + description: Participant ID. Required for initiating transfers. + asset: + $ref: '#/components/schemas/UiAsset' + contractOffers: + type: array + description: Available Contract Offers + items: + $ref: '#/components/schemas/UiContractOffer' + description: Catalog Data Offer as required by the UI + UiPolicy: + required: + - errors + - policyJsonLd + type: object + properties: + policyJsonLd: + type: string + description: EDC Policy JSON-LD. This is required because the EDC requires + the full policy when initiating contract negotiations. + constraints: + type: array + description: Conjunction of required expressions for the policy to evaluate + to TRUE. + items: + $ref: '#/components/schemas/UiPolicyConstraint' + errors: + type: array + description: "When trying to reduce the policy JSON-LD to our opinionated\ + \ subset of functionalities, many fields and functionalities are unsupported.\ + \ Should any discrepancies occur during the mapping process, we'll collect\ + \ them here." + items: + type: string + description: "When trying to reduce the policy JSON-LD to our opinionated\ + \ subset of functionalities, many fields and functionalities are unsupported.\ + \ Should any discrepancies occur during the mapping process, we'll collect\ + \ them here." + description: Type-Safe OpenAPI generator friendly Policy DTO as needed by our + UI + ContractAgreementCard: + required: + - asset + - contractAgreementId + - contractNegotiationId + - contractPolicy + - contractSigningDate + - counterPartyAddress + - counterPartyId + - direction + - transferProcesses + type: object + properties: + contractAgreementId: + type: string + description: Contract Agreement ID + contractNegotiationId: + type: string + description: Contract Negotiation ID + direction: + $ref: '#/components/schemas/ContractAgreementDirection' + counterPartyAddress: + type: string + description: Other Connector's Endpoint + counterPartyId: + type: string + description: Other Connector's ID + contractSigningDate: + type: string + description: Contract Agreements Signing Date + format: date-time + asset: + $ref: '#/components/schemas/UiAsset' + contractPolicy: + $ref: '#/components/schemas/UiPolicy' + transferProcesses: + type: array + description: Contract Agreement's Transfer Processes + items: + $ref: '#/components/schemas/ContractAgreementTransferProcess' + description: Contract Agreement for Contract Agreement Page + ContractAgreementDirection: + type: string + description: Whether the contract agreement is incoming or outgoing + enum: + - CONSUMING + - PROVIDING + ContractAgreementPage: + required: + - contractAgreements + type: object + properties: + contractAgreements: + type: array + description: Contract Agreement Cards + items: + $ref: '#/components/schemas/ContractAgreementCard' + ContractAgreementTransferProcess: + required: + - lastUpdatedDate + - state + - transferProcessId + type: object + properties: + transferProcessId: + type: string + description: Transfer Process ID + lastUpdatedDate: + type: string + description: Last Change Date + format: date-time + state: + $ref: '#/components/schemas/TransferProcessState' + errorMessage: + type: string + description: Error Message + description: A Contract Agreement's Transfer Process + TransferProcessSimplifiedState: + type: string + description: Simplified Transfer Process State to be used in UI + enum: + - RUNNING + - OK + - ERROR + TransferProcessState: + required: + - code + - name + - simplifiedState + type: object + properties: + name: + type: string + description: State name or 'CUSTOM'. State names only exist for original + EDC Transfer Process States. + code: + type: integer + description: State code + format: int32 + simplifiedState: + $ref: '#/components/schemas/TransferProcessSimplifiedState' + description: Transfer Process State interpreted + ContractDefinitionEntry: + required: + - accessPolicyId + - assetSelector + - contractDefinitionId + - contractPolicyId + type: object + properties: + contractDefinitionId: + type: string + description: Contract Definition ID + accessPolicyId: + type: string + description: Access Policy ID + contractPolicyId: + type: string + description: Contract Policy ID + assetSelector: + type: array + description: Criteria for the contract + items: + $ref: '#/components/schemas/UiCriterion' + description: Contract Definition List Entry for Contract Definition Page + ContractDefinitionPage: + required: + - contractDefinitions + type: object + properties: + contractDefinitions: + type: array + description: Contract Definition Entries + items: + $ref: '#/components/schemas/ContractDefinitionEntry' + description: All data for the Contract Definition Page + ContractNegotiationSimplifiedState: + type: string + description: Simplified Contract Negotiation State to be used in UI + enum: + - IN_PROGRESS + - AGREED + - TERMINATED + ContractNegotiationState: + required: + - code + - name + - simplifiedState + type: object + properties: + name: + type: string + description: State name or 'CUSTOM'. State names only exist for original + EDC Contract Negotiation States. + code: + type: integer + description: State code + format: int32 + simplifiedState: + $ref: '#/components/schemas/ContractNegotiationSimplifiedState' + description: Contract Negotiation State interpreted + UiContractNegotiation: + required: + - contractNegotiationId + - createdAt + - state + type: object + properties: + contractNegotiationId: + type: string + description: Contract Negotiation Id + createdAt: + type: string + description: Contract Negotiation Creation Time + format: date-time + contractAgreementId: + type: string + description: Contract Agreement Id + state: + $ref: '#/components/schemas/ContractNegotiationState' + description: Contract Negotiation Information + DashboardDapsConfig: + required: + - jwksUrl + - tokenUrl + type: object + properties: + tokenUrl: + type: string + description: Your Connector's DAPS Token URL + jwksUrl: + type: string + description: Your Connector's DAPS JWKS URL + description: DAPS Config + DashboardMiwConfig: + required: + - authorityId + - tokenUrl + - url + type: object + properties: + url: + type: string + description: Your Connector's MIW's URL + tokenUrl: + type: string + description: Your Connector's MIW's Token URL + authorityId: + type: string + description: Your Connector's MIW's Authority ID + description: Managed Identity Wallet (MIW) Config + DashboardPage: + required: + - connectorCuratorName + - connectorCuratorUrl + - connectorDescription + - connectorEndpoint + - connectorMaintainerName + - connectorMaintainerUrl + - connectorParticipantId + - connectorTitle + - numAssets + - numContractAgreementsConsuming + - numContractAgreementsProviding + - numContractDefinitions + - numPolicies + - transferProcessesConsuming + - transferProcessesProviding + type: object + properties: + numAssets: + type: integer + description: Number of Assets + format: int32 + numPolicies: + type: integer + description: Number of Policies + format: int32 + numContractDefinitions: + type: integer + description: Number of Contract Definitions + format: int32 + numContractAgreementsConsuming: + type: integer + description: Number of consuming Contract Agreements + format: int64 + numContractAgreementsProviding: + type: integer + description: Number of providing Contract Agreements + format: int64 + transferProcessesConsuming: + $ref: '#/components/schemas/DashboardTransferAmounts' + transferProcessesProviding: + $ref: '#/components/schemas/DashboardTransferAmounts' + connectorEndpoint: + type: string + description: Your Connector's Connector Endpoint + connectorParticipantId: + type: string + description: Your Connector's Participant ID + connectorTitle: + type: string + description: Your Connector's Title + connectorDescription: + type: string + description: Your Connector's Description + connectorCuratorUrl: + type: string + description: Your Organization Homepage + connectorCuratorName: + type: string + description: Your Organization Name + connectorMaintainerUrl: + type: string + description: Your Connector's Maintainer's Organization Homepage + connectorMaintainerName: + type: string + description: Your Connector's Maintainer's Organization Name + connectorDapsConfig: + $ref: '#/components/schemas/DashboardDapsConfig' + connectorMiwConfig: + $ref: '#/components/schemas/DashboardMiwConfig' + DashboardTransferAmounts: + required: + - numError + - numOk + - numRunning + - numTotal + type: object + properties: + numTotal: + type: integer + description: Number of Transfer Processes + format: int64 + numRunning: + type: integer + description: Number of running Transfer Processes + format: int64 + numOk: + type: integer + description: Number of successful Transfer Processes + format: int64 + numError: + type: integer + description: Number of failed Transfer Processes + format: int64 + description: Providing Transfer Process Amounts + PolicyDefinitionDto: + required: + - policy + - policyDefinitionId + type: object + properties: + policyDefinitionId: + type: string + description: Policy Definition ID + policy: + $ref: '#/components/schemas/UiPolicy' + description: Policy Definition as required for the Policy Definition Page + PolicyDefinitionPage: + required: + - policies + type: object + properties: + policies: + type: array + description: Policy Definition Entries + items: + $ref: '#/components/schemas/PolicyDefinitionDto' + description: All data for the policy definition page as required by the UI + TransferHistoryEntry: + required: + - assetId + - assetName + - contractAgreementId + - counterPartyConnectorEndpoint + - createdDate + - direction + - lastUpdatedDate + - state + - transferProcessId + type: object + properties: + transferProcessId: + type: string + description: Transfer Process ID + createdDate: + type: string + description: Created Date + format: date-time + lastUpdatedDate: + type: string + description: Last Change Date + format: date-time + state: + $ref: '#/components/schemas/TransferProcessState' + contractAgreementId: + type: string + description: Contract Agreement ID + direction: + $ref: '#/components/schemas/ContractAgreementDirection' + counterPartyConnectorEndpoint: + type: string + description: Other Connector's Endpoint + assetName: + type: string + description: Asset Name + assetId: + type: string + description: Asset ID + errorMessage: + type: string + description: Error Message + description: Transfer History Entry for Transfer History Page + TransferHistoryPage: + required: + - transferEntries + type: object + properties: + transferEntries: + type: array + description: Transfer History Page Entries + items: + $ref: '#/components/schemas/TransferHistoryEntry' + ContractNegotiationRequest: + required: + - assetId + - contractOfferId + - counterPartyAddress + - counterPartyParticipantId + - policyJsonLd + type: object + properties: + counterPartyAddress: + type: string + description: Counter Party Address + counterPartyParticipantId: + type: string + description: Counter Party Participant ID + contractOfferId: + type: string + description: 'Contract Offer Dto ' + policyJsonLd: + type: string + description: Policy JsonLd + assetId: + type: string + description: Asset ID + description: Data for initiating a Contract Negotiation + InitiateCustomTransferRequest: + required: + - contractAgreementId + - transferProcessRequestJsonLd + type: object + properties: + contractAgreementId: + type: string + description: Contract Agreement ID + transferProcessRequestJsonLd: + type: string + description: "Partial TransferProcessRequestJsonLd JSON-LD. Fields participantId,\ + \ connectorEndpoint, assetId and contractId can be omitted, they will\ + \ be overridden with information from the contract." + description: Required data for starting a Contract Agreement's Transfer Process + InitiateTransferRequest: + required: + - contractAgreementId + - dataSinkProperties + - transferProcessProperties + type: object + properties: + contractAgreementId: + type: string + description: Contract Agreement ID + dataSinkProperties: + type: object + additionalProperties: + type: string + description: Data Sink / Data Address + description: Data Sink / Data Address + transferProcessProperties: + type: object + additionalProperties: + type: string + description: Additional transfer process properties. These are not passed + to the consumer EDC + description: Additional transfer process properties. These are not passed + to the consumer EDC + description: "For type PARAMS_ONLY: Required data for starting a Transfer Process" + AssetEntryDto: + required: + - assetRequestId + - dataAddressProperties + type: object + properties: + assetRequestId: + type: string + assetRequestProperties: + type: object + additionalProperties: + type: object + dataAddressProperties: + type: object + additionalProperties: + type: string + description: At least a property 'type' must be set + description: At least a property 'type' must be set + AtomicConstraintDto: + required: + - leftExpression + - operator + - rightExpression + type: object + properties: + leftExpression: + type: string + description: Left part of the constraint. + operator: + $ref: '#/components/schemas/OperatorDto' + rightExpression: + type: string + description: Right part of the constraint. + description: Type-Safe OpenAPI generator friendly Constraint DTO that supports + an opinionated subset of the original EDC Constraint Entity. + ContractDefinitionRequestDto: + required: + - accessPolicyId + - assetsSelector + - contractPolicyId + type: object + properties: + id: + type: string + accessPolicyId: + type: string + contractPolicyId: + type: string + assetsSelector: + type: array + items: + $ref: '#/components/schemas/CriterionDto' + CreateOfferingDto: + type: object + properties: + assetEntry: + $ref: '#/components/schemas/AssetEntryDto' + policyDefinitionRequest: + $ref: '#/components/schemas/PolicyDefinitionRequestDto' + contractDefinitionRequest: + $ref: '#/components/schemas/ContractDefinitionRequestDto' + description: Necessary data for creating an offer + CriterionDto: + required: + - operandLeft + - operator + type: object + properties: + operandLeft: + type: object + operator: + type: string + operandRight: + type: object + ExpressionDto: + type: object + properties: + type: + $ref: '#/components/schemas/ExpressionType' + atomicConstraint: + $ref: '#/components/schemas/AtomicConstraintDto' + and: + type: array + items: + $ref: '#/components/schemas/ExpressionDto' + or: + type: array + items: + $ref: '#/components/schemas/ExpressionDto' + xor: + type: array + items: + $ref: '#/components/schemas/ExpressionDto' + description: Possible constraints for the permission + ExpressionType: + type: string + description: | + Expression types: + * `EMPTY` - No constraints for the policy + * `ATOMIC_CONSTRAINT` - A single constraint for the policy + * `AND` - Several constraints, all of which must be respected + * `OR` - Several constraints, of which at least one must be respected + * `XOR` - Several constraints, of which exactly one must be respected + enum: + - EMPTY + - ATOMIC_CONSTRAINT + - AND + - OR + - XOR + PermissionDto: + required: + - constraints + type: object + properties: + constraints: + $ref: '#/components/schemas/ExpressionDto' + description: Permission for this policy + PolicyDefinitionRequestDto: + required: + - id + - policy + type: object + properties: + id: + type: string + description: ID chosen by the user + policy: + $ref: '#/components/schemas/PolicyDto' + description: Data for creating a policy definition request + PolicyDto: + required: + - legacyPolicy + - permission + type: object + properties: + legacyPolicy: + type: string + description: Legacy JSON as built by the Management API. Will be replaced + in the future by a type-safe variant without polymorphisms that can be + used for our generated clients. + permission: + $ref: '#/components/schemas/PermissionDto' + description: Type-Safe OpenAPI generator friendly Policy DTO that supports an + opinionated subset of the original EDC Policy Entity. + KpiResult: + required: + - assetsCount + - contractAgreementsCount + - contractDefinitionsCount + - policiesCount + - transferProcessDto + type: object + properties: + assetsCount: + type: integer + description: Counts of assets + format: int32 + policiesCount: + type: integer + description: Counts of policies + format: int32 + contractDefinitionsCount: + type: integer + description: Counts of contract definitions + format: int32 + contractAgreementsCount: + type: integer + description: Counts of contract agreements + format: int32 + transferProcessDto: + $ref: '#/components/schemas/TransferProcessStatesDto' + description: EDC-status-defining KPIs + TransferProcessStatesDto: + required: + - incomingTransferProcessCounts + - outgoingTransferProcessCounts + type: object + properties: + incomingTransferProcessCounts: + type: object + additionalProperties: + type: integer + description: States and count of incoming transferprocess counts + format: int64 + description: States and count of incoming transferprocess counts + outgoingTransferProcessCounts: + type: object + additionalProperties: + type: integer + description: States and counts of outgoing transferprocess counts + format: int64 + description: States and counts of outgoing transferprocess counts + description: Counts of incoming and outgoing TransferProcesses and status diff --git a/extensions/postgres-flyway/src/main/java/de/sovity/edc/extension/postgresql/migration/DatabaseMigrationManager.java b/extensions/postgres-flyway/src/main/java/de/sovity/edc/extension/postgresql/migration/DatabaseMigrationManager.java index baebbe162..71794207d 100644 --- a/extensions/postgres-flyway/src/main/java/de/sovity/edc/extension/postgresql/migration/DatabaseMigrationManager.java +++ b/extensions/postgres-flyway/src/main/java/de/sovity/edc/extension/postgresql/migration/DatabaseMigrationManager.java @@ -20,7 +20,6 @@ import java.util.Arrays; import java.util.List; -import java.util.stream.Collectors; public class DatabaseMigrationManager { @Setting @@ -31,6 +30,19 @@ public class DatabaseMigrationManager { private final Config config; private final FlywayService flywayService; + private final List dataSourceNames = List.of( + // Pre EDC 0 legacy migrations + "asset", + "contractdefinition", + "policy", + "contractnegotiation", + "transferprocess", + "dataplaneinstance", + + // Actual DB migrations + "default" + ); + public DatabaseMigrationManager(Config config, FlywayService flywayService) { this.config = config; this.flywayService = flywayService; @@ -38,25 +50,13 @@ public DatabaseMigrationManager(Config config, FlywayService flywayService) { public void migrateAllDataSources() { flywayService.cleanDatabase(DEFAULT_DATASOURCE, new JdbcConnectionProperties(config, DEFAULT_DATASOURCE)); - for (String datasourceName : getDataSourceNames(config)) { + for (String datasourceName : dataSourceNames) { var jdbcConnectionProperties = new JdbcConnectionProperties(config, datasourceName); List additionalMigrationLocations = getAdditionalFlywayMigrationLocations(datasourceName); flywayService.migrateDatabase(datasourceName, jdbcConnectionProperties, additionalMigrationLocations); } } - private List getDataSourceNames(Config config) { - var edcDatasourceConfig = config.getConfig(EDC_DATASOURCE_PREFIX); - var dataSourceNames = edcDatasourceConfig.partition().toList().stream() - .map(Config::currentNode) - .collect(Collectors.toList()); - // The default data source is always migrated last - if (dataSourceNames.remove(DEFAULT_DATASOURCE)) { - dataSourceNames.add(DEFAULT_DATASOURCE); - } - return dataSourceNames; - } - public List getAdditionalFlywayMigrationLocations(String datasourceName) { // Only the default data has configurable additional migration scripts if (!datasourceName.equals(DEFAULT_DATASOURCE)) { diff --git a/extensions/wrapper/README.md b/extensions/wrapper/README.md index 2baffebea..85c01afdd 100644 --- a/extensions/wrapper/README.md +++ b/extensions/wrapper/README.md @@ -5,7 +5,7 @@ Logo -

EDC-Connector Extension:
API Wrapper & API Clients

+

sovity EDC API Wrapper

Report Bug @@ -14,31 +14,35 @@

-## About this Extension +## sovity EDC API Wrapper -To provide type-safe JSON APIs for both our Connector UI and Use Case Applications, -we provide an API Wrapper around the Connector over the JSON-LD Management API of the EDC Connector. +We provide a full type-safe and opinionated API Wrapper for better access to the EDC Connector's functionality. -These APIs are more opinionated and use-case tailored. +## Explore -This module contains: +Create and consume Data Offers using clean type-safe JSON REST APIs: +- [API Wrapper OpenAPI YAML](../../docs/sovity-edc-api-wrapper.yaml). +- [Java API Client Library](./clients/java-client) +- [TypeScript API Client Library](./clients/typescript-client) +## Compatibility + +Our EDC API Wrapper APIs and API Clients are compatible with both our sovity EDC Community Edition and sovity EDC Enterprise Editions. + +## Modules + +- The [sovity EDC API Wrapper Extension](./wrapper), serving implementations for our Community Edition APIs. - API Definitions: - - [sovity Community Edition EDC API](./wrapper-api) - - [sovity Enterprise Edition EDC API](./wrapper-ee-api) - - [Broker / Connector Common API](./wrapper-common-api) -- API Client Libraries: - - [Java API Client](./clients/java-client) - - [TypeScript API Client](./clients/typescript-client) - - more to come -- An [EDC Extension](./wrapper) serving the implementations for the sovity Community Edition API. -- [Broker / Connector Common Services](./wrapper-common-mappers) - -## Why does this extension exist? - -The goal is to design an API such that it can be used losslessly with OpenAPI 3.0 generators to provide different client -implementations. Furthermore, the decoupling of EDC Core APIs and a custom API facade allows better backwards -compatibility. + - The sovity Community Edition EDC [API Definitions](./wrapper-api), including the [Connector UI API](wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui) and [Use Case API](wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/usecase). + - The sovity Enterprise Edition EDC [API Definitions](./wrapper-ee-api). +- [Client Libraries](./clients) and example projects: + - [Java API Client Library](./clients/java-client) + - [Java API Client Library Example](./clients/java-client-example) + - [TypeScript API Client Library](./clients/typescript-client) + - [TypeScript API Client Library Example](./clients/typescript-client-example) +- Utilities: + - Broker UI / Connector UI [Common Models](./wrapper-common-api) + - Broker / Connector [Common Services](./wrapper-common-mappers) ## License diff --git a/extensions/wrapper/clients/java-client-example/src/main/java/de/sovity/edc/client/examples/EdcClientSetup.java b/extensions/wrapper/clients/java-client-example/src/main/java/de/sovity/edc/client/examples/EdcClientSetup.java index efc594192..bd720f00e 100644 --- a/extensions/wrapper/clients/java-client-example/src/main/java/de/sovity/edc/client/examples/EdcClientSetup.java +++ b/extensions/wrapper/clients/java-client-example/src/main/java/de/sovity/edc/client/examples/EdcClientSetup.java @@ -15,15 +15,14 @@ package de.sovity.edc.client.examples; import de.sovity.edc.client.EdcClient; +import io.quarkus.logging.Log; import io.quarkus.runtime.configuration.ConfigUtils; import org.eclipse.microprofile.config.inject.ConfigProperty; -import java.util.logging.Logger; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Produces; public class EdcClientSetup { - private static final Logger LOG = Logger.getLogger(EdcClientSetup.class.getName()); @ConfigProperty(name = "my-edc.management-api-url") String managementApiUrl; @@ -44,11 +43,11 @@ public EdcClient buildEdcClient() { private void testEdcConnection(EdcClient client) { if (ConfigUtils.getProfiles().contains("test")) { - LOG.info("Skipping EDC connection test."); + Log.info("Skipping EDC connection test."); return; } client.testConnection(); - LOG.info("Successfully connected to EDC Connector %s.".formatted(managementApiUrl)); + Log.info("Successfully connected to EDC Connector %s.".formatted(managementApiUrl)); } } diff --git a/extensions/wrapper/clients/java-client-example/src/main/java/de/sovity/edc/client/examples/GreetingResource.java b/extensions/wrapper/clients/java-client-example/src/main/java/de/sovity/edc/client/examples/GreetingResource.java index 7fd4958b2..c03f33f8d 100644 --- a/extensions/wrapper/clients/java-client-example/src/main/java/de/sovity/edc/client/examples/GreetingResource.java +++ b/extensions/wrapper/clients/java-client-example/src/main/java/de/sovity/edc/client/examples/GreetingResource.java @@ -15,11 +15,11 @@ package de.sovity.edc.client.examples; import de.sovity.edc.client.EdcClient; +import de.sovity.edc.client.gen.model.KpiResult; import java.util.List; import javax.inject.Inject; import javax.ws.rs.GET; -import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @@ -30,15 +30,15 @@ public class GreetingResource { EdcClient edcClient; @GET - @Produces(MediaType.TEXT_PLAIN) - public String greeting() { - return "Backend-fetched KPI Information:%n%s".formatted(edcClient.useCaseApi().getKpis().toString()); + @Produces(MediaType.APPLICATION_JSON) + public KpiResult getKpis() { + return edcClient.useCaseApi().getKpis(); } - @POST - @Path("supported-policies") + @GET + @Path("supported-policy-functions") @Produces(MediaType.APPLICATION_JSON) - public List getSupportedPolicies() { + public List getSupportedPolicyFunctions() { return edcClient.useCaseApi().getSupportedFunctions(); } } diff --git a/extensions/wrapper/clients/java-client-example/src/test/java/de/sovity/edc/client/examples/GreetingResourceTest.java b/extensions/wrapper/clients/java-client-example/src/test/java/de/sovity/edc/client/examples/GreetingResourceTest.java index 589db1b08..4617344e5 100644 --- a/extensions/wrapper/clients/java-client-example/src/test/java/de/sovity/edc/client/examples/GreetingResourceTest.java +++ b/extensions/wrapper/clients/java-client-example/src/test/java/de/sovity/edc/client/examples/GreetingResourceTest.java @@ -17,11 +17,14 @@ import de.sovity.edc.client.EdcClient; import de.sovity.edc.client.gen.api.UseCaseApi; import de.sovity.edc.client.gen.model.KpiResult; +import de.sovity.edc.client.gen.model.TransferProcessStatesDto; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.mockito.InjectMock; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import java.util.Map; + import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.is; import static org.mockito.Mockito.mock; @@ -41,17 +44,16 @@ void setup() { } @Test - void testHelloEndpoint() { - var myResult = mock(KpiResult.class); - when(myResult.toString()).thenReturn("RESULT"); - - when(useCaseApi.getKpis()).thenReturn(myResult); + void testGetKpis() { + var kpiResult = new KpiResult(); + kpiResult.setAssetsCount(3); + when(useCaseApi.getKpis()).thenReturn(kpiResult); given() .when().get("/") .then() .statusCode(200) - .body(is("Backend-fetched KPI Information:%nRESULT".formatted())); + .body("assetsCount", is(3)); } } diff --git a/extensions/wrapper/clients/java-client/build.gradle.kts b/extensions/wrapper/clients/java-client/build.gradle.kts index 2a0661081..844184df4 100644 --- a/extensions/wrapper/clients/java-client/build.gradle.kts +++ b/extensions/wrapper/clients/java-client/build.gradle.kts @@ -48,12 +48,12 @@ tasks.getByName("test") { } // Extract the openapi file from the JAR -val openapiFile = "edc-api-wrapper.yaml" +val openapiFile = "sovity-edc-api-wrapper.yaml" task("extractOpenapiYaml") { dependsOn(openapiYaml) into("${project.buildDir}") from(zipTree(openapiYaml.singleFile)) { - include("edc-api-wrapper.yaml") + include(openapiFile) } } diff --git a/extensions/wrapper/clients/java-client/src/main/java/de/sovity/edc/client/EdcClientBuilder.java b/extensions/wrapper/clients/java-client/src/main/java/de/sovity/edc/client/EdcClientBuilder.java index dafc8d53d..64a0647b1 100644 --- a/extensions/wrapper/clients/java-client/src/main/java/de/sovity/edc/client/EdcClientBuilder.java +++ b/extensions/wrapper/clients/java-client/src/main/java/de/sovity/edc/client/EdcClientBuilder.java @@ -14,10 +14,14 @@ package de.sovity.edc.client; +import de.sovity.edc.client.gen.ApiClient; import de.sovity.edc.client.oauth2.OAuth2ClientCredentials; import lombok.Getter; import lombok.Setter; import lombok.experimental.Accessors; +import okhttp3.OkHttpClient; + +import java.util.function.Consumer; @Getter @Setter @@ -38,6 +42,13 @@ public class EdcClientBuilder { */ private OAuth2ClientCredentials oauth2ClientCredentials; + /** + * Custom configurer for the {@link ApiClient} and the {@link ApiClient#getHttpClient()}/{@link ApiClient#setHttpClient(OkHttpClient)} + * for environments with custom authentication mechanisms. + */ + private Consumer customConfigurer; + + public EdcClient build() { return EdcClientFactory.newClient(this); } diff --git a/extensions/wrapper/clients/java-client/src/main/java/de/sovity/edc/client/EdcClientFactory.java b/extensions/wrapper/clients/java-client/src/main/java/de/sovity/edc/client/EdcClientFactory.java index 4981a2e0c..02ad27da4 100644 --- a/extensions/wrapper/clients/java-client/src/main/java/de/sovity/edc/client/EdcClientFactory.java +++ b/extensions/wrapper/clients/java-client/src/main/java/de/sovity/edc/client/EdcClientFactory.java @@ -52,6 +52,10 @@ public static EdcClient newClient(EdcClientBuilder builder) { apiClient.setHttpClient(httpClient); } + if (builder.customConfigurer() != null) { + builder.customConfigurer().accept(apiClient); + } + return new EdcClient( new UiApi(apiClient), new UseCaseApi(apiClient), diff --git a/extensions/wrapper/clients/typescript-client-example/package-lock.json b/extensions/wrapper/clients/typescript-client-example/package-lock.json index 864eaf12c..032d24005 100644 --- a/extensions/wrapper/clients/typescript-client-example/package-lock.json +++ b/extensions/wrapper/clients/typescript-client-example/package-lock.json @@ -1,12 +1,15 @@ { - "name": "typescript-client-example", + "name": "client-ts-example", "version": "0.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "typescript-client-example", + "name": "client-ts-example", "version": "0.0.1", + "dependencies": { + "@sovity.de/edc-client": "file:../typescript-client" + }, "devDependencies": { "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/kit": "^1.5.0", @@ -25,6 +28,19 @@ "../sovity-edc-client": { "extraneous": true }, + "../typescript-client": { + "name": "@sovity.de/edc-client", + "version": "0.0.0", + "license": "Apache-2.0", + "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^4.1.1", + "@types/node": "^18.15.11", + "prettier": "^2.8.7", + "typescript": "^4.9.3", + "vite": "^4.2.0", + "vite-plugin-dts": "^2.2.0" + } + }, "node_modules/@esbuild/android-arm": { "version": "0.17.16", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.16.tgz", @@ -472,6 +488,10 @@ "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", "dev": true }, + "node_modules/@sovity.de/edc-client": { + "resolved": "../typescript-client", + "link": true + }, "node_modules/@sveltejs/adapter-auto": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.0.0.tgz", @@ -712,9 +732,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001478", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001478.tgz", - "integrity": "sha512-gMhDyXGItTHipJj2ApIvR+iVB5hd0KP3svMWWXDvZOmjzJJassGLMfxRkQCSYgGd2gtdL/ReeiyvMSFD1Ss6Mw==", + "version": "1.0.30001547", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", + "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==", "dev": true, "funding": [ { @@ -1440,9 +1460,9 @@ } }, "node_modules/postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "dev": true, "funding": [ { @@ -1452,10 +1472,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -2479,6 +2503,17 @@ "integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==", "dev": true }, + "@sovity.de/edc-client": { + "version": "file:../typescript-client", + "requires": { + "@trivago/prettier-plugin-sort-imports": "^4.1.1", + "@types/node": "^18.15.11", + "prettier": "^2.8.7", + "typescript": "^4.9.3", + "vite": "^4.2.0", + "vite-plugin-dts": "^2.2.0" + } + }, "@sveltejs/adapter-auto": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.0.0.tgz", @@ -2642,9 +2677,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001478", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001478.tgz", - "integrity": "sha512-gMhDyXGItTHipJj2ApIvR+iVB5hd0KP3svMWWXDvZOmjzJJassGLMfxRkQCSYgGd2gtdL/ReeiyvMSFD1Ss6Mw==", + "version": "1.0.30001547", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz", + "integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==", "dev": true }, "chokidar": { @@ -3168,12 +3203,12 @@ "dev": true }, "postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "dev": true, "requires": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } diff --git a/extensions/wrapper/clients/typescript-client-example/package.json b/extensions/wrapper/clients/typescript-client-example/package.json index 9002cd536..e31972e7a 100644 --- a/extensions/wrapper/clients/typescript-client-example/package.json +++ b/extensions/wrapper/clients/typescript-client-example/package.json @@ -3,6 +3,7 @@ "version": "0.0.1", "private": true, "scripts": { + "start": "npm run dev", "dev": "vite dev", "build": "vite build", "preview": "vite preview", @@ -12,7 +13,7 @@ "format": "prettier --plugin-search-dir . --write ." }, "dependencies": { - "@sovity.de/edc-client": "file: ../typescript-client", + "@sovity.de/edc-client": "file:../typescript-client" }, "devDependencies": { "@sveltejs/adapter-auto": "^2.0.0", diff --git a/extensions/wrapper/clients/typescript-client-example/src/routes/+page.svelte b/extensions/wrapper/clients/typescript-client-example/src/routes/+page.svelte index 85e910009..c7740d42b 100644 --- a/extensions/wrapper/clients/typescript-client-example/src/routes/+page.svelte +++ b/extensions/wrapper/clients/typescript-client-example/src/routes/+page.svelte @@ -3,7 +3,7 @@ import { buildEdcClient, type EdcClient } from '@sovity.de/edc-client'; const edcClient: EdcClient = buildEdcClient({ - managementApiUrl: 'http://localhost:11002/api/v1/management', + managementApiUrl: 'http://localhost:11002/api/management', managementApiKey: 'ApiKeyDefaultValue' }); diff --git a/extensions/wrapper/wrapper-api/build.gradle.kts b/extensions/wrapper/wrapper-api/build.gradle.kts index 1e96983b4..2c9b125e6 100644 --- a/extensions/wrapper/wrapper-api/build.gradle.kts +++ b/extensions/wrapper/wrapper-api/build.gradle.kts @@ -34,9 +34,11 @@ dependencies { } val openapiFileDir = "${project.buildDir}/swagger" -val openapiFileFilename = "edc-api-wrapper.yaml" +val openapiFileFilename = "sovity-edc-api-wrapper.yaml" val openapiFile = "$openapiFileDir/$openapiFileFilename" +val openapiDocsDir = project.rootProject.rootDir.resolve("docs") + tasks.withType { outputDir = file(openapiFileDir) outputFileName = openapiFileFilename.removeSuffix(".yaml") @@ -47,8 +49,15 @@ tasks.withType { resourcePackages = setOf("de.sovity.edc.ext.wrapper.api") } +tasks.register("copyOpenapiYamlToDocs") { + dependsOn("resolve") + from(openapiFile) + into(openapiDocsDir) +} + task("openApiGenerateTypeScriptClient") { dependsOn("resolve") + dependsOn("copyOpenapiYamlToDocs") generatorName.set("typescript-fetch") configOptions.set(mutableMapOf( "supportsES6" to "true", diff --git a/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ApiInformation.java b/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ApiInformation.java index 115ab8643..519b010cd 100644 --- a/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ApiInformation.java +++ b/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ApiInformation.java @@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.info.Contact; import io.swagger.v3.oas.annotations.info.Info; import io.swagger.v3.oas.annotations.info.License; +import io.swagger.v3.oas.annotations.servers.Server; @OpenAPIDefinition( info = @Info( @@ -37,6 +38,9 @@ url = "https://github.com/sovity/edc-extensions/blob/main/LICENSE" ) ), + servers = { + @Server(url = "https://[MY_EDC_FQDN]/api/management") + }, externalDocs = @ExternalDocumentation( description = "EDC API Wrapper Project in sovity/edc-extensions", url = "https://github.com/sovity/edc-extensions/tree/main/extensions/wrapper" diff --git a/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/UiResource.java b/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/UiResource.java index aada52c6a..113645195 100644 --- a/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/UiResource.java +++ b/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/UiResource.java @@ -133,7 +133,7 @@ interface UiResource { @GET @Path("pages/contract-agreement-page") @Produces(MediaType.APPLICATION_JSON) - @Operation(description = "Collect all data for Contract Agreement Page") + @Operation(description = "Collect all data for the Contract Agreement Page") ContractAgreementPage getContractAgreementPage(); @POST @@ -153,10 +153,12 @@ interface UiResource { @GET @Path("pages/transfer-history-page") @Produces(MediaType.APPLICATION_JSON) + @Operation(description = "Collect all data for the Transfer History Page") TransferHistoryPage getTransferHistoryPage(); @GET @Path("pages/transfer-history-page/transfer-processes/{transferProcessId}/asset") @Produces(MediaType.APPLICATION_JSON) + @Operation(description = "Queries a transfer process' asset") UiAsset getTransferProcessAsset(@PathParam("transferProcessId") String transferProcessId); } diff --git a/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/model/InitiateCustomTransferRequest.java b/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/model/InitiateCustomTransferRequest.java index 31989ada4..5a6b87d81 100644 --- a/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/model/InitiateCustomTransferRequest.java +++ b/extensions/wrapper/wrapper-api/src/main/java/de/sovity/edc/ext/wrapper/api/ui/model/InitiateCustomTransferRequest.java @@ -31,6 +31,8 @@ public class InitiateCustomTransferRequest { @Schema(description = "Contract Agreement ID", requiredMode = Schema.RequiredMode.REQUIRED) private String contractAgreementId; - @Schema(description = "Partial TransferProcessRequestJsonLd JSON-LD. Fields participantId, connectorEndpoint, assetId and contractId can be omitted, they will be overridden with information from the contract.") + @Schema(description = "Partial TransferProcessRequestJsonLd JSON-LD. Fields participantId, connectorEndpoint, " + + "assetId and contractId can be omitted, they will be overridden with information from the contract.", + requiredMode = Schema.RequiredMode.REQUIRED) private String transferProcessRequestJsonLd; } diff --git a/extensions/wrapper/wrapper-ee-api/build.gradle.kts b/extensions/wrapper/wrapper-ee-api/build.gradle.kts index 16348fd04..eab881398 100644 --- a/extensions/wrapper/wrapper-ee-api/build.gradle.kts +++ b/extensions/wrapper/wrapper-ee-api/build.gradle.kts @@ -9,6 +9,8 @@ dependencies { annotationProcessor("org.projectlombok:lombok:${lombokVersion}") compileOnly("org.projectlombok:lombok:${lombokVersion}") + api(project(":extensions:wrapper:wrapper-common-api")) + api("jakarta.ws.rs:jakarta.ws.rs-api:3.1.0") api("jakarta.validation:jakarta.validation-api:3.0.2") api("io.swagger.core.v3:swagger-annotations-jakarta:2.2.15") diff --git a/extensions/wrapper/wrapper-ee-api/src/main/java/de/sovity/edc/ext/wrapper/api/ee/EnterpriseEditionResource.java b/extensions/wrapper/wrapper-ee-api/src/main/java/de/sovity/edc/ext/wrapper/api/ee/EnterpriseEditionResource.java index cf2f5c90d..7ce39be7d 100644 --- a/extensions/wrapper/wrapper-ee-api/src/main/java/de/sovity/edc/ext/wrapper/api/ee/EnterpriseEditionResource.java +++ b/extensions/wrapper/wrapper-ee-api/src/main/java/de/sovity/edc/ext/wrapper/api/ee/EnterpriseEditionResource.java @@ -14,12 +14,11 @@ package de.sovity.edc.ext.wrapper.api.ee; +import de.sovity.edc.ext.wrapper.api.common.model.UiAssetCreateRequest; import de.sovity.edc.ext.wrapper.api.ee.model.ConnectorLimits; -import de.sovity.edc.ext.wrapper.api.ee.model.StoredFile; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; @@ -29,9 +28,6 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; -import java.util.List; -import java.util.Map; - /** * Our sovity Enterprise Edition EDC API Endpoints to be included in our generated EDC API Wrapper Clients */ @@ -44,36 +40,33 @@ public interface EnterpriseEditionResource { @Operation(description = "Available and used resources of a connector.") ConnectorLimits connectorLimits(); - @GET - @Path("file-storage/stored-files") + @POST + @Path("file-upload/blobs") @Produces(MediaType.APPLICATION_JSON) @Operation( - summary = "Get all stored files.", - description = "Get all files stored in file storage" + summary = "Requests a Blob for file upload.", + description = "Requests a Blob URL with a SAS Token so that the UI can directly upload the file to the Azure Blob Storage. Returns the Blob ID / Token." ) - List listStoredFiles(); + String fileUploadRequestSasToken(); @POST - @Path("file-storage/{storedFileId}/assets") - @Produces(MediaType.APPLICATION_JSON) + @Path("file-upload/blobs/{blobId}/asset") @Consumes(MediaType.APPLICATION_JSON) @Operation( - summary = "Create a file storage asset.", - description = "Create an asset using the stored file as data source." + summary = "Create an asset from an uploaded file.", + description = "Creates an asset using the uploaded file as data source." ) - StoredFile createStoredFileAsset( - @PathParam("storedFileId") + void fileUploadCreateAsset( + @PathParam("blobId") @Parameter( - name = "storedFileId", + name = "blobId", in = ParameterIn.PATH, - description = "The id of the StoredFile object.", - schema = @Schema(example = "stored-file-001") - ) String storedFileId, + description = "The Blob ID / URL the file was uploaded into." + ) String blobId, @Parameter( required = true, - description = "Map representing a list with the asset properties of the stored file.", - schema = @Schema(example = "{\"asset:prop:id\": \"some-asset-1\",\n \"asset:prop:originator\": \"http://my-example-connector/api/v1/ids\"}") - ) Map assetProperties + description = "Metadata for the Asset. File-related metadata might be overridden." + ) UiAssetCreateRequest assetCreateRequest ); } diff --git a/extensions/wrapper/wrapper/README.md b/extensions/wrapper/wrapper/README.md index e9901e3bd..48b5bb007 100644 --- a/extensions/wrapper/wrapper/README.md +++ b/extensions/wrapper/wrapper/README.md @@ -5,7 +5,7 @@ Logo -

EDC-Connector Extension:
API Wrapper & API Clients:
Wrapper API Implementation

+

EDC-Connector Extension:
API Wrapper & API Clients:
Community Edition API Wrapper Implementation

Report Bug @@ -17,8 +17,19 @@ ## About this component EDC extension which provides API implementations for most of the Wrapper API endpoints. Excluded endpoints are either -implemented in other sovity Community Edition EDC Extensions or implemented closed source, e.g. for our sovity -Enterprise Edition API endpoints. +implemented in other sovity Community Edition EDC Extensions or implemented in our Enterprise Edition. + +## Why does this extension exist? + +The goal is to design APIs so they can be used losslessly with OpenAPI 3.0 generators to provide different client +libraries at ease, while extending or simplifying connector use and functionality. + +Furthermore, not using the often changing Eclipse EDC APIs, but rather our own facade +allows better backwards compatibility for both our UIs and Use Case Applications. + +With the move to JSON-LD both input and output of the Eclipse EDC APIs must be semantically interpreted. +JSON-LD libraries are not available in all languages or well to use, therefore this API Wrapper can alleviate that pain, +providing simple and type-safe REST APIs,. materializing polymorphisms into sum types. ## License diff --git a/extensions/wrapper/wrapper/src/test/java/de/sovity/edc/ext/wrapper/api/ui/pages/asset/AssetApiServiceTest.java b/extensions/wrapper/wrapper/src/test/java/de/sovity/edc/ext/wrapper/api/ui/pages/asset/AssetApiServiceTest.java index a23f2d102..0c6431133 100644 --- a/extensions/wrapper/wrapper/src/test/java/de/sovity/edc/ext/wrapper/api/ui/pages/asset/AssetApiServiceTest.java +++ b/extensions/wrapper/wrapper/src/test/java/de/sovity/edc/ext/wrapper/api/ui/pages/asset/AssetApiServiceTest.java @@ -98,7 +98,10 @@ void testAssetCreation(AssetService assetService) { Prop.Edc.PROXY_METHOD, "true", Prop.Edc.PROXY_PATH, "true", Prop.Edc.PROXY_QUERY_PARAMS, "true", - Prop.Edc.PROXY_BODY, "true" + Prop.Edc.PROXY_BODY, "true", + + // tests that a property without a context URL will survive the JSON-LD mapping + "oauth2:tokenUrl", "https://token-url" ); var uiAssetRequest = UiAssetCreateRequest.builder() .id("asset-1") diff --git a/launchers/README.md b/launchers/README.md index dd9a0862f..cb6363027 100644 --- a/launchers/README.md +++ b/launchers/README.md @@ -37,9 +37,9 @@ Our sovity Community Edition EDC is built as several docker image variants in di | Docker Image | Type | Purpose | Features | |----------------------------------------------------------------------------------|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [edc-dev](https://github.com/sovity/edc-extensions/pkgs/container/edc-dev) | Devevelopment |

  • Lightweight local development
  • Used in EDC UI's Getting Started section
|
  • Control- and Data-Plane
  • sovity Community Edition EDC Extensions
  • Management API Auth via API Keys
  • Mock IAM
| -| [edc-ce](https://github.com/sovity/edc-extensions/pkgs/container/edc-ce) | sovity Community Edition |
  • Test sovity EDC features
  • Self-Deploy EDC
|
  • Control- and Data-Plane
  • sovity Community Edition EDC Extensions
  • Management API Auth via API Keys
  • DAPS Authentication
  • PostgreSQL Persistence & Flyway
| -| [edc-ce-mds](https://github.com/sovity/edc-extensions/pkgs/container/edc-ce-mds) | MDS Community Edition |
  • Demonstrate MDS EDC Features
  • Self-Deploy MDS EDC
|
  • Control- and Data-Plane
  • sovity Community Edition EDC Extensions
  • Management API Auth via API Keys
  • DAPS Authentication
  • PostgreSQL Persistence & Flyway
  • Broker Extension
  • Clearing House Extension
| +| [edc-dev](https://github.com/sovity/edc-extensions/pkgs/container/edc-dev) | Devevelopment |
  • Local manual testing
  • Local demos
|
  • Control- and Data-Plane
  • sovity Community Edition EDC Extensions
  • Management API Auth via API Keys
  • PostgreSQL Persistence & Flyway
  • Mock IAM
| +| [edc-ce](https://github.com/sovity/edc-extensions/pkgs/container/edc-ce) | sovity Community Edition |
  • Self-Deploy a productive sovity EDC
|
  • Control- and Data-Plane
  • sovity Community Edition EDC Extensions
  • Management API Auth via API Keys
  • PostgreSQL Persistence & Flyway
  • DAPS Authentication
| +| [edc-ce-mds](https://github.com/sovity/edc-extensions/pkgs/container/edc-ce-mds) | MDS Community Edition |
  • Self-Deploy a productive MDS EDC
|
  • Control- and Data-Plane
  • sovity Community Edition EDC Extensions
  • Management API Auth via API Keys
  • PostgreSQL Persistence & Flyway
  • DAPS Authentication
  • Broker Extension
  • Clearing House Extension
| | edc-ee | Commercial |
  • Productive use
  • Professional users
  • Our Connector-as-a-Service (CaaS) customers
  • [Request Demo](mailto:contact@sovity.de)
|
  • Managed Control- and Data Planes, individually scalable
  • Hosted on highly performant infrastructure
  • Management API Auth via Service Accounts
  • Managed User Auth via standalone IAM (SSO)
  • Automatic Dataspace Roll-In, for example to Data Spaces like Catena-X or Mobility Data Space
  • Managed DAPS Authentication
  • Support & Tutorials
  • Automatic updates to newest version and new features
  • Off-the-shelf extensions for use cases available
  • EDC available within minutes
  • Can be combined with Data Space as a Service (DSaaS)
| ## Image Tags diff --git a/launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/ConnectorTransferTest.java b/launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/ManagementApiTransferTest.java similarity index 98% rename from launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/ConnectorTransferTest.java rename to launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/ManagementApiTransferTest.java index 14b1c3ffb..657071ac8 100644 --- a/launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/ConnectorTransferTest.java +++ b/launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/ManagementApiTransferTest.java @@ -28,7 +28,7 @@ import static de.sovity.edc.extension.e2e.connector.config.ConnectorConfigFactory.forTestDatabase; import static de.sovity.edc.extension.e2e.connector.config.ConnectorRemoteConfigFactory.fromConnectorConfig; -class ConnectorTransferTest { +class ManagementApiTransferTest { private static final String PROVIDER_PARTICIPANT_ID = "provider"; private static final String CONSUMER_PARTICIPANT_ID = "consumer"; diff --git a/launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/Ms8ConnectorTransferTest.java b/launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/Ms8ConnectorMigrationTest.java similarity index 99% rename from launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/Ms8ConnectorTransferTest.java rename to launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/Ms8ConnectorMigrationTest.java index f4df7d928..4e1c7ed80 100644 --- a/launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/Ms8ConnectorTransferTest.java +++ b/launchers/connectors/sovity-dev/src/test/java/de/sovity/edc/e2e/Ms8ConnectorMigrationTest.java @@ -43,7 +43,7 @@ /** * Test data offers and contracts of an MS8 connector migrated to the current version. */ -class Ms8ConnectorTransferTest { +class Ms8ConnectorMigrationTest { private static final String PROVIDER_PARTICIPANT_ID = "provider"; private static final String CONSUMER_PARTICIPANT_ID = "consumer"; diff --git a/utils/test-connector-remote/src/main/java/de/sovity/edc/extension/e2e/connector/ConnectorRemote.java b/utils/test-connector-remote/src/main/java/de/sovity/edc/extension/e2e/connector/ConnectorRemote.java index e379da197..e85911e77 100644 --- a/utils/test-connector-remote/src/main/java/de/sovity/edc/extension/e2e/connector/ConnectorRemote.java +++ b/utils/test-connector-remote/src/main/java/de/sovity/edc/extension/e2e/connector/ConnectorRemote.java @@ -87,7 +87,7 @@ public void createAsset(String assetId, Map dataAddressPropertie public List getAssetIds() { var requestBody = createObjectBuilder() .add(CONTEXT, createObjectBuilder().add(EDC_PREFIX, EDC_NAMESPACE)) - .add(TYPE, "QuerySpecDto") + .add(TYPE, EDC_NAMESPACE + "QuerySpec") .build(); return prepareManagementApiCall() .contentType(JSON) @@ -103,8 +103,8 @@ public List getAssetIds() { public String createPolicy(JsonObject policyJsonObject) { var requestBody = createObjectBuilder() .add(CONTEXT, createObjectBuilder().add(EDC_PREFIX, EDC_NAMESPACE)) - .add(TYPE, "PolicyDefinitionDto") - .add("policy", policyJsonObject) + .add(TYPE, EDC_NAMESPACE + "PolicyDefinition") + .add(EDC_NAMESPACE + "policy", policyJsonObject) .build(); return prepareManagementApiCall() @@ -152,9 +152,9 @@ public JsonArray getCatalogDatasets(URI providerProtocolEndpoint) { var datasetReference = new AtomicReference(); var requestBody = createObjectBuilder() .add(CONTEXT, createObjectBuilder().add(EDC_PREFIX, EDC_NAMESPACE)) - .add(TYPE, "CatalogRequest") - .add("providerUrl", providerProtocolEndpoint.toString()) - .add("protocol", "dataspace-protocol-http") + .add(TYPE, EDC_NAMESPACE + "CatalogRequest") + .add(EDC_NAMESPACE + "counterPartyAddress", providerProtocolEndpoint.toString()) + .add(EDC_NAMESPACE + "protocol", "dataspace-protocol-http") .build(); await().atMost(timeout).untilAsserted(() -> { @@ -197,16 +197,15 @@ public String negotiateContract( JsonObject policy) { var requestBody = createObjectBuilder() .add(CONTEXT, createObjectBuilder().add(EDC_PREFIX, EDC_NAMESPACE)) - .add(TYPE, "NegotiationInitiateRequestDto") - .add("connectorId", providerParticipantId) - .add("consumerId", config.getParticipantId()) - .add("providerId", providerParticipantId) - .add("connectorAddress", providerProtocolEndpoint.toString()) - .add("protocol", "dataspace-protocol-http") - .add("offer", createObjectBuilder() - .add("offerId", offerId) - .add("assetId", assetId) - .add("policy", jsonLd.compact(policy).orElseThrow(this::throwFailure)) + .add(TYPE, EDC_NAMESPACE + "ContractRequest") + .add(EDC_NAMESPACE + "consumerId", config.getParticipantId()) + .add(EDC_NAMESPACE + "providerId", providerParticipantId) + .add(EDC_NAMESPACE + "connectorAddress", providerProtocolEndpoint.toString()) + .add(EDC_NAMESPACE + "protocol", "dataspace-protocol-http") + .add(EDC_NAMESPACE + "offer", createObjectBuilder() + .add(EDC_NAMESPACE + "offerId", offerId) + .add(EDC_NAMESPACE + "assetId", assetId) + .add(EDC_NAMESPACE + "policy", jsonLd.compact(policy).orElseThrow(this::throwFailure)) ) .build(); @@ -273,16 +272,15 @@ public String initiateTransfer( URI providerProtocolApi, JsonObject destination) { var requestBody = createObjectBuilder() - .add(CONTEXT, createObjectBuilder().add(EDC_PREFIX, EDC_NAMESPACE)) - .add(TYPE, "TransferRequestDto") - .add("dataDestination", destination) - .add("protocol", "dataspace-protocol-http") - .add("managedResources", false) - .add("assetId", assetId) - .add("contractId", contractAgreementId) - .add("connectorAddress", providerProtocolApi.toString()) - .add("privateProperties", Json.createObjectBuilder().build()) - .add("connectorId", config.getParticipantId()) + .add(TYPE, EDC_NAMESPACE + "TransferRequest") + .add(EDC_NAMESPACE + "protocol", "dataspace-protocol-http") + .add(EDC_NAMESPACE + "connectorAddress", providerProtocolApi.toString()) + .add(EDC_NAMESPACE + "connectorId", config.getParticipantId()) + .add(EDC_NAMESPACE + "assetId", assetId) + .add(EDC_NAMESPACE + "dataDestination", destination) + .add(EDC_NAMESPACE + "contractId", contractAgreementId) + .add(EDC_NAMESPACE + "privateProperties", Json.createObjectBuilder().build()) + .add(EDC_NAMESPACE + "managedResources", false) .build(); return prepareManagementApiCall() @@ -336,14 +334,12 @@ public void createDataOffer( String targetUrl ) { Map dataSource = Map.of( - "name", "transfer-test", - "baseUrl", targetUrl, - "type", "HttpData", - "proxyQueryParams", "true" + EDC_NAMESPACE + "type", "HttpData", + EDC_NAMESPACE + "baseUrl", targetUrl, + EDC_NAMESPACE + "proxyQueryParams", "true" ); var policy = createObjectBuilder() - .add(CONTEXT, "https://www.w3.org/ns/odrl.jsonld") .add(TYPE, "use") .build();