Link

License Services

Licenses list

Return a list of all licenses for the current vendor.

HTTP Method / URL

GET /core/v2/rest/license

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: LicenseService.list

Example

Request
GET https://go.netlicensing.io/core/v2/rest/license
Accept: application/xml
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="License">
            <property name="number">L001</property>
            <property name="active">true</property>
            <property name="CustomProperty">CustomPropertyValue</property>
        </item>
    </items>
</netlicensing>

Get license

Return a license by licenseNumber.

HTTP Method / URL

GET /core/v2/rest/license/{licenseNumber}

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

licenseNumber (string) - License 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: LicenseService.get

Example

Request
GET https://go.netlicensing.io/core/v2/rest/license/L001
Accept: application/xml
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="License">
            <property name="number">L001</property>
            <property name="active">true</property>
            <property name="CustomProperty">CustomPropertyValue</property>
        </item>
    </items>
</netlicensing>

Create license

Creates a new license.

</td>

HTTP Method / URL

POST /core/v2/rest/license

Security

Request Header

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

Request Parameters

licenseeNumber (string) - licenseeNumber to assign new license object.

licenseTemplateNumber (string) - licenseTemplateNumber to assign new license object. 

number (string) - Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation transaction status is set to closed.

active (boolean) - If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled, the license is excluded from the validation process.

name (string) - Name for the licensed item. Set from license template on creation, if not specified explicitly. Optional.

price (double) - price for the license. If >0, it must always be accompanied by the currency specification. Read-only, set from license template on creation. 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

hidden (boolean) - If set to 'true', this license is not shown in NetLicensing Shop as purchased license. Set from license template on creation, if not specified explicitly. Optional.

parentfeature (string) - Mandatory for 'TIMEVOLUME' license type and 'RENTAL' licensing model. Optional.

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

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

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: LicenseService.create

Example

Request
POST https://go.netlicensing.io/core/v2/rest/license
licenseeNumber=IKPQGUUJ4&licenseTemplateNumber=EUJOJ74GS&active=true
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="License">
            <property name="number">IKPQGUUJ4</property>
            <property name="active">true</property>
        </item>
    </items>
</netlicensing>

Update license

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

HTTP Method / URL

POST /core/v2/rest/license/{licenseNumber}

Security

Request Header

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

Request Parameters

licenseNumber (string) - Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation transaction status is set to closed.

number (string) - Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation transaction status is set to closed. Optional.

active (boolean) - If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled, the license is excluded from the validation process. Optional.

name (string) - Name for the licensed item. Set from license template on creation, if not specified explicitly. Optional.

startDate (date-time) - for TIMEVOLUME licenseType

parentfeature (string) - Mandatory for 'TIMEVOLUME' license type and 'RENTAL' licensing model. Optional.

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

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

price (double) - price for the license. If >0, it must always be accompanied by the currency specification. Read-only, set from license template on creation. 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

hidden (boolean) - If set to 'true', this license is not shown in NetLicensing Shop as purchased license. Set from license template on creation, if not specified explicitly. 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: LicenseService.update

Example

Request
POST https://go.netlicensing.io/core/v2/rest/license/L2DH0QG1O
active=true
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="License">
            <property name="number">L2DH0QG1O</property>
            <property name="active">true</property>
            <property name="transactionNumber">TFMEIR1B9</property>
            <property name="custPropForLic">CustPropValUpdated</property>
            <property name="custPropForLicOnUpd">BlaBlaVal</property>
        </item>
    </items>
</netlicensing>

Delete license

Delete a license by number.

HTTP Method / URL

DELETE /core/v2/rest/license/{licenseNumber}

Security

Request Header

Accept: application/json | application/xml

Request Parameters

licenseNumber (string) - License number.

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: LicenseService.delete

Example

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