cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
1578
Views
10
Helpful
2
Replies
digiudev
Beginner

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

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
Beginner

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
Beginner

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]

Create
Recognize Your Peers
Content for Community-Ad