- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
04-21-2023 02:14 AM
Hello,
If I try to get all the running security policy via an API call https://FW/api/?type=op&cmd=<show><running><security-policy></security-policy></running></show>
it works, but I can only get around 1900 policies. All the rest is not shown. Is there any "start-at" of offset, pagging, or anything to be able to get the full security policy config?
Thanks
04-21-2023 05:42 AM
Hi @kremiq, I tried to replicate this but was unable to. I created 2000 policies on a PA-3220, and both the following commands retrieved all the rules:
https://{{host}}/api/?key={{key}}&type=op&cmd=<show><running><security-policy/></running></show>
https://{{host}}/api?key={{key}}&type=config&action=show&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules
You could try the second, as the first is the one you already tried. Failing that, the XML API is a part of the product, so is TAC supported, so you can raise a case to investigate further why you are only getting partial results.
Hope that helps
04-21-2023 07:07 AM
The second API call works, but this is not giving the output I am looking for. The issue is, you get the config with to objects names, they are not already replaced by the actual values.
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!