Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This page refers to End-user REST API version 1 only. See End-user REST API for links to other versions of the End-user REST API.

...


To activate a license for a given, unique combination of the an activation key and a HostID using the End-user REST API version 1, use the following request:

Panel

...

PUT /licenses/(activation_key)/(hostids)

...

where request parameters are:

  • activation_key (string) (Your product is your license order activation key),

and

  • hostids (base64string) are encoded hostids.Base64 encoded values. The format of HostID(s) that you can specify is a comma-separated list of types and values; for example, ETHERNET=AABBCCDDEEFF,IPADDRESS=192.168.0.5

 (Note that request headers are used by default.)

Example request

panel
Code Block
languagejs
firstline1
linenumberstrue
PUT /rest/v1/liceneslicenses/4CT1V-4T10N-K3Y1S-C000L/dHlwZTE9dmFsdwUxLHR5cGUyPXZhbHVlPTIdHlwZTE9dmFsdWUxLHR5cGUyPXZhbHVlPTI=
HTTP/1.1
Host: license.x-formation.com
Accept: application/hal_+json

 

Response

The LAC REST API returns standard HTTP response codes as described in the following table.

Status CodeHeader FieldDescription
202 Accepted
This status code indicates that a request for a new license is created upon its successful validation. Furthermore, it indicates that the Location header field value consists of

New license request has been created after successful license validation. The Location header field contains an absolute URI for automatic redirection to this resource.

 


400 Bad Request

 

 



This status code indicates that the requested

Requested activation key is invalid or the format of a

hosid

hostid is wrong.

The response

Response body contains more

details license

detailed information about this error.

 

 


 403 Forbidden
 This status code indicates that a
License cannot be activated
according to
, because it is not in sync with the internal configuration.
The response
Response message contains more information.

Example responseresponses

panel
Code Block
languagetext
firstline1
linenumberstrue
HTTP/1.1 202 Accepted
Vary: Accept
Location: https://license.x-formation.com/rest/v1/liceneslicense-queue/4CT1V-4T10N-K3Y1S-C000L/dHlwZTE9dmFsdwUxLHR5cGUyPXZhbHVlPTI=dHlwZTE9dmFsdWUxLHR5cGUyPXZhbHVlPTI=


Code Block
languagejs
firstline1
linenumberstrue
HTTP/1.1 400 Bad Request
Content-Type: application/hal+json
 
{
    "message": "Invalid HostID format provided."
}


Code Block
languagejs
firstline1
linenumberstrue
HTTP/1.1 403 Forbidden
Content-Type: application/hal+json
 
{
    "message": "License generator was not uploaded for this product."
}

For more information about HTTP methods, see Supported HTTP methods.