- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
07-31-2020 07:23 AM
Hi All,
Any suggestions on how to get all the policies from paloalto with same name using XML api call.
In the Web interface in the search bar if we search using the Tag, we get all the policies containing the tag names. However, in api interfaces not able to find a xpath to fetch all the policies using tag name.
Thanks in Advance.
07-31-2020 03:00 PM
There's actually a ton of flexibility in XPath queries. Try this to look for all security rules containing a tag member called "blocked":
/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[tag/member='blocked']
Here's a handy cheatsheet as well: https://devhints.io/xpath
Hope this helps!
07-31-2020 03:00 PM
There's actually a ton of flexibility in XPath queries. Try this to look for all security rules containing a tag member called "blocked":
/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[tag/member='blocked']
Here's a handy cheatsheet as well: https://devhints.io/xpath
Hope this helps!
08-24-2020 02:05 PM
Unfortunately, the REST API doesn't support inline queries at this time.
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!