License Services
Licenses are issued to a licensee from a license template.
Authentication, formats, error codes, paging and role levels are the same for all endpoints and described on the Conventions page. Paths are relative to https://go.netlicensing.io/core/v2/rest. Every call can be tried in the API Test Center.
| Endpoint | Purpose | Role |
|---|---|---|
GET /license | List licenses | Licensee+ |
GET /license/{licenseNumber} | Get license | Licensee+ |
POST /license | Create license | Operation+ |
POST /license/{licenseNumber} | Update license | Operation+ |
DELETE /license/{licenseNumber} | Delete license | Operation+ |
A role followed by “+” means that role and every higher one, see Roles.
Licenses list
GET /license
Required role: Licensee+
Return a list of all licenses for the current vendor.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
filter | query | string | ;-separated key=value pairs, e.g. page=0;items=50;sortorder=number;sortdirection=DESC. |
Example
curl --user demo:demo --header "Accept: application/xml" \
https://go.netlicensing.io/core/v2/rest/license
<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
GET /license/{licenseNumber}
Required role: Licensee+
Return a license by licenseNumber.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
licenseNumber | path | string | yes | Number of the license. |
Example
curl --user demo:demo --header "Accept: application/xml" \
https://go.netlicensing.io/core/v2/rest/license/L001
<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
POST /license
Required role: Operation+
Creates a new license. The body is form encoded (application/x-www-form-urlencoded).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
number | body | string | Unique number that identifies the entity. Optional on create: when omitted, NetLicensing generates one. On update, a new value renames the entity. | |
active | body | boolean | false disables the entity. Defaults to true when omitted on create. On update, an omitted value leaves the current state unchanged. | |
licenseeNumber | body | string | yes | Licensee that receives the license. Required on create. |
licenseTemplateNumber | body | string | yes | Template the license is created from. Required on create. |
transactionNumber | body | string | Optional. Links the license to an existing transaction. | |
name | body | string | Name of the licensed item. Taken from the license template when omitted. | |
hidden | body | boolean | If true, the license is not shown to the end customer. Taken from the license template when omitted. | |
startDate | body | string | TIMEVOLUME licenses: start of the time volume. Required for Rental and for non-automatic Subscription licenses. | |
parentFeature | body | string | Rental TIMEVOLUME licenses (required): number of the FEATURE license that this time volume extends. | |
timeVolume | body | string | TIMEVOLUME licenses. Taken from the license template when omitted. | |
timeVolumePeriod | body | string | Unit of timeVolume. Defaults to DAY when omitted. Values: DAY, WEEK, MONTH, YEAR. | |
maxSessions | body | string | FLOATING licenses. Taken from the license template when omitted. | |
quantity | body | string | QUANTITY licenses (PayPerUse, Quota, NodeLocked). Taken from the license template when omitted. | |
usedQuantity | body | string | PayPerUse: quantity already used. Must not exceed quantity. | |
gracePeriod | body | boolean | Rental, Subscription: marks the license as a grace period license. |
Any other body field is stored as a custom property.
Example
curl --user demo:demo --header "Accept: application/xml" \
--data "licenseeNumber=IKPQGUUJ4&licenseTemplateNumber=EUJOJ74GS&active=true" \
https://go.netlicensing.io/core/v2/rest/license
<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
POST /license/{licenseNumber}
Required role: Operation+
Sets the provided properties to a license. Return an updated license. The body is form encoded (application/x-www-form-urlencoded).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
licenseNumber | path | string | yes | Number of the license. |
number | body | string | Unique number that identifies the entity. Optional on create: when omitted, NetLicensing generates one. On update, a new value renames the entity. | |
active | body | boolean | false disables the entity. Defaults to true when omitted on create. On update, an omitted value leaves the current state unchanged. | |
licenseeNumber | body | string | Licensee that receives the license. Required on create. | |
licenseTemplateNumber | body | string | Template the license is created from. Required on create. | |
transactionNumber | body | string | Optional. Links the license to an existing transaction. | |
name | body | string | Name of the licensed item. Taken from the license template when omitted. | |
hidden | body | boolean | If true, the license is not shown to the end customer. Taken from the license template when omitted. | |
startDate | body | string | TIMEVOLUME licenses: start of the time volume. Required for Rental and for non-automatic Subscription licenses. | |
parentFeature | body | string | Rental TIMEVOLUME licenses (required): number of the FEATURE license that this time volume extends. | |
timeVolume | body | string | TIMEVOLUME licenses. Taken from the license template when omitted. | |
timeVolumePeriod | body | string | Unit of timeVolume. Defaults to DAY when omitted. Values: DAY, WEEK, MONTH, YEAR. | |
maxSessions | body | string | FLOATING licenses. Taken from the license template when omitted. | |
quantity | body | string | QUANTITY licenses (PayPerUse, Quota, NodeLocked). Taken from the license template when omitted. | |
usedQuantity | body | string | PayPerUse: quantity already used. Must not exceed quantity. | |
gracePeriod | body | boolean | Rental, Subscription: marks the license as a grace period license. |
Any other body field is stored as a custom property.
Example
curl --user demo:demo --header "Accept: application/xml" \
--data "active=true" \
https://go.netlicensing.io/core/v2/rest/license/L2DH0QG1O
<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 /license/{licenseNumber}
Required role: Operation+
Delete a license by number.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
licenseNumber | path | string | yes | Number of the license. |
forceCascade | query | string | true also deletes dependent entities. Any other value, or no value, means false. |
Example
curl --user demo:demo --header "Accept: application/xml" \
--request DELETE \
https://go.netlicensing.io/core/v2/rest/license/L001
HTTP/1.1 204 No Content