Description
Current Behavior
Hi all! I'm creating an access policy to be used among some of my contracts, and I want to re-use the same policy for some of them. I'm able to create the policy with the following request body:
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/",
},
"@id": "{{POLICY_DEFINITION_ID}}",
"policy": {
"@context": "http://www.w3.org/ns/odrl.jsonld",
"@type": "Set",
"@id": "{{POLICY_DEFINITION_ID}}",
"odrl:permission": [
{
"odrl:action": "USE",
"odrl:constraint": {
"@type": "LogicalConstraint",
"odrl:and": [{
"@type": "Constraint",
"odrl:leftOperand": "BusinessPartnerNumber",
"odrl:operator": {
"@id": "odrl:eq"
},
"odrl:rightOperand": "BPNL123"
}]
}
}
]
}
}
Which gives me an IdResponse like:
{
"@type": "IdResponse",
"@id": "4fe7d4f3-9890-4cd9-9e1e-671faf8ba39b",
"createdAt": 1726832897018,
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/",
"edc": "https://w3id.org/edc/v0.0.1/ns/",
"tx": "https://w3id.org/tractusx/v0.0.1/ns/",
"tx-auth": "https://w3id.org/tractusx/auth/",
"cx-policy": "https://w3id.org/catenax/policy/",
"odrl": "http://www.w3.org/ns/odrl/2/"
}
}
When I try to query by its ID using POST /management/v3/policydefinitions/request
, it works seamsly:
However, the same query does not work when I try to query it by its BusinessPartnerNumber
:
It brings back this Error validating schema: Field BusinessPartnerNumber not found on type class org.eclipse.edc.connector.controlplane.policy.spi.PolicyDefinition
.
Where can I find this validation schema details? I was browsing the current repository but could not find anything mentioning that, nor the Swagger has any example for such.
I'm following the Swagger specs are provided in the following link:
https://app.swaggerhub.com/apis/eclipse-tractusx-bot/tractusx-edc/0.8.0-rc3
My EDC is on version 0.7.3
.
Thank you all!