Contract-Agreements

This page may take a moment to fully load because the data is being fetched and parsed live from the original OpenAPI specification file. GitBook could also adjust the page width for this page so that the content can be displayed better.

Welcome to the OpenAPI Documentation page! This section provides a comprehensive overview of all the available APIs that adhere to the OpenAPI Specification. Here, you'll find detailed information on each API's endpoints, request/response formats, authentication methods, and more. Whether you're integrating with our services or building your own application, this documentation is designed to help you navigate and utilize our APIs efficiently and effectively. All APIs listed here are loaded directly from the OpenAPI specification files in our Community Edition repository, which are originally located here: Link


Gets all contract agreements according to a particular query

POSThttps://[MY_EDC_FQDN]/api/management/v2/contractagreements/request
Body
@typestring
Example: "https://w3id.org/edc/v0.0.1/ns/QuerySpec"
filterExpressionarray of Criterion (object)
limitinteger (int32)
offsetinteger (int32)
sortFieldstring
sortOrderenum
ASCDESC
Response

The contract agreements matching the query

Body
@idstring
@typestring
Example: "https://w3id.org/edc/v0.0.1/ns/ContractAgreement"
assetIdstring
consumerIdstring
contractSigningDateinteger (int64)
policyPolicy (object)

ODRL policy

providerIdstring
Request
const response = await fetch('https://[MY_EDC_FQDN]/api/management/v2/contractagreements/request', {
    method: 'POST',
    headers: {
      "Content-Type": "*/*"
    },
    body: JSON.stringify({
      "@context": {
        "edc": "https://w3id.org/edc/v0.0.1/ns/"
      },
      "@type": "QuerySpec",
      "offset": 5,
      "limit": 10,
      "sortOrder": "DESC",
      "sortField": "fieldName",
      "filterExpression": []
    }),
});
const data = await response.json();
Response
null

Gets an contract agreement with the given ID

GEThttps://[MY_EDC_FQDN]/api/management/v2/contractagreements/{id}
Path parameters
id*string
Response

The contract agreement

Body
@idstring
@typestring
Example: "https://w3id.org/edc/v0.0.1/ns/ContractAgreement"
assetIdstring
consumerIdstring
contractSigningDateinteger (int64)
policyPolicy (object)

ODRL policy

providerIdstring
Request
const response = await fetch('https://[MY_EDC_FQDN]/api/management/v2/contractagreements/{id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "@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"
      }
    ]
  }
}

Gets a contract negotiation with the given contract agreement ID

GEThttps://[MY_EDC_FQDN]/api/management/v2/contractagreements/{id}/negotiation
Path parameters
id*string
Response

The contract negotiation

Body
@idstring
@typestring
Example: "https://w3id.org/edc/v0.0.1/ns/ContractNegotiation"
callbackAddressesarray of CallbackAddress (object)
contractAgreementIdstring
counterPartyAddressstring
counterPartyIdstring
errorDetailstring
protocolstring
statestring
typeenum
CONSUMERPROVIDER
Request
const response = await fetch('https://[MY_EDC_FQDN]/api/management/v2/contractagreements/{id}/negotiation', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "@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"
    }
  ]
}

Last updated