02-19-2013 11:21 AM
Our Panorama is configured to talk to multiple devices. These devices have multiple "vsys" configured. I am trying to use the Pan REST API to get a list of devices and vsys names that are in the Panorama, so a customer can choose which device and vsys the config commands can be sent to.
What API calls do I need to do to achieve this?
02-19-2013 11:51 AM
Thank you ! That helped
02-27-2013 11:22 AM
another alternative may be to use 'get' with the xpath below.
$ panxapi -t panorama -gxr /config/devices/entry/device-group/entry/devices
<devices><entry name="001606000471"/></devices><devices><entry name="0004C101452"><vsys><entry name="vsys2"/></vsys></entry></devices><devices><entry name="0004C101452"><vsys><entry name="vsys3"/></vsys></entry></devices><devices/>
09-12-2017 09:57 AM
Similarly, how can you retrieve a list of vsys names on a single firewall using the API? I know you can pull the whole /config/devices/entry/vsys tree, but that takes forever and returns a lot of extra data. I'm currently looking at pulling /config/devices/entry/vsys/entry[@name='vsysX']/display-name starting with X=1 and incrementing until I get an error, but that seems really dumb. Ideally I'd use /config/devices/entry/vsys/*/display-name but it looks like the "xpath" expressions in the API don't support wildcards.
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!