License Controller
Introduction
Use the license controller to create and manage license templates and to assign those templates to mediacontainers.
License templates
License templates allow you to define reusable license structures that can be assigned to multiple mediacontainers.
A template contains all relevant license information — usage types, contacts, metadata, personal rights, and usage restrictions — and serves as the basis for individual licenses. Before a template can be assigned to a mediacontainer, it must be locked (flag 10).
Locking a template ensures that all derived licenses remain consistent and cannot be affected by subsequent changes to the template. Use the lockLicense parameter when creating or updating a template to lock it. To unlock a template, set lockLicense to false and provide an unlockReason.
Each template requires at least:
- A
license_nameandlicense_descriptionin themetadataarray - At least one contact of type
licensorin thecontactsarray
Licenses
Once a license template is locked, it can be assigned to a mediacontainer by creating a license with the corresponding templateId and mediaContainerId. The template data is merged with any additional parameters you send.
A mediacontainer can have multiple licenses, including multiple licenses based on the same template (e.g. for different usage types, regions, or licensing periods).
When a license is assigned to a mediacontainer, the following happens automatically:
- If no
settings.startDateis set on the mediacontainer, it will be set to the license'sstartdate.startDateSetBywill be set to{ type: "license", id: }. - If no
settings.endDateis set on the mediacontainer, it will be set to the license'senddate.endDateSetBywill be set to{ type: "license", id: }.
These values can be overwritten manually, but the license watcher (see below) will continue to monitor and enforce the license end date regardless.
License Watcher
If a license has an end date set, the license watcher service automatically monitors all affected mediacontainers and deactivates them when the license expires — helping you avoid claims for wrongful usage of assets.
The license watcher will deactivate a mediacontainer (set flag 9) when the license expires, unless:
- the license has
settings.behaviour.ignoreAutoDeactivateset totrue— use this if you want to manage deactivation yourself and opt out of automatic enforcement. - the license has
settings.behaviour.ignoreForMediaContainerSettingsset totrue— use this if the license should not influence the mediacontainer'sstartDate/endDatesettings at all. This is useful when a license is assigned purely for documentation purposes without affecting the mediacontainer's availability - The mediacontainer is already deactivated – see MediaContainer Controller
When a mediacontainer is deactivated by the license watcher, the event unpublished_because_licenseEnd is added to its event history.
Note: If you manually re-activate a mediacontainer after the license watcher has deactivated it, it will not be automatically deactivated again.
Please also read about start and end date in section Availability of mediacontainers for external publishing at MediaContainer Controller