- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-29-2011 11:28 AM
Is the XML API on Panorama limited to the same API as the devices? I discovered if I switch the context in the Panorama web console using the "Context" dropdown and then issue an XML API call like:
https://PANORAMA/esp/restapi.esp?type=config&key=KEYVALUE&action=show
OR
https://PANORAMA/esp/restapi.esp?type=config&key=KEYVALUE&action=get
it acts exactly as if I had issued it to a device, returning that device's running or candidate configuration. Is there an XML API parameter in Panorama to switch the device context or query for multiple devices' configurations at once?
Also, is there any way to retrieve such items as the user ID agent user/group cache or the current routing table via any of the XML API calls? We would like to be able to gather this type of information from Panorama or the individual devices but preferably centralized and without logging into the CLI for each device.
10-02-2017 01:19 PM
You can, you'd just have to modify your xpath and element accordingly to match the whole configuration you're passing in. Can you provide more detail on what exactly you're trying to change?
10-02-2017 01:32 PM
According to the documentation if I want to change a single object( eg. application) the xpath will be
xpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name='rule1']/appl
ication
and element will be
element=<application><member>app-name</member></application>
But my requirement is to change multiple objects ( eg. application and action) using a single api call. Is it possible
? If yes, what will be the xpath?
10-02-2017 01:46 PM
Your xpath would look something like:
xpath=/config/devices/entry/vsys/entry/rulebase/security/rules/entry[@name='rule1']
And your element would include both configuration for application and destination, something like:
<application><member>app-name</member></application><destination><member>any</member></destination>
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!