- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-15-2025 12:07 AM
Hi everyone,
I’m working on automating Palo Alto firewall configuration via the API and I’ve run into a puzzling issue.
Unset the Virtual Router assigned to a specific Layer3 Ethernet interface (e.g., ae2.4008
) using the API.
Manually, I can easily go to the GUI and set the Virtual Router to none, and everything works as expected.
I’m using the API key method to authenticate and tried a simple API call like this:
https://<firewall>/api/?type=config&action=set&key=<api-key>&xpath=/config/devices/entry[@name='localhost.localdomain']/network/interface/ethernet/entry[@name='ae2.4008']/layer3&element=<virtual-router>none</virtual-router>
Every time I call the API, I get this error:
<response status="error" code="13"> <msg><line>set failed, may need to override template object first</line></msg> </response>
I also tried:
Adding override=yes
Different variations of the XML structure
Setting the whole layer3 block explicitly
But nothing worked.
No templates are configured in the firewall (verified manually via GUI).
XPath appears correct and points to the right element.
No schema issues or typos.
Manual configuration works flawlessly without warnings.
Why does the direct API set
call always return a “template object override” error, even when no template exists?
Is this a known limitation or bug in the PAN-OS API?
Am I missing some special hidden configuration layer preventing direct API edits?
Is the export-modify-import approach the only recommended way to handle this type of config change via automation?
I’d greatly appreciate insights, experiences, or best practices if you’ve faced something similar.
Thanks in advance!
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!