- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Content translations are temporarily unavailable due to site maintenance. We apologize for any inconvenience. Visit our blog to learn more.
02-14-2018 08:31 AM - edited 02-14-2018 08:43 AM
Hi all
I wonder can anyone offer some insight, I am trying to write a script to update all of the panorama server settings on a given list of firewalls. That's all fine but I am having an issue with the actual rest api -
I used debug CLI output to determine the syntax in order to build the command and it looks right according to the guides I've read, however it doesnt' work. I am testing against a local VM running 7.1.
To test I am trying - (I've replaced my key below with key_removed and the IP addresses with x.x.x.x)
https://x.x.x.x/api/type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system<panorama-server>x.x.x.x</panorama-server><panorama-server-2>x.x.x.x</panorama-server-2>&key=key_removed
It fails with the following -
<response status="error" code="13"> <msg> <line> Could not find schema node for xpath /config/devices/entry[@name='localhost.localdomain']/deviceconfig/system <panorama-server>x.x.x.x</panorama-server> <panorama-server-2>x.x.x.x</panorama-server-2> </line> </msg> </response>
02-14-2018 08:53 AM - edited 02-14-2018 10:15 AM
Nevermind I found the issue, I needed to add &element= as per below -
https://x.x.x.x/api/type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&element=<panorama-server>x.x.x.x</panorama-server><panorama-server-2>x.x.x.x</panorama-server-2>&key=key_removed
Hope this helps somebody else.
Regards
James
02-14-2018 08:53 AM - edited 02-14-2018 10:15 AM
Nevermind I found the issue, I needed to add &element= as per below -
https://x.x.x.x/api/type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system&element=<panorama-server>x.x.x.x</panorama-server><panorama-server-2>x.x.x.x</panorama-server-2>&key=key_removed
Hope this helps somebody else.
Regards
James
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!