LogoLogo
EDCDSPortalDAPS
CE 11.0.0
CE 11.0.0
  • Welcome
  • Key Concepts
  • FAQ
  • Frontend
    • Walkthrough
    • Dashboard
    • Providing
      • 1. Create Data Offer
      • 2. Create Asset
      • 3. Create Policy
      • 4. Create Contract Definition
    • Consuming
      • 1. Finding Offers
      • 2. Initiating Transfers (HttpData-Push)
      • 3. Transfer History
    • Contract Termination
  • Backend
    • Postman
    • API-Wrapper vs Management-API
    • API-Wrapper
      • Java Client Library
    • Management-API
      • Secrets API
      • Contract Definition: Multiple Assets
      • QuerySpec
      • Health Check APIs
      • Policy: Business Partner Groups
      • Policy: Unrestricted
    • Data Transfer
      • HttpData-Pull (Parameterized)
      • AWS S3 Transfer
      • Source: Audit Headers
      • Source/Sink: OAuth2/API-Key
  • Community Edition Deployment
    • Overview
    • Local Demo
    • Production
  • Customer Links
    • Glossary
    • sovity Hub
    • Service Desk
Powered by GitBook
LogoLogo

sovity

  • Homepage
  • About us
  • GitHub
  • LinkedIn

Information

  • Contact
  • Imprint
  • Privacy Policy

© by sovity GmbH

On this page
  • Example Configuration
  • Important Considerations

Was this helpful?

Edit on GitHub
  1. Backend
  2. Management-API

Contract Definition: Multiple Assets

This documentation provides instructions on how to use the IN operator in the assetsSelector to specify multiple assets in a single ContractDefinition.

Example Configuration

Below is an example of a ContractDefinition configuration where the assetsSelector is used to specify multiple assets that should be governed by the same ContractDefinition. The IN operator is used to list these assets.

JSON
{
   "@id": "contractdefinition",
   "@type": "https://w3id.org/edc/v0.0.1/ns/ContractDefinition",
   "https://w3id.org/edc/v0.0.1/ns/accessPolicyId": "always-true",
   "https://w3id.org/edc/v0.0.1/ns/contractPolicyId": "always-true",
   "https://w3id.org/edc/v0.0.1/ns/assetsSelector": [
    {
      "@type": "CriterionDto",
      "https://w3id.org/edc/v0.0.1/ns/operandLeft": "https://w3id.org/edc/v0.0.1/ns/id",
      "https://w3id.org/edc/v0.0.1/ns/operator": "in",
      "https://w3id.org/edc/v0.0.1/ns/operandRight": ["test1","test2"]
    }
   ]
}

Important Considerations

When defining multiple assets in the assetsSelector for a ContractDefinition, it is crucial to use the IN operator rather than specifying multiple arrays for multiple assets. Although the API will accept multiple arrays in the assetsSelector, this approach can lead to issues with catalog requests from potential consumers. Specifically, the catalog request response will fail to resolve all assets beyond the first.

To ensure proper functionality and compatibility, always use the IN operator to add multiple assets within an assetsSelector. This method guarantees that all specified assets are correctly processed and available in catalog requests.

Last updated 2 months ago

Was this helpful?