- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-01-2017 12:07 PM
Hi all,
In working with the PAN-OS API on v7, I have been trying to figure out the appropriate way to get all of the network objects and their associated addressesF15 recognized by my firewall.
Tried the following query but only seems to return an error code of 7, so I'm not sure if that means my query is malformed or if what I'm asking it for is the wrong request type:
Tried via Windows PowerShell:
Invoke-RestMethod -Method GET -Uri
"https://MYFIREWALL/api/?type=config&action=get&key=MYAPIKEY&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address-group"
If anyone could point me in the right direction, I would be greatly appreciative.
09-04-2017 01:58 AM
Hi @f1r3withf1r3,
This might be of help to you :
How to Export Address and Address-group Objects Using PAN-OS API:
Cheers !
-Kiwi
09-06-2017 07:53 AM
Thanks @kiwi
Based on the documentation for that perl package, looks like its instructions are for linux admins.
While this is possible in my particular case, for the sake of future Googlers, is there any guide on making that work in Windows via CygWin/PAN-Perl/Excel?
Gluing that together is not readily understandable from the page initially provided. Any pointers would be helpful.
09-06-2017 12:47 PM - edited 09-06-2017 12:51 PM
To the best of my knowledge PAN-perl is depreciated and really isn't recommended anymore, pan-python would be more of the direction most are taking, or Device Framework.
That being said if you are in a Windows envrioment I would really recommend simply learning the API before you start incorporating any of the other tools that Palo Alto and users have published for use in other languages. Knowing what the command you are issueing is actually doing on your system is something that I deam pretty essential.
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!