04-25-2019 02:08 PM
I am trying to create a new address group using API but I always end up getting
<response status="error" code="12">
</response>
Can someone help me with the correct xpath to create a new shared address group empty or with a list of address objects.
05-07-2019 12:44 AM
Do the operation in CLI first with the "debug cli on" command activated. This will give you the precise path you need for the API call.
10-26-2019 01:34 PM
There are two types of address groups in the Palo Alto Networks firewalls; dynamic and static. By default, the firewall creates a static address group if you do not explicitly select dynamic. Therefore, you need to add the static element at the time of address group creation. The example below shows an example of creating an address-group named "test-address-group"
[https://<firewall-ip>/api/?type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address-group/entry[@name='test-address-group']&element=<static />&key=<yourfirewall-ip-key>]
Hope this explains the mystery.
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!