Licence Manager ReST Test Page

This page provides very simple tests for the licence manager

user (http basic authentication user name)
password (http basic authentication password)

Product Publisher

The Product Publisher service is used to publish the availability and description of a list of products It is intended to be integrated with a shopping cart or similar web site for publishing product modules

Command Example
/addproductspec (POST productMetadata)

Post command to add a new product specification. Adds a new product specification to the product publisher. Looks for the productId in the product specification and adds an entry in the licence table under that productId. Replaces any previous licence entry

Product Specification



/removeproductspec (GET productId)

Checks the productId removes any entry for productId

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/product-pub/removeproductspec?productId=

Button command Example:
productId

/getproductspec (GET productId)

returns product description for productId if found

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/product-pub/getproductspec?productId=

Button command Example:
productId

/list (GET )

returns a map of product description entries with key=productId

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/product-pub/list

Button command Example:
/clearproductspecs (GET )

Deletes all product descriptions. Will only delete descriptions if paramater confirm=true

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/product-pub/clearproductspecs?confirm=false

Button command Example: Not provided to prevent accidental deletion - use URL

Licence Publisher

The Licence Publisher service is used to publish the availability and description of a list of product licence specifications. A licence specification contains the licence metadata and the keys used to create a new licence. A client must first read the licence metadata for a productId and add additional information (systemId, client name etc) before submitting it to create a new licence string The Licence Publisher is intended to be integrated with a shopping cart or similar web site for publishing product modules

Command Example
/createlicence (POST licenceMetadata)

Creates an encoded String instance of a licence from the supplied licenceMetadata in xml form. Creates an encoded String instance of a licence from the LicenceSecification corresponding to the productId in the supplied createLicenceMetadata throws an exception if the corresponding LicenceSecification cannot be found or the names of options or licencee are different from the specification
Parameter createLicenceMetadata should be created from a copy of the LicenceMetadata in the LicenceSpecfication i.e. it must contain the productId and the options must correspond to the options in the LicenceSpecification

Create Licence from Licence Metadata

/addlicencespec (POST LicenceSpecification)

Adds a new licence specification to the licence publisher. Looks for the productId in the licence specification and adds an entry in the licence table under that productId. Replaces any previous licence entry

licence specification

/removelicencespec (GET productId)

removes the entry for productId from the licenceSpecMap

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-pub/removelicencespec?productId=

Button command Example:
productId

/getlicencespec (GET productId)

the LicenceSpecification stored for productId. Returns error message if no LicenceSpecification found for productId

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-pub/getlicencespec?productId=

Button command Example:
productId

/getlicencemetadataspec (GET productId)

the LicenceSpecification stored for productId. Returns error message if no LicenceSpecification found for productId

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-pub/getlicencemetadataspec?productId=

Button command Example:
productId

/listspecs (GET )

returns a list of the LicenceSpecifications (including the keys)

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-pub/listspecs

Button command Example:
/list (GET )

returns a list of the LicenceMetadata specifications (not the full licence specs with keys)

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-pub/list

Button command Example:
/clearlicencespecs (GET )

deletes all values of the licenceSpecMap. Will only delete specs if paramater confirm=true

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-pub/clearlicencespecs?confirm=false

Button command Example: Not provided to prevent accidental deletion - use URL

Product Register

The Product Register service is used to list the product modules which have been installed in a given OSGi system. Each newly installed product module registers its product description (productmetadata) with this service

Command Example
/addproductspec (POST productMetadata)

Same as command in Product Publisher

Product Specification

/removeproductspec (GET productId)

Same as command in Product Publisher

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/product-reg/removeproductspec?productId=

Button command Example:
productId

/getproductspec (GET productId)

Same as command in Product Publisher

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/product-reg/getproductspec?productId=

Button command Example:
productId

/list (GET ) URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/product-reg/list

Button command Example:
/clearproductspecs (GET )

Same as command in Product Publisher. Will only delete licences if paramater confirm=true

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/product-reg/clearproductspecs?confirm=false

Button command Example: Not provided to prevent accidental deletion - use URL

Licence Manager

The Licence Manager service stores the list of licences installed in a given OSGi system. If a product module requires a licence, it must request it from the licence manager service and then verify it using its internal private keys. A product module should not activate if it cannot verify the licence. Licence strings are installed by user clients using the addlicence service. Clients can perform CRUD operations on the licences installed.

In addition the Licence manager allows the creation and retrieval of the systemId for the OSGi system. The Licence metadata may specify that a licence is only applicable to a specific systemId

Command Example
/addlicence (GET licence)

adds a licence to the licence service. throws error if licence string incorrectly formatted licence string must have correct checksum and readable LicenceMetadata the licence is added for productId corresponding to the productId in the LicenceMetadata previous entries for that productId are overwritten

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/addlicence?licence=

Button command Example:
Licence String

/removelicence (GET productId)

removes any licence corresponding to productId.

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/removelicence?productId=

Button command Example:
productId

/getlicence (GET productId)

gets the licence corresponding to the productId

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/getlicence?productId=

Button command Example:
productId

/isauthenticated (GET productId)

checks if the licence corresponding to the productId is authenticated

Throws 400 error if licence not installed for this productId

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/isauthenticated?productId=

Button command Example:
productId

/list (GET )

returns a map of all installed licences with key=productId and value = licence string

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/list

Button command Example:
/listforsystemid (GET )

returns a map of all installed licences which will authenticate for given systemId with key=productId and value = licence string

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/listforsystemid?systemId=

Button command Example:
systemId

/clearlicences (GET )

deletes all licence entries. Will only delete licences if paramater confirm=true

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/clearlicences?confirm=false

Button command Example: Not provided to prevent accidental deletion - use URL
/getsystemid (GET )

gets the systemId for this system

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/getsystemid

Button command Example:
/setsystemid (GET systemId)

sets the systemId. Note that the checksum for the systemId must be correct

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/setsystemid?systemId=

Button command Example:
systemId

/makesystemid (GET )

Makes a new systemId with a random identifier and checksum. Sets the systemId to the newly generated value

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/makesystemid

Button command Example:
/checksumforstring (GET string)

Generates a checksum for the supplied string
Adds a CRC32 encoded string to supplied string separated by '-' resulting in string of form 'valueString'-'CRC32 in Hex'. Paramater string - string to have checkum added. returns original string plus checksum in form 'valueString'-'CRC32 in Hex'

URL Command Example:
[baseUrl:port]/licencemgr/rest/v1-0/licence-mgr/checksumforstring?string=

Button command Example:
string

Command Response

Http response code

Http response content