- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-15-2021 06:01 AM
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!