Link
✎

Product Module Services

Product modules are the licensable parts of a product. Each module uses one licensing model.

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 /productmodule List product modules Analytics+
GET /productmodule/{productModuleNumber} Get product module Analytics+
POST /productmodule Create product module Maintenance+
POST /productmodule/{productModuleNumber} Update product module Maintenance+
DELETE /productmodule/{productModuleNumber} Delete product module Maintenance+

A role followed by “+” means that role and every higher one, see Roles.


Product modules list

GET /productmodule

Required role: Analytics+

Return a list of all product modules 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

Request
curl --user demo:demo --header "Accept: application/xml" \
  https://go.netlicensing.io/core/v2/rest/productmodule
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="ProductModule">
            <property name="number">M001</property>
            <property name="active">true</property>
            <property name="name">Product Module Numero Duo</property>
            <property name="licensingModel">LMOD1</property>
        </item>
    </items>
</netlicensing>

Try it in the API Test Center


Get product module

GET /productmodule/{productModuleNumber}

Required role: Analytics+

Return a product module by productModuleNumber.

Parameters

Name In Type Required Description
productModuleNumber path string yes Number of the product module.

Example

Request
curl --user demo:demo --header "Accept: application/xml" \
  https://go.netlicensing.io/core/v2/rest/productmodule/M001
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="ProductModule">
            <property name="number">M001</property>
            <property name="active">true</property>
            <property name="name">Product Module Numero Duo</property>
            <property name="licensingModel">LMOD1</property>
        </item>
    </items>
</netlicensing>

Try it in the API Test Center


Create product module

POST /productmodule

Required role: Maintenance+

Creates a new product module. 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.
productNumber body string yes Product the module belongs to. Required on create.
name body string yes Module name shown to end customers in the NetLicensing Shop. Required on create.
licensingModel body string yes Licensing model of the module. It defines which license templates the module can have and how its licenses are validated. Required on create. Values: TryAndBuy, Rental, Subscription, Floating, MultiFeature, PayPerUse, PricingTable, Quota, NodeLocked, Discount.
maxCheckoutValidity body string   Floating (required): maximum time a session stays checked out, in seconds. Non-negative integer.
yellowThreshold body string   Warning level threshold. Rental: remaining time volume, in days, below which the warning level turns yellow. Floating, NodeLocked, PayPerUse, Subscription, PricingTable: percentage (0-100).
redThreshold body string   Rental: remaining time volume, in days, below which the warning level turns red. Non-negative integer.
nodeSecretMode body string   NodeLocked (required): CLIENT takes the node secret from the validation call. PREDEFINED uses secrets set up in advance and is not allowed when the product has licenseeAutoCreate=true.

Any other body field is stored as a custom property.

Example

Request
curl --user demo:demo --header "Accept: application/xml" \
  --data "productNumber=PQVJQ5F7H&number=M0UKRZU3X&active=false&name=Product+Module+JB8KUEW8&licensingModel=LM-E4UWXR75" \
  https://go.netlicensing.io/core/v2/rest/productmodule
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="ProductModule">
            <property name="number">M0UKRZU3X</property>
            <property name="active">false</property>
            <property name="name">Product Module JB8KUEW8</property>
            <property name="licensingModel">LM-E4UWXR75</property>
        </item>
    </items>
</netlicensing>

Try it in the API Test Center


Update product module

POST /productmodule/{productModuleNumber}

Required role: Maintenance+

Sets the provided properties to a product module. Return an updated product module. The body is form encoded (application/x-www-form-urlencoded).

Parameters

Name In Type Required Description
productModuleNumber path string yes Number of the product module.
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.
productNumber body string   Product the module belongs to. Required on create.
name body string   Module name shown to end customers in the NetLicensing Shop. Required on create.
licensingModel body string   Licensing model of the module. It defines which license templates the module can have and how its licenses are validated. Required on create. Values: TryAndBuy, Rental, Subscription, Floating, MultiFeature, PayPerUse, PricingTable, Quota, NodeLocked, Discount.
maxCheckoutValidity body string   Floating (required): maximum time a session stays checked out, in seconds. Non-negative integer.
yellowThreshold body string   Warning level threshold. Rental: remaining time volume, in days, below which the warning level turns yellow. Floating, NodeLocked, PayPerUse, Subscription, PricingTable: percentage (0-100).
redThreshold body string   Rental: remaining time volume, in days, below which the warning level turns red. Non-negative integer.
nodeSecretMode body string   NodeLocked (required): CLIENT takes the node secret from the validation call. PREDEFINED uses secrets set up in advance and is not allowed when the product has licenseeAutoCreate=true.

Any other body field is stored as a custom property.

Example

Request
curl --user demo:demo --header "Accept: application/xml" \
  --data "number=MNAR74BK9&name=newName" \
  https://go.netlicensing.io/core/v2/rest/productmodule/M001
Response
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
    <items>
        <item type="ProductModule">
            <property name="number">MNAR74BK9</property>
            <property name="active">false</property>
            <property name="name">newName</property>
            <property name="licensingModel">FeatureTimeVolume</property>
        </item>
    </items>
</netlicensing>

Try it in the API Test Center


Delete product module

DELETE /productmodule/{productModuleNumber}

Required role: Maintenance+

Delete a product module by number.

Parameters

Name In Type Required Description
productModuleNumber path string yes Number of the product module.
forceCascade query string   true also deletes dependent entities. Any other value, or no value, means false.

Example

Request
curl --user demo:demo --header "Accept: application/xml" \
  --request DELETE \
  https://go.netlicensing.io/core/v2/rest/productmodule/M001
Response
HTTP/1.1 204 No Content

Try it in the API Test Center

Last updated · Edit this page on GitHub