- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
08-26-2021 08:04 AM - edited 08-26-2021 10:13 AM
I'm trying to disable via the XML API a IPSEC tunnel on a firewall which was configured using Panorama. I can manage to disable a locally created tunnel with the following GET request:
https://CENSORED/api/?key=CENSORED&type=config&action=edit&xpath=/config/devices/entry[@name='localhost.localdomain']/network/tunnel/ipsec/entry[@name='CENSORED']/disabled&element=<disabled>yes</disabled>
<response status="error" code="12">
<msg>
<line>Object cannot be overridden </line>
</msg>
</response>
According to the documentation, error code 12 means an invalid xpath or element. I dont think this is accurate considering that the xpath and element work fine when the action is edit. And the message doesnt make sense considering that I can override this object via the web UI. Is anyone here familiar with doing overrides via the XML API and know what i'm doing wrong?
And if I use the debug cli on on command and create an override via the CLI, it tells me XML request is
<request cmd="override" obj="/config/devices/entry[@name='localhost.localdomain']/network/tunnel/ipsec/entry[@name='Azure-DR']" cookie="9297669682826545"></request>
According to this KB article, the GET request should be
https://CENSORED/api/?key=CENSORED&type=config&action=override&xpath=/config/devices/entry[@name='localhost.localdomain']/network/tunnel/ipsec/entry[@name='CENSORED']&element=
But that gives me the error:
<response status="error" code="400">
<result>
<msg>Missing value for parameter "element".</msg>
</result>
</response>
If I remove the element parameter it gives me the same error, and any value I specify for the element parameter gives me the error :
<response status="error" code="12">
<msg>
<line>Request doesn't have an object to be added</line>
</msg>
</response>
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!