Licensing

Licenses

List licenses

List and describe the licenses that have been installed on this controller.

Sample request 

List all licenses

GET /sdn/v2.0/licenses

There is no request body for this API.

Sample response 

{
   "licenses":[
      {
         "install_id":1234567,
         "serial_no":10,
         "license_metric":"Controller Node",
         "product":"HP VAN SDN Ctrl Base",
         "metric_qty":50,
         "license_type":"DEMO",
         "base_license":true,
         "creation_date":"2013-06-25T23:51:09.826Z",
         "activated_date":"2013-06-22T23:51:09.826Z",
         "expiry_date":"2023-06-25T23:51:09.826Z",
         "license_status":"INACTIVE",
         "deactivated_key":"SAMPLE_LICENSE_KEY"
      },
      {
         "install_id":1234567,
         "serial_no":10,
         "license_metric":"Controller Node",
         "product":"HP VAN SDN Ctrl Base",
         "metric_qty":50,
         "license_type":"DEMO",
         "base_license":true,
         "creation_date":"2013-06-25T23:51:09.826Z",
         "activated_date":"2013-06-22T23:51:09.826Z",
         "expiry_date":"2023-06-25T23:51:09.826Z",
         "license_status":"INACTIVE",
         "deactivated_key":"SAMPLE_LICENSE_KEY"
      }
   ]
}

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Service Unavailable (503)

Get a license

Get the description for a specific license by key.

Sample request 

Get a license by given key:

GET /sdn/v2.0/licenses?key="CYIBMJJIHJQA6-IRTEQ2QUNBYCA-CSSDJIEIJFKIQ-VAI2QUJBYC42A"

There is no request body for this API.

Sample response 

{
   "license":{
      "install_id":1234567,
      "serial_no":10,
      "license_metric":"Controller Node",
      "product":"HP VAN SDN Ctrl Base",
      "metric_qty":50,
      "license_type":"DEMO",
      "base_license":true,
      "creation_date":"2013-06-25T23:51:09.826Z",
      "activated_date":"2013-06-22T23:51:09.826Z",
      "expiry_date":"2023-06-25T23:51:09.826Z",
      "license_status":"INACTIVE",
      "deactivated_key":"SAMPLE_LICENSE_KEY"
   }
}

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Bad Method (405), Service Unavailable (503)

Add a license

Add a license to the controller for use with the controller or application(s).

Sample request 

Add a new license:

POST /sdn/v2.0/licenses

Request data is a string i.e. an actual license key something like "CYIBMJJIHJQA6-IRTEQ2QUNBYCA-CSSDJIEIJFKIQ-VAI2QUJBYC42A"

Sample response 

{
   "license":{
      "install_id":1234567,
      "serial_no":10,
      "license_metric":"Controller Node",
      "product":"HP VAN SDN Ctrl Base",
      "metric_qty":50,
      "license_type":"DEMO",
      "base_license":true,
      "creation_date":"2013-06-25T23:51:09.826Z",
      "activated_date":"2013-06-22T23:51:09.826Z",
      "expiry_date":"2023-06-25T23:51:09.826Z",
      "license_status":"INACTIVE",
      "deactivated_key":"SAMPLE_LICENSE_KEY"
   }
}

Response codes 

  • Normal: OK (200)

  • Error: Bad Request (400), Unauthorized (401), Not Found (404), Bad Method (405), Service Unavailable (503)

Installid

Get the install id

Get the install id of a specific controller instance for use with licensing or identification.

Sample request 

GET /sdn/v2.0/licenses/installid

There is no request body for this API.

Sample response 

A mere string will be returned e.g. 12345678

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Bad Method (405), Service Unavailable (503)

Get a license

Get a license by serial number

Get a licence and its information by the associated serial number.

Sample request 

Get a license by given serial number:

GET /sdn/v2.0/licenses/10

There is no request body for this API.

Sample response 

{
   "license":{
      "install_id":1234567,
      "serial_no":10,
      "license_metric":"Controller Node",
      "product":"HP VAN SDN Ctrl Base",
      "metric_qty":50,
      "license_type":"DEMO",
      "base_license":true,
      "creation_date":"2013-06-25T23:51:09.826Z",
      "activated_date":"2013-06-22T23:51:09.826Z",
      "expiry_date":"2023-06-25T23:51:09.826Z",
      "license_status":"INACTIVE",
      "deactivated_key":"SAMPLE_LICENSE_KEY"
   }
}

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Bad Method (405), Service Unavailable (503)

Licenses/{sno}/action

Deactivate a license

Set a license to deactivated status, disabling the license to be used.

Sample request 

Deactivate a license by given serial number:

POST /sdn/v2.0/licenses/10/action

Request body will be:

deactivate

Sample response 

 {
   "license":{
      "install_id":1234567,
      "serial_no":10,
      "license_metric":"Controller Node",
      "product":"HP VAN SDN Ctrl Base",
      "metric_qty":50,
      "license_type":"DEMO",
      "base_license":true,
      "creation_date":"2013-06-25T23:51:09.826Z",
      "activated_date":"2013-06-22T23:51:09.826Z",
      "expiry_date":"2023-06-25T23:51:09.826Z",
      "license_status":"INACTIVE",
      "deactivated_key":"SAMPLE_LICENSE_KEY"
   }
}

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Bad Method (405), Service Unavailable (503)

Check if a product is licensed or not

Sample request 

Check if a product is licensed or not:

GET /sdn/v2.0/licenses/islicensed?product_id=1

There is no request body for this API.

Sample response 

Either true or false will be returned.

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Bad Method (405), Service Unavailable (503)

Get license compliance level (0 to 1) for a product id and a metric id

Sample request 

Check if a product is licensed or not:

GET /sdn/v2.0/licenses/compliance?product_id=1&metric_id=1

There is no request body for this API.

Sample response 

A value between 0 and 1 will be returned.

Response codes 

  • Normal: OK (200)

  • Error: Unauthorized (401), Not Found (404), Bad Method (405), Service Unavailable (503)