- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
07-05-2022 02:36 AM
API query from panorama to get IPsec tunnel data
tried the following queries:
http(s)://hostname/api/?type=op&cmd=<show><running><tunnel><flow><all></all></flow></tunnel></running></show>&key=<generated-key>
https://IP//restapi/v10.0/Network/IPSecTunnels
https://IP/api/?type=op&cmd=<show><vpn><flow></flow></vpn></show>
but not getting proper response:
<response status="error" code="17">
<msg>
<line>
<![CDATA[ show -> running is unexpected ]]>
</line>
</msg>
</response>
07-05-2022 06:34 PM
While I'm not around a Panorama instance at the moment to verify, have you used the XML-API browser to verify that you actually have the format setup properly? I don't believe that what you are trying to do falls under show running at all. The reason your first command is failing is because the command isn't available.
If you're just looking for flow information the following is the only thing you need, toss your &key=<key> on the end to authenticate and you should get what you're looking for do you not? That would work on a firewall, but I'm not 100% positive without verifying on a Panorama instance.
/api/?type=op&cmd=<show><vpn><flow></flow></vpn></show>
07-06-2022 06:46 AM
Hi @ieng_netops ,
I would agree with @BPry - VPN tunnel status is not available on the Panorama, you need to get this information from the firewall.
07-12-2022 12:15 PM
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!