Licensee Services
- Licensees list
- Get licensee
- Create licensee
- Update licensee
- Delete licensee
- Validate licensee
- Transfer licenses
Licensees list
Return a list of all licensees for the current vendor.
HTTP Method / URL | GET /core/v2/rest/licensee |
Security |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | - None - |
HTTP Status Code | 200 - Successful request |
See also JavaDoc: LicenseeService.list
GET https://go.netlicensing.io/core/v2/rest/licensee
Accept: application/xml
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
<items>
<item type="Licensee">
<property name="number">I001</property>
<property name="active">true</property>
<property name="CustomProperty">CustomPropertyValue</property>
</item>
</items>
</netlicensing>
Get licensee
Return a licensee by licenseeNumber.
HTTP Method / URL | GET /core/v2/rest/licensee/{licenseeNumber} |
Security |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | licenseeNumber (string) - Licensee number. |
HTTP Status Code | 200 - Successful request |
See also JavaDoc: LicenseeService.get
GET https://go.netlicensing.io/core/v2/rest/licensee/I001
Accept: application/xml
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
<items>
<item type="Licensee">
<property name="number">I001</property>
<property name="active">true</property>
<property name="CustomProperty">CustomPropertyValue</property>
</item>
</items>
</netlicensing>
Create licensee
Creates a new licensee.
HTTP Method / URL | POST /core/v2/rest/licensee |
Security |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | productNumber (string) - productNumber to assign new licensee object. number (string) - Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for the licensee. Optional. active (boolean) - If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is disabled (tbd). name (string) - Licensee name. Optional. licenseeSecret (string) - Licensee Secret for this licensee ( available in selected pricing plans). Optional. Deprecated, use Node-Locked Licensing Model instead. markedForTransfer (boolean) - Mark licensee for transfer. Optional. |
HTTP Status Code | 200 - Successful request |
See also JavaDoc: LicenseeService.create
POST https://go.netlicensing.io/core/v2/rest/licensee
productNumber=PQVJQ5F7H&number=I762LBSSX&active=false
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
<items>
<item type="Licensee">
<property name="number">I762LBSSX</property>
<property name="active">false</property>
<property name="productNumber">PQVJQ5F7H</property>
</item>
</items>
</netlicensing>
Update licensee
Sets the provided properties to a licensee. Return an updated licensee.
HTTP Method / URL | POST /core/v2/rest/licensee/{licenseeNumber} |
Security |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | licenseeNumber (string) - Licensee number. number (string) - Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for the licensee. Optional. active (boolean) - If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is disabled (tbd). Optional. name (string) - Licensee name. Optional. licenseeSecret (string) - Licensee Secret for licensee ( available in selected pricing plans). Optional. Deprecated, use Node-Locked Licensing Model instead. markedForTransfer (boolean) - Mark licensee for transfer. Optional. |
HTTP Status Code | 200 - Successful request |
See also JavaDoc: LicenseeService.update
POST https://go.netlicensing.io/core/v2/rest/licensee/IUI6MYNIC
number=IP53OX9PF&active=false&custLcseeProp2=custLcseePropVal2&custLcseeProp=custLcseePropValChanged
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
<items>
<item type="Licensee">
<property name="number">IP53OX9PF</property>
<property name="active">false</property>
<property name="productNumber">PJIF898SP</property>
<property name="custLcseeProp">custLcseePropValChanged</property>
<property name="custLcseeProp2">custLcseePropVal2</property>
</item>
</items>
</netlicensing>
Delete licensee
Delete a licensee by number.
HTTP Method / URL | DELETE /core/v2/rest/licensee/{licenseeNumber}?forceCascade |
Security |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | licenseeNumber (string) - Licensee number. forceCascade (boolean) - Force object deletion and all descendants. |
HTTP Status Code | 204 - Successful request |
See also JavaDoc: LicenseeService.delete
DELETE https://go.netlicensing.io/core/v2/rest/licensee/I001
Accept: application/xml
HTTP/1.1 204 No Content
Validate licensee
Validates active licenses of the licensee.
HTTP Method / URL | POST /core/v2/rest/licensee/{licenseeNumber}/validate |
Security |
|
Request Header | Accept: application/json | application/xml Content-Type: application/x-www-form-urlencoded |
Request Parameters | licenseeNumber (string) - licensee number or alias with a maximum length of 1000 characters Some product modules (depending on the licensing model) may require parameters passed on validate. Parameters to the product modules are passed using the following format: productModuleNumber0 (string) - product module 0 number Notes:
|
HTTP Status Code | 204 - Successful request |
You can specify Licensee/Customer custom properties to be set in the validation request. These properties will be considered for all new customers upon initial validation.
To use NetLicnesing effectively, validation must be up-to-date. On the other hand, performing validation requests too frequently will make response time of your service longer and create unnecessary load on the NetLicensing servers. Therefore it is recommended to keep last validation result on the client side and reuse it for a certain period for repeated validation requests. To determine the maximum validity duration of the validation response, NetLicensing returns an additional value with the validation response that is called „ttl“: it is the expiration timestamp of this validation response in ISO 8601 format.
See also JavaDoc: LicenseeService.validate
POST https://go.netlicensing.io/core/v2/rest/licensee/I011/validate
Accept: application/xml
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context" ttl="2015-11-03T15:02:36.137Z">
<items>
<item type="ProductModuleValidation">
<property name="productModuleNumber">M011</property>
<property name="productModuleName">Terminal Devices</property>
<property name="licensingModel">Rental</property>
<list name="L011">
<property name="valid">false</property>
</list>
<list name="L012">
<property name="valid">false</property>
</list>
</item>
</items>
</netlicensing>
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request POST https://go.netlicensing.io/core/v2/rest/licensee/I011/validate
Please Note: HTTP method GET is deprecated for licensee validate.
If you use RESTful API directly in your code, ensure to replace GET with POST for validate. GET method will be removed in one of the future releases, until then you’ll get the following warning if using GET:
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context" ttl="2017-04-04T10:31:45.400Z">
<ns2:infos>
<ns2:info id="methodIsDeprecated" type="warning">'GET' method for licensee validate is deprecated, use 'POST' instead</ns2:info>
</ns2:infos>
<items>
<item type="ProductModuleValidation">
<property name="productModuleNumber">M011</property>
<property name="productModuleName">Terminal Devices</property>
<property name="licensingModel">Rental</property>
<list name="L011">
<property name="valid">false</property>
</list>
<list name="L012">
<property name="valid">false</property>
</list>
</item>
</items>
</netlicensing>
If using NetLicensing client library - update to the newest version.
Besides, new features associated with the validate method will not be available when called using GET.
Please Note: Below specification for the GET method is only present here to help migrating from old code, please don’t use GET method for validate, use POST instead (see above)!
HTTP Method / URL | GET /core/v2/rest/licensee/{licenseeNumber}/validate[?productNumber={productNumber}&licenseeName={licenseeName}] |
Security |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | licenseeNumber (string) - licensee number with a maximum length of 1000 characters Some product modules (depending on the licensing model) may require parameters passed on validate. Parameters to the product modules are passed using the following format: productModuleNumber0 (string) - product module 0 number Notes:
|
HTTP Status Code | 204 - Successful request |
GET https://go.netlicensing.io/core/v2/rest/licensee/I011/validate
Accept: application/xml
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context" ttl="2015-11-03T15:02:36.137Z">
<items>
<item type="ProductModuleValidation">
<property name="productModuleNumber">M011</property>
<property name="productModuleName">Terminal Devices</property>
<property name="licensingModel">Rental</property>
<list name="L011">
<property name="valid">false</property>
</list>
<list name="L012">
<property name="valid">false</property>
</list>
</item>
</items>
</netlicensing>
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request GET https://go.netlicensing.io/core/v2/rest/licensee/I011/validate
Transfer licenses
Transfer licenses between licensees.
HTTP Method / URL | POST /core/v2/rest/licensee/{licenseeNumber}/transfer |
Security |
|
Request Header | Accept: application/json | application/xml |
Request Parameters | licenseeNumber (string) - the number of licensee receiving licenses (max length: 1000 characters) - target sourceLicenseeNumber (string) - the number of (temporary) licensee transferring its licenses (max length: 1000 characters) - source |
HTTP Status Code | 204 - Successful request |
The following prerequisites must be fulfilled:
- Licensees with sourceLicenseeNumber and licenseeNumber must be assigned to the same product
- Source licensee must be marked for transfer (licensee custom property markedForTransfer must be set to
true
)
See also JavaDoc: LicenseeService.transfer
POST https://go.netlicensing.io/core/v2/rest/licensee/I011/transfer
sourceLicenseeNumber=ISourceLicensee
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
HTTP/1.1 204 No Content
$ curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/xml' --header 'Authorization: Basic ZGVtbzpkZW1v' -d 'sourceLicenseeNumber=ISourceLicensee' 'https://go.netlicensing.io/core/v2/rest/licensee/I011/transfer'