How to add V-Wire Subinterface via the API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

How to add V-Wire Subinterface via the API

L1 Bithead

I've tried several different variations and I can't seem to figure out the API call to add a v-wire subinterface. What would the correct syntax be? 

Here's one example that I have tried: 

https://firewall/api/?type=config&key=KEY&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/network/interface/ethernet/entry[@name='ethernet1/14']/virtual-wire/units/&element=<entry name='ethernet1/14.5501'/> 

It gives me this: 

response status="error" code="13"> 
<msg> 
<line> 
set failed, may need to override template object first 
</line> 
</msg> 
</response>

1 accepted solution

Accepted Solutions

I figured it out.  I had a / after units.  After removing that the set action worked.

 

Before:

https://firewall/api/?type=config&key=KEY&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/network/interface/ethernet/entry[@name='ethernet1/14']/virtual-wire/units/&element=<entry name='ethernet1/14.5501'/> 

 

Working:

https://firewall/api/?type=config&key=KEY&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/network/interface/ethernet/entry[@name='ethernet1/14']/virtual-wire/units&element=<entry name='ethernet1/14.5501'/> 

View solution in original post

3 REPLIES 3

L4 Transporter

The syntax is correct, but the error that you're getting is that you're overwriting something in a template pushed from Panorama, which would require action=override as opposed to action=set.

That's weird, because I don't have Panorama.  When I try action=override I get this:

 

<response status="error" code="12">
<msg>
<line>Object cannot be overridden</line>
</msg>
</response>

I figured it out.  I had a / after units.  After removing that the set action worked.

 

Before:

https://firewall/api/?type=config&key=KEY&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/network/interface/ethernet/entry[@name='ethernet1/14']/virtual-wire/units/&element=<entry name='ethernet1/14.5501'/> 

 

Working:

https://firewall/api/?type=config&key=KEY&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/network/interface/ethernet/entry[@name='ethernet1/14']/virtual-wire/units&element=<entry name='ethernet1/14.5501'/> 

  • 1 accepted solution
  • 2388 Views
  • 3 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!