cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1952
Views
10
Helpful
2
Replies

[Resolved] ELM - AXL API : Getting Licenses Available and installed

digiudev
Level 1
Level 1

Hi,

Is there a way to retrieve the license statistics available and installed?

I tried to recover them through the AXL API made available by cisco but without success.

I retrieve the license number through the following query

SELECT name,value FROM TABLE( FUNCTION LicenseTotals() )

(pkid,name,value,UserValue,DeviceValue)


but I can not recover the number of installed licenses, the number of available licenses and the state of licenses as shown in the administration panel of the Enterprise License Manager.

Thanks in advance

1 Accepted Solution

Accepted Solutions

binli
Level 1
Level 1

Hi Andrea

Just worked it out to a nodejs script to get the stats from api. Ping me via spark if any problem.

var request = require("request");


var options = { method: 'GET',

  url: 'https://xxx.xxx.xxx.xxx/elm-resources/license/status',

  headers:

   {

     'cache-control': 'no-cache',

     authorization: 'Basic [Your username:password in base64 string]' } };


process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

request(options, function (error, response, body) {

  if (error) throw new Error(error);


  console.log(body);

});

View solution in original post

2 Replies 2

binli
Level 1
Level 1

Hi Andrea

Just worked it out to a nodejs script to get the stats from api. Ping me via spark if any problem.

var request = require("request");


var options = { method: 'GET',

  url: 'https://xxx.xxx.xxx.xxx/elm-resources/license/status',

  headers:

   {

     'cache-control': 'no-cache',

     authorization: 'Basic [Your username:password in base64 string]' } };


process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

request(options, function (error, response, body) {

  if (error) throw new Error(error);


  console.log(body);

});

Thank you very much Bin, it works.
It was necessary enable Cisco Prime LM Resource Legacy API and Cisco Prime LM Resource API on the device

https://www.cisco.com/c/en/us/support/docs/cloud-systems-management/hosted-collaboration-mediation/200649-Troubleshooting-Issues-while-Adding-New.html

The PLM API services must be activeted in order to fix the issue.
Run the following commands from PLM CLI.

admin:utils service activate Cisco Prime LM Resource API
Service Manager is running
Cisco Prime LM Resource API[STARTED]


admin:utils service activate Cisco Prime LM Resource Legacy API
Service Manager is running
Cisco Prime LM Resource Legacy API[STARTED]

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: