技能标识:tractusx-edc-v3
Interact with Tractus-X EDC (Eclipse Data Connector) control plane API v3 for managing assets, contract negotiations, policies, and data transfers.
使用此技能通过 v3 API 与 Tractus-X EDC(Eclipse 数据连接器)控制平面进行交互。
设置以下环境变量:
${EDCCONTROLPLANE_URL}/v3
创建资产:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/assets \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {
properties: {
id: asset-id,
name: Asset Name,
contentType: application/json,
description: Data asset description
},
dataAddress: {
type: HttpData,
baseUrl: https://provider.example.com/data,
proxyBody: true,
proxyPath: true
}
}
更新资产:
bash
curl -X PUT ${EDCCONTROLPLANE_URL}/v3/assets \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {
properties: {
id: asset-id,
name: Updated Asset Name
}
}
列出资产:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/assets/request \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {
filterExpression: [],
range: {from: 0, to: 100}
}
获取资产:
bash
curl -X GET ${EDCCONTROLPLANE_URL}/v3/assets/{id} \
-H X-Api-Key: ${EDCAPIKEY}
删除资产:
bash
curl -X DELETE ${EDCCONTROLPLANE_URL}/v3/assets/{id} \
-H X-Api-Key: ${EDCAPIKEY}
列出策略:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/policydefinitions/request \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {filterExpression: [], range: {from: 0, to: 100}}
创建合约定义:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/contractdefinitions \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {
id: contract-def-id,
accessPolicyId: policy-id,
contractPolicyId: policy-id,
assetsSelector: [{
operandLeft: https://w3id.org/edc/v0.0.1/ns/id,
operator: =,
operandRight: asset-id
}]
}
更新合约定义:
bash
curl -X PUT ${EDCCONTROLPLANE_URL}/v3/contractdefinitions \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {
id: contract-def-id,
accessPolicyId: policy-id,
contractPolicyId: policy-id,
assetsSelector: [{
operandLeft: https://w3id.org/edc/v0.0.1/ns/id,
operator: =,
operandRight: asset-id
}]
}
列出合约定义:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/contractdefinitions/request \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {filterExpression: [], range: {from: 0, to: 100}}
发起协商:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/contractnegotiations \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {
connectorId: provider-connector-id,
connectorAddress: http://provider-connector:9194/protocol/dsp,
offer: {
assetId: asset-id,
offerId: offer-id:1,
policy: {
permissions: [{
target: default,
action: {type: USE},
constraints: []
}]
}
}
}
查询协商:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/contractnegotiations/request \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {filterExpression: [], range: {from: 0, to: 100}}
获取协商的合约协议:
bash
curl -X GET ${EDCCONTROLPLANE_URL}/v3/contractnegotiations/{id}/agreement \
-H X-Api-Key: ${EDCAPIKEY}
获取合约协议:
bash
curl -X GET ${EDCCONTROLPLANE_URL}/v3/contractagreements/{id} \
-H X-Api-Key: ${EDCAPIKEY}
获取已退休的协议:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/contractagreements/retirements/request \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY}
发起传输:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/transferprocesses \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {
protocol: dsp,
connectorId: provider-connector-id,
connectorAddress: http://provider-connector:9194/protocol/dsp,
contractId: contract-agreement-id,
assetId: asset-id,
managedResources: true,
dataDestination: {
type: HttpProxy,
baseUrl: http://consumer-backend:8080/data
}
}
暂停传输:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/transferprocesses/{id}/suspend \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {reason: Suspension reason}
发起 EDR 协商:
bash
curl -X POST ${EDCCONTROLPLANE_URL}/v3/edrs \
-H Content-Type: application/json \
-H X-Api-Key: ${EDCAPIKEY} \
-d {
connectorId: provider-connector-id,
connectorAddress: http://provider-connector:9194/protocol/dsp,
offer: {
assetId: asset-id,
offerId: offer-id:1,
policy: {
permissions: [{
target: default,
action: {type: USE},
constraints: []
}]
}
}
}
获取 EDR 数据地址:
bash
curl -X GET ${EDCCONTROLPLANE_URL}/v3/edrs/{transferProcessId}/dataaddress \
-H X-Api-Key: ${EDCAPIKEY
以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:
帮我安装 SkillHub 和 tractusx-edc-1776126961 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 tractusx-edc-1776126961 技能
skillhub install tractusx-edc-1776126961
文件大小: 3.75 KB | 发布时间: 2026-4-14 12:47