PolicyTemplates

Instantiate an ODRL offer from a template

Changed on
post/policy-templates/instantiate-odrl-offer

Request

  • Base URL: http://localhost:8080/api
  • URL: http://localhost:8080/api/policy-templates/instantiate-odrl-offer
  • Auth: none declared

Request body

idstring required
versionstring required
parametersobject required
entityIdstring urn required
entityType'Distribution' | 'DataService' | 'Catalog' | 'Dataset' required
descriptionstring

Example request

{
  "id": "policy-1",
  "version": "1.0",
  "parameters": {
    "$bla": "hola"
  },
  "entityId": "urn:catalog:35d10981-1d0b-4204-b32e-847b827ce635",
  "entityType": "Catalog"
}

Response

Created

idstring urn
entitystring urn
entityType'Distribution' | 'DataService' | 'Catalog' | 'Dataset'
createdAtstring date-time
sourceTemplateIdstring
sourceTemplateVersionstring
instantiationParametersobject
descriptionstring

Example response

{
  "createdAt": "2026-01-10T14:40:30.978559Z",
  "entity": "urn:catalog:35d10981-1d0b-4204-b32e-847b827ce635",
  "entityType": "Catalog",
  "id": "urn:odrl-policy:abad083e-78a8-4f90-aaca-7c5d6af6c251",
  "instantiationParameters": {
    "$bla": "hola"
  },
  "odrlOffer": {
    "permission": [
      {
        "action": "use",
        "constraint": [
          {
            "leftOperand": "bla",
            "operator": "eq",
            "rightOperand": "hola"
          }
        ]
      }
    ]
  },
  "sourceTemplateId": "policy-1",
  "sourceTemplateVersion": "1.0"
}

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status