Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions advanced/advanced-01-open-telemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Create an asset:
```bash
curl -H "X-Api-Key: password" \
-d @advanced/advanced-01-open-telemetry/resources/create-asset.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/assets \
-H 'content-type: application/json' http://localhost:19193/management/v4/assets \
-s | jq
```

Expand All @@ -51,7 +51,7 @@ Create a Policy on the provider connector:
```bash
curl -H "X-Api-Key: password" \
-d @advanced/advanced-01-open-telemetry/resources/create-policy.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/policydefinitions \
-H 'content-type: application/json' http://localhost:19193/management/v4/policydefinitions \
-s | jq
```

Expand All @@ -60,7 +60,7 @@ Follow up with the creation of a contract definition:
```bash
curl -H "X-Api-Key: password" \
-d @advanced/advanced-01-open-telemetry/resources/create-contract-definition.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/contractdefinitions \
-H 'content-type: application/json' http://localhost:19193/management/v4/contractdefinitions \
-s | jq
```

Expand All @@ -72,7 +72,7 @@ directly with this call:
curl -H "X-Api-Key: password" \
-H "Content-Type: application/json" \
-d @advanced/advanced-01-open-telemetry/resources/get-dataset.json \
-X POST "http://localhost:29193/management/v3/catalog/dataset/request" \
-X POST "http://localhost:29193/management/v4/catalog/dataset/request" \
-s | jq
```

Expand Down Expand Up @@ -141,7 +141,7 @@ and request the contract negotiation:
curl -H "X-Api-Key: password" \
-H "Content-Type: application/json" \
-d @advanced/advanced-01-open-telemetry/resources/negotiate-contract.json \
-X POST "http://localhost:29193/management/v3/contractnegotiations" \
-X POST "http://localhost:29193/management/v4/contractnegotiations" \
-s | jq
```

Expand All @@ -150,7 +150,7 @@ state with this call, replacing `{{contract-negotiation-id}}` with the id return

```shell
curl -H 'X-Api-Key: password' \
-X GET "http://localhost:29193/management/v3/contractnegotiations/{{contract-negotiation-id}}" \
-X GET "http://localhost:29193/management/v4/contractnegotiations/{{contract-negotiation-id}}" \
-s | jq
```

Expand All @@ -160,7 +160,7 @@ Finally, update the contract agreement id in the [start-transfer.json](resources
curl -H "X-Api-Key: password" \
-H "Content-Type: application/json" \
-d @advanced/advanced-01-open-telemetry/resources/start-transfer.json \
-X POST "http://localhost:29193/management/v3/transferprocesses" \
-X POST "http://localhost:29193/management/v4/transferprocesses" \
-s | jq
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "Asset",
"@id": "assetId",
"properties": {
"name": "product description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "ContractDefinition",
"@id": "1",
"accessPolicyId": "aPolicy",
"contractPolicyId": "aPolicy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"@vocab": "https://w3id.org/edc/v0.0.1/ns/",
"odrl": "http://www.w3.org/ns/odrl/2/"
},
"@type": "PolicyDefinition",
"@id": "aPolicy",
"policy": {
"@context": "http://www.w3.org/ns/odrl.jsonld",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "TransferRequestDto",
"@type": "TransferRequest",
"connectorId": "provider",
"counterPartyAddress": "http://provider:19194/protocol/2025-1",
"contractId": "{{contract-agreement-id}}",
Expand Down
2 changes: 1 addition & 1 deletion basic/basic-04-event-consumer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ java -Dedc.fs.config=basic/basic-04-event-consumer/resources/configuration/consu

```bash
curl -d @basic/basic-04-event-consumer/resources/create-asset.json \
-X POST -H 'content-type: application/json' http://localhost:29193/management/v3/assets \
-X POST -H 'content-type: application/json' http://localhost:29193/management/v4/assets \
-s | jq
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "Asset",
"@id": "assetId",
"properties": {
"name": "product description",
Expand Down
6 changes: 3 additions & 3 deletions federated-catalog/fc-00-basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,20 @@ Once the connector is running, carry out the commands below in sequence.
#### Create an asset
```shell
curl -d @federated-catalog/fc-00-basic/participant-connector/resources/create-asset.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/assets \
-H 'content-type: application/json' http://localhost:19193/management/v4/assets \
-s | jq
```

#### Create a policy
```bash
curl -d @federated-catalog/fc-00-basic/participant-connector/resources/create-policy.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/policydefinitions \
-H 'content-type: application/json' http://localhost:19193/management/v4/policydefinitions \
-s | jq
```

#### Create a contract definition
```bash
curl -d @federated-catalog/fc-00-basic/participant-connector/resources/create-contract-definition.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/contractdefinitions \
-H 'content-type: application/json' http://localhost:19193/management/v4/contractdefinitions \
-s | jq
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "Asset",
"@id": "assetId",
"properties": {
"name": "product description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "ContractDefinition",
"@id": "1",
"accessPolicyId": "aPolicy",
"contractPolicyId": "aPolicy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"@vocab": "https://w3id.org/edc/v0.0.1/ns/",
"odrl": "http://www.w3.org/ns/odrl/2/"
},
"@type": "PolicyDefinition",
"@id": "aPolicy",
"policy": {
"@context": "http://www.w3.org/ns/odrl.jsonld",
Expand Down
2 changes: 1 addition & 1 deletion federated-catalog/fc-01-embedded/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Use the following request to invoke the catalog API:
curl -d @federated-catalog/fc-01-embedded/resources/empty-query.json \
-H 'content-type: application/json' \
-H 'x-api-key: password' \
http://localhost:29193/api/management/v3/catalogs/request \
http://localhost:29193/api/management/v4/catalogs/request \
-s | jq
```

Expand Down
2 changes: 1 addition & 1 deletion federated-catalog/fc-02-standalone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ To get the combined set of catalogs, use the following request:
```http request
curl -d @federated-catalog/fc-01-embedded/resources/empty-query.json \
-H 'content-type: application/json' \
http://localhost:39193/api/management/v3/catalogs/request \
http://localhost:39193/api/management/v4/catalogs/request \
-s | jq
```

Expand Down
4 changes: 2 additions & 2 deletions federated-catalog/fc-03-static-node-directory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ To get the combined set of catalogs, use the following request:
```http request
curl -d @federated-catalog/fc-01-embedded/resources/empty-query.json \
-H 'content-type: application/json' \
http://localhost:39193/api/management/v3/catalogs/request \
http://localhost:39193/api/management/v4/catalogs/request \
-s | jq
```

Expand Down Expand Up @@ -137,6 +137,6 @@ To get the combined set of catalogs, use the following request:
curl -d @federated-catalog/fc-01-embedded/resources/empty-query.json \
-H 'content-type: application/json' \
-H 'x-api-key: password' \
http://localhost:29193/api/management/v3/catalogs/request \
http://localhost:29193/api/management/v4/catalogs/request \
-s | jq
```
12 changes: 6 additions & 6 deletions policy/policy-01-policy-enforcement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ sufficient for our example. You can view the request body for creating the asset
```bash
curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \
-d @policy/policy-01-policy-enforcement/resources/create-asset.json \
"http://localhost:19193/management/v3/assets" | jq
"http://localhost:19193/management/v4/assets" | jq
```

#### 2.2 Create the policy definition
Expand All @@ -200,7 +200,7 @@ be equal to `eu`. You can view the request body for creating the policy definiti
```bash
curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \
-d @policy/policy-01-policy-enforcement/resources/create-policy.json \
"http://localhost:19193/management/v3/policydefinitions" | jq
"http://localhost:19193/management/v4/policydefinitions" | jq
```

#### 2.3 Create the contract definition
Expand All @@ -216,7 +216,7 @@ the contract definition:
```bash
curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \
-d @policy/policy-01-policy-enforcement/resources/create-contract-definition.json \
"http://localhost:19193/management/v3/contractdefinitions" | jq
"http://localhost:19193/management/v4/contractdefinitions" | jq
```

With this, the provider now offers the asset under the condition that the requesting participant is located in the EU.
Expand All @@ -230,7 +230,7 @@ in the request. The request body is prepared in [catalog-request.json](resources
```bash
curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \
-d @policy/policy-01-policy-enforcement/resources/catalog-request.json \
"http://localhost:29193/management/v3/catalog/request" | jq
"http://localhost:29193/management/v4/catalog/request" | jq
```

We'll receive the following catalog in the response, where we can see the offer created in the provider's extension.
Expand Down Expand Up @@ -303,7 +303,7 @@ which protocol to use and which offer we want to negotiate. The request body is
```bash
curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \
-d @policy/policy-01-policy-enforcement/resources/contract-request.json \
"http://localhost:29193/management/v3/contractnegotiations" | jq
"http://localhost:29193/management/v4/contractnegotiations" | jq
```

You'll get back a UUID. This is the ID of the contract negotiation process which is being asynchronously executed
Expand All @@ -315,7 +315,7 @@ Using the ID received in the previous step, we can now view the state of the neg
of the consumer's management API:

```bash
curl -X GET -H "X-Api-Key: password" "http://localhost:29193/management/v3/contractnegotiations/<UUID>" | jq
curl -X GET -H "X-Api-Key: password" "http://localhost:29193/management/v4/contractnegotiations/<UUID>" | jq
```

In the response we'll get a description of the negotiation, similar to the following:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "CatalogRequest",
"counterPartyId": "provider",
"counterPartyAddress": "http://localhost:19194/protocol/2025-1",
"protocol": "dataspace-protocol-http:2025-1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "Asset",
"@id": "test-document",
"properties": {
"name": "product description",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "ContractDefinition",
"@id": "1",
"accessPolicyId": "eu-policy",
"contractPolicyId": "eu-policy",
"assetsSelector": [{
"@type": "CriterionDto",
"@type": "Criterion",
"operandLeft": "https://w3id.org/edc/v0.0.1/ns/id",
"operator": "=",
"operandRight": "test-document"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "PolicyDefinition",
"@id": "eu-policy",
"policy": {
"@context": "http://www.w3.org/ns/odrl.jsonld",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Basic04eventConsumerTest {
private static final String CONNECTOR_MODULE_PATH = ":basic:basic-04-event-consumer:connector-with-event-subscriber";
private static final String CONFIG_PROPERTIES_FILE_PATH = "basic/basic-04-event-consumer/resources/configuration/consumer-configuration.properties";
private static final String CREATE_ASSET_FILE_PATH = "basic/basic-04-event-consumer/resources/create-asset.json";
private static final String V3_ASSETS_PATH = "/v3/assets";
private static final String ASSETS_PATH = "/v4/assets";

@RegisterExtension
static RuntimeExtension connector = getConsumer(CONNECTOR_MODULE_PATH, CONFIG_PROPERTIES_FILE_PATH);
Expand All @@ -45,7 +45,7 @@ void runSampleSteps() {
var standardOutputStream = new ByteArrayOutputStream();
System.setOut(new PrintStream(standardOutputStream));

post(CONSUMER_MANAGEMENT_URL + V3_ASSETS_PATH, getFileContentFromRelativePath(CREATE_ASSET_FILE_PATH));
post(CONSUMER_MANAGEMENT_URL + ASSETS_PATH, getFileContentFromRelativePath(CREATE_ASSET_FILE_PATH));

var standardOutput = standardOutputStream.toString();
assertThat(standardOutput).contains("Asset created:");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class FederatedCatalogCommon {
public static final String CREATE_ASSET_FILE_PATH = "federated-catalog/fc-00-basic/participant-connector/resources/create-asset.json";
public static final String CREATE_POLICY_FILE_PATH = "federated-catalog/fc-00-basic/participant-connector/resources/create-policy.json";
public static final String CREATE_CONTRACT_DEFINITION_FILE_PATH = "federated-catalog/fc-00-basic/participant-connector/resources/create-contract-definition.json";
private static final String V3_ASSETS_PATH = "/v3/assets";
private static final String ASSETS_PATH = "/v4/assets";

private static final String STANDALONE_FC = "standalone-fc";
private static final String EMBEDDED_FC = "fc-connector";
Expand All @@ -54,11 +54,11 @@ public class FederatedCatalogCommon {
public static final int CRAWLER_EXECUTION_PERIOD_VALUE = 5;
public static final int TIMEOUT = 5 * CRAWLER_EXECUTION_PERIOD_VALUE;

public static final String EMBEDDED_FC_CATALOG_API_ENDPOINT = "http://localhost:29193/api/management/v3/catalogs/request";
public static final String STANDALONE_FC_CATALOG_API_ENDPOINT = "http://localhost:39193/api/management/v3/catalogs/request";
public static final String EMBEDDED_FC_CATALOG_API_ENDPOINT = "http://localhost:29193/api/management/v4/catalogs/request";
public static final String STANDALONE_FC_CATALOG_API_ENDPOINT = "http://localhost:39193/api/management/v4/catalogs/request";
public static final String EMPTY_QUERY_FILE_PATH = "federated-catalog/fc-01-embedded/resources/empty-query.json";
public static final String TYPE = "[0].@type";
public static final String DATASET_ASSET_ID = "[0].dataset[0].@id";
public static final String DATASET_ASSET_ID = "[0].'dcat:dataset'.@id";

public static RuntimeExtension getParticipantConnector() {
return PrerequisitesCommon.getProvider(PARTICIPANT_CONNECTOR_MODULE_PATH, PARTICIPANT_CONNECTOR_CONFIG_PROPERTIES_FILE_PATH);
Expand Down Expand Up @@ -87,7 +87,7 @@ private static RuntimeExtension getRuntime(
}

public static String createAsset() {
return post(PrerequisitesCommon.PROVIDER_MANAGEMENT_URL + V3_ASSETS_PATH,
return post(PrerequisitesCommon.PROVIDER_MANAGEMENT_URL + ASSETS_PATH,
getFileContentFromRelativePath(CREATE_ASSET_FILE_PATH),
ID);
}
Expand All @@ -103,7 +103,7 @@ public static JsonPath postAndAssertType(String url, String requestBody) {
.log().ifValidationFails()
.statusCode(HttpStatus.SC_OK)
.body(TYPE, not(emptyString()))
.body(TYPE, is("Catalog"))
.body(TYPE, is("dcat:Catalog"))
.extract()
.jsonPath();
}
Expand Down
Loading
Loading