Request license fetch thru API call on all pan devices

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Request license fetch thru API call on all pan devices

L0 Member

we have 200+ pan devices and we recently renewed licenses and now we have to login to each device and click on "retrieve license keys from license  server" so i want to automate these using API call,

I looked into debug clii on, i see below request.

 

pan> request license fetch
(container-tag: license container-tag: fetch pop-tag: pop-tag:)
((eol-matched: . #t) (context-inserted-at-end-p: . #f))


<request cmd="op" cookie="8611074432980743" uid="504"><operations><request><license><fetch/></license></request></operations></request>

 

License entry:
Feature: Device Management License
Description: VM Panorama license to manage up to 25 devices
Serial: XXXXX
Issued: XXXXX
Expires: Never
Expired?: no

</result></response>



now i took above request and running from postman api scripts,

https://{{firewall  ip}}//api?key={{key}}&type=op&cmd=<request><license><fetch/></license></request>

 

after this command is run, i looked into api debug but i noticed pan is executing "request license info" instead "request license fetch"

any faced same issue? if so how to fix this ??

 

========= RemoteCall: DeviceDirect.getLicensesList =========
[2020/04/15 10:47:39] user=XXXXXXX
<request cmd="op" cookie="XXXXXXX">
  <operations xml="yes">
    <request>
      <license>
        <info/>
      </license>
    </request>
  </operations>
</request>

 

 

3 REPLIES 3

L5 Sessionator

If you're sending <request><license><fetch/></license></request> it seems impossible that it's executing <request><license><info/></license></request>.  However, when you do fetch licenses, the XML returned is what you'd get back from running request license info...?

@gfreeman 

if you see both commands gave same output but as per my understanding backend operation for these commands does vary right ?

 

when we do "fetch" pan will retrieve the license from PAN portal os PAN licenses server.(same like clicking on PAN web UI - under Device->licenses->license management->retrieve license keys from license server )

when we do "info" pan will give you the out of licenses status on pan device.

 

pan> request license info
(container-tag: license container-tag: info pop-tag: pop-tag:)
((eol-matched: . #t) (context-inserted-at-end-p: . #f))

<request cmd="op" cookie="xxxxxx" uid="504"><operations><request><license><info/></license></request></operations></request>

2020-05-01 09:46:38
<response status="success"><result>Current GMT Date: May 01, 2020

License entry:
Feature: Device Management License
Description: xxxxxxxx
Serial: xxxxxx
Issued: xxxxxx
Expires: xxxxxxx
Expired?: xxxxxxx

</result></response>

Current GMT Date: May 01, 2020

License entry:
Feature: Device Management License
Description: xxxxxxxx
Serial: xxxxxx
Issued: xxxxxx
Expires: xxxxxxx
Expired?: xxxxxxx
pan> request license fetch
(container-tag: license container-tag: fetch pop-tag: pop-tag:)
((eol-matched: . #t) (context-inserted-at-end-p: . #f))

<request cmd="op" cookie="xxxxxx" uid="504"><operations><request><license><fetch/></license></request></operations></request>

2020-05-01 09:46:31
<response status="success"><result>Current GMT Date: May 01, 2020

License entry:
Feature: Device Management License
Description: xxxxxxxxx
Serial: xxxxxxx
Issued: xxxxxxx
Expires: xxxxxx
Expired?: xxxxxx

</result></response>

Current GMT Date: May 01, 2020

License entry:
Feature: Device Management License
Description: xxxxxxx
Serial: xxxxxx
Issued: xxxxxx
Expires: xxxxxx
Expired?: xxxxx

 

Do you have Panorama?  You can do this via Panorama: Device Deployment: Licenses: Refresh.  Clicking Refresh will present a dialogue similar to the commit dialogue when pushing policies/templates to your firewalls.  Just select them all and click the Refresh button in the dialogue box.  The result should be a refresh of all of your licenses. 

 

-Mike

  • 4493 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!