cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Who rated this post

L5 Sessionator

Hi @Steven_Lowry,

 

First an FYI, pan-os-python is the successor to pan-python, and is your best resource for your Python work: https://github.com/PaloAltoNetworks/pan-os-python

 

You can call the API directly, targeting Panorama or an NGFW, to get that device's master key details:

https://{{host}}/api/?key={{key}}&type=op&cmd=<show><system><masterkey-properties/></system></show>

 

You can also target Panorama to get a managed NGFW's master key details, if you can't or don't want to target the NGFW directly:

https://{{host}}/api/?key={{key}}&type=op&cmd=<show><system><masterkey-properties/></system></show>&target={{ngfw-serial-number}}

 

Both the API calls above are examples of "op" (operational) commands. Within pan-os-python, op commands can be executed from the base module: https://pan-os-python.readthedocs.io/en/latest/module-base.html#panos.base.PanDevice.op

 

Hope this helps!

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

View solution in original post

Who rated this post