cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
879
Views
5
Helpful
2
Replies

Query NSO License status via restconf API call

brett.harding
Level 1
Level 1

Hi,

I'm looking to monitor the NSO license status via an API call.

I would like to retrieve the same information we currently get from the "show license status" command.

We have tried the following API call, but it returns the smart-license configuration, rather than the operational state.

curl --location-trusted -sk -u "user:pass" -H "Content-Type: application/json" -X GET https://10.1.1.1:8080/restconf/data/tailf-ncs:smart-license

We would like to see the following data ...

nso01#show license status

Smart Licensing is ENABLED

Registration:
Status: REGISTERED
Smart Account: Private
Virtual Account: Private
Export-Controlled Functionality: Allowed
Initial Registration: SUCCEEDED on Jul 27 10:19:41 2022 AEST
Last Renewal Attempt: SUCCEEDED on Jul 27 10:19:41 2022 AEST
Next Renewal Attempt: Jan 23 11:19:41 2023 AEDT
Registration Expires: Jul 27 10:14:41 2023 AEST

License Authorization:
Status: AUTHORIZED on Jul 27 10:19:48 2022 AEST
Last Communication Attempt: SUCCEEDED on Jul 27 10:19:48 2022 AEST
Next Communication Attempt: Aug 26 10:19:48 2022 AEST
Communication Deadline: Oct 25 11:14:48 2022 AEDT

Thanks

1 Accepted Solution

Accepted Solutions

tcragg1
Cisco Employee
Cisco Employee

If you look at the tailf-ncs-smart-license.yang file, you will see there is an action defined to show Smart Licensing state. The RESTCONF call to trigger the action should be something like the following:

curl --location-trusted -sk -u "user:pass" -X POST https://10.1.1.1:8080/restconf/operations/tailf-ncs:smart-license/show

View solution in original post

2 Replies 2

tcragg1
Cisco Employee
Cisco Employee

If you look at the tailf-ncs-smart-license.yang file, you will see there is an action defined to show Smart Licensing state. The RESTCONF call to trigger the action should be something like the following:

curl --location-trusted -sk -u "user:pass" -X POST https://10.1.1.1:8080/restconf/operations/tailf-ncs:smart-license/show

brett.harding
Level 1
Level 1

Thank you, this API call returned the information we needed.

Polls
AI-powered tools for network troubleshooting are likely to be part of everyone’s workflow sooner or later. What is the single biggest challenge or concern you see with adopting these tools in your organization?