Link

License Template Services

License templates list

Return a list of all license templates for the current vendor.

HTTP Method / URL

GET /core/v2/rest/licensetemplate

Security
  • Basic Authentication
  • API Key Identification
    • ROLE_APIKEY_ADMIN
    • ROLE_APIKEY_MAINTENANCE
    • ROLE_APIKEY_OPERATION
    • ROLE_APIKEY_ANALYTICS

Request Header

Accept: application/json | application/xml

Request Parameters

 - None -

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: LicenseTemplateService.list

Example

Request
GET https://go.netlicensing.io/core/v2/rest/licensetemplate
Accept: application/xml
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="LicenseTemplate">
            <property name="number">E001</property>
            <property name="active">true</property>
            <property name="name">Demo License</property>
            <property name="licenseType">VOLUME</property>
        </item>
    </items>
</netlicensing>

Get license template

Return a license template by licenseTemplateNumber.

HTTP Method / URL

GET /core/v2/rest/licensetemplate/{licenseTemplateNumber}

Security
  • Basic Authentication
  • API Key Identification
    • ROLE_APIKEY_ADMIN
    • ROLE_APIKEY_MAINTENANCE
    • ROLE_APIKEY_OPERATION
    • ROLE_APIKEY_ANALYTICS

Request Header

Accept: application/json | application/xml

Request Parameters

licenseTemplateNumber (string) - License template number.

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: LicenseTemplateService.get

Example

Request
GET https://go.netlicensing.io/core/v2/rest/licensetemplate/E001
Accept: application/xml
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="LicenseTemplate">
        <property name="number">E001</property>
        <property name="active">true</property>
        <property name="name">Demo License</property>
        <property name="licenseType">VOLUME</property>
        </item>
    </items>
</netlicensing>

Create license template

Creates a new license template.

HTTP Method / URL

POST /core/v2/rest/licensetemplate

Security

Request Header

Accept: application/json | application/xml
Content-Type: application/x-www-form-urlencoded

Request Parameters

productModuleNumber (string) - Number of product module to ?reate license template object.

number (string) - Unique number (across all products of a vendor) that identifies the license template. Vendor can assign this number when creating a license template or let NetLicensing generate one. Read-only after creation of the first license from this license template.

name (string) - License template name to create license template object.

active (boolean) - If set to 'false', the license template is disabled. Licensee can not obtain any new licenses off this license template. 

licenseType (Array[string]) - Type of licenses created from this license template. Supported types: "FEATURE", "TIMEVOLUME", "FLOATING", "QUANTITY".

timeVolume (number) - Mandatory for 'TIMEVOLUME' license type.

timeVolumePeriod (string) - Indicates the time unit for the 'timeVolume' parameter; allowed values - DAY, WEEK, MONTH, YEAR

maxSessions (string) - Mandatory for 'FLOATING' license type.

quantity (string) - Mandatory for 'QUANTITY' license type.

price (double) - Price for the license. If >0, it must always be accompanied by the currency specification. Optional. 

currency (enum) - specifies currency for the license price. Check data types to discover which currencies are supported. Read-only, set from license template on creation. Optional.

- EUR       - Euro currency for the license price

automatic (boolean) - If set to 'true', every new licensee automatically gets one license out of this license template on creation. Automatic licenses must have their price set to 0. Optional.

hidden (boolean) - If set to 'true', this license template is not shown in NetLicensing Shop as offered for purchase. Optional.

hideLicenses (boolean) - If set to 'true', licenses from this license template are not visible to the end customer, but participate in validation. Optional.

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: LicenseTemplateService.create

Example

Request
POST https://go.netlicensing.io/core/v2/rest/licensetemplate
productModuleNumber=M0UKRZU3X&number=EZZQJP71K&active=false&name=License+Template+2JSMODHU&licenseType=VOLUME
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="LicenseTemplate">
            <property name="number">EZZQJP71K</property>
            <property name="active">false</property>
            <property name="name">License Template 2JSMODHU</property>
            <property name="licenseType">VOLUME</property>
        </item>
    </items>
</netlicensing>

Update license template

Sets the provided properties to a license template. Return an updated license template.

HTTP Method / URL

POST /core/v2/rest/licensetemplate/{licenseTemplateNumber}

Security

Request Header

Accept: application/json | application/xml
Content-Type: application/x-www-form-urlencoded

Request Parameters

licenseTemplateNumber (string) - License template number.

number (string) - Unique number (across all products of a vendor) that identifies the license template. Vendor can assign this number when creating a license template or let NetLicensing generate one. Read-only after creation of the first license from this license template.

name (string) - License template name to create license template object.

active (boolean) - If set to 'false', the license template is disabled. Licensee can not obtain any new licenses off this license template. 

licenseType (Array[string]) - Type of licenses created from this license template. Supported types: "FEATURE", "TIMEVOLUME", "FLOATING", "QUANTITY".

timeVolume (number) - Mandatory for 'TIMEVOLUME' license type.

timeVolumePeriod (string) - Indicates the time unit for the 'timeVolume' parameter; allowed values - DAY, WEEK, MONTH, YEAR

maxSessions (string) - Mandatory for 'FLOATING' license type.

quantity (string) - Mandatory for 'QUANTITY' license type.

price (double) - Price for the license. If >0, it must always be accompanied by the currency specification. Optional. 

currency (enum) - specifies currency for the license price. Check data types to discover which currencies are supported. Read-only, set from license template on creation. Optional.

- EUR       - Euro currency for the license price

automatic (boolean) - If set to 'true', every new licensee automatically gets one license out of this license template on creation. Automatic licenses must have their price set to 0. Optional.

hidden (boolean) - If set to 'true', this license template is not shown in NetLicensing Shop as offered for purchase. Optional.

hideLicenses (boolean) - If set to 'true', licenses from this license template are not visible to the end customer, but participate in validation. Optional.

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: LicenseTemplateService.update

Example

Request
POST https://go.netlicensing.io/core/v2/rest/licensetemplate/E001
number=EH3JQCWUI&name=changedLicenseTeplateName
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="LicenseTemplate">
            <property name="number">EH3JQCWUI</property>
            <property name="active">false</property>
            <property name="name">changedLicenseTeplateName</property>
            <property name="licenseType">VOLUME</property>
        </item>
    </items>
</netlicensing>

Delete license template

Delete a license template by number.

HTTP Method / URL

DELETE /core/v2/rest/licensetemplate/{licenseTemplateNumber}?forceCascade

Security

Request Header

Accept: application/json | application/xml

Request Parameters

licenseTemplateNumber (string) - License template number.
forceCascade (boolean) - Force object deletion and all descendants.

HTTP Status Code

204 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: LicenseTemplateService.delete

Example

Request
DELETE https://go.netlicensing.io/core/v2/rest/licensetemplate/E001
Accept: application/xml
Response
HTTP/1.1 204 No Content