RESTAPI Manual
Interfaces and Ports
Logical Interface
45 min
urls summary urls summary url get post patch put delete /rest/v1/rpc/clear counters interface n y n n n /rest/v1/rpc/clear counters rif n y n n n /rest/v1/rpc/clear router interface n y n n n /rest/v1/rpc/clear vlan membership n y n n n /rest/v1/running/interfaces/{name} y n y n y /rest/v1/running/interfaces/{name}/ipv4 y y y n y /rest/v1/running/interfaces/{name}/ipv4/address/{ip prefix} y y n n y /rest/v1/running/interfaces/{name}/ipv6 y y y n y /rest/v1/running/interfaces/{name}/ipv6/address/{ip prefix} y y n n y /rest/v1/running/interfaces/{name}/statistics y n n n n /rest/v1/rpc/show counters interface n y n n n /rest/v1/rpc/show counters router interface n y n n n /rest/v1/rpc/show interface n y n n n /rest/v1/rpc/show interface description n y n n n /rest/v1/rpc/show interface errdown n y n n n /rest/v1/rpc/show interface startup delay n y n n n /rest/v1/rpc/show interface summary n y n n n /rest/v1/rpc/show ip interface n y n n n /rest/v1/rpc/show ipv6 interface n y n n n /rest/v1/rpc/show sub interface n y n n n examples examples clear router interface clear router interface post https //{switch ip}/rest/v1/rpc/clear router interface { "interface" "ethernet1" } clear vlan members for interface clear vlan members for interface post https //{switch ip}/rest/v1/rpc/clear vlan membership { "interface" "ethernet1" } get interface statistics get interface statistics get https //{switch ip}/rest/v1/running/interfaces/{name}/statistics get counters of interface get counters of interface post https //{switch ip}/rest/v1/rpc/show counters interface { "name" "ethernet1" } get counters of router interface get counters of router interface post https //{switch ip}/rest/v1/rpc/show counters router interface { "name" "vlan200" } get interface summary get interface summary post https //{switch ip}/rest/v1/rpc/show interface summary get interface get interface post https //{switch ip}/rest/v1/rpc/show interface { "interface" "ethernet0" } get sub interface get sub interface post https //{switch ip}/rest/v1/rpc/show sub interface { "interface" "et1 100" } get interface error down get interface error down post https //{switch ip}/rest/v1/rpc/show interface errdown {} get interface description get interface description post https //{switch ip}/rest/v1/rpc/show interface description {} get interface startup delay get interface startup delay post https //{switch ip}/rest/v1/rpc/show interface startup delay {} get interface ip address get interface ip address post https //{switch ip}/rest/v1/rpc/show ip interface {} get interface ipv6 address get interface ipv6 address post https //{switch ip}/rest/v1/rpc/show ipv6 interface {} get all interfaces information get all interfaces information get https //{switch ip}/rest/v1/running/interfaces modify an ethernet interface modify an ethernet interface patch https //{switch ip}/rest/v1/running/interfaces/ethernet1 { "mtu" 1510, "mac address" "00 11 22 33 44 55" } delete a loopback interface delete a loopback interface delete https //{switch ip}/rest/v1/running/interfaces/loopback100 create ipv4 address for interface create ipv4 address for interface post https //{switch ip}/rest/v1/running/interfaces/ethernet1/ipv4 { "address" \[ {"ip prefix" "192 168 100 100/20"} ] } delete ipv4 address from interface delete ipv4 address from interface detele rest/v1/running/interfaces/ethernet2/ipv4/address/20 1 1 2%2f20 create an ipv6 address for interface create an ipv6 address for interface post https //{switch ip}/rest/v1/running/interfaces/vlan2345/ipv6/address { "ip prefix" "fec0 1234/64" } properties descriptions properties descriptions interfaces configurable fields interfaces configurable fields tree diagrams + rw interfaces + rw interface \[name] + rw name + rw description? + rw admin status? + rw interface mode? + ro oper status? + rw mac address? + rw mac address learning? + rw mtu? + rw vrf? + rw nat zone? + rw ipv4 \| + rw address \[ip prefix] \| | + rw ip prefix \| | + rw secondary? + rw ipv6 \| + rw address \[ip prefix] \| | + rw ip prefix \| | + rw secondary? + rw ipv6 link local? + rw ndp proxy? + rw pbr policy? table of properties name required type/range description interfaces m path only node, has no configurable value interface parameters name m ethernet name ethernet sub interface name portchannel0000 9999 portchannel sub interface name loopback0 199 vlan1 4094 (sub property of interfaces) the name of the interface description co string within 255 characters (sub property of interfaces) only applicable when name is a ethernet,ethernet sub interface,portchannel,portchannel sub interface name a textual description of the interface admin status o "true" "false" (sub property of interfaces) this leaf contains the configured, desired state of the interface default value "true" interface mode co "routed" "trunk" "none" (sub property of interfaces) only applicable when name is a ethernet,portchannel,vlan name set the interface to access, trunk, none mode vlan and ip interface configuration may be automatically deleted after changing this field oper status ro "true" "false" (sub property of interfaces) the current operational state of the interface mac address co a\ b c\ d e\ f (sub property of interfaces) only applicable when name is a ethernet,ethernet sub interface,portchannel,portchannel sub interface,vlan name the interface's address at its protocol sub layer for example, for an 802 x interface, this object normally contains a media access control (mac) address the interface's media specific modules must define the bit and byte ordering and the format of the value of this object for interfaces that do not have such an address (e g , a serial line), this node is not present mac address learning co "true" "false" (sub property of interfaces) only applicable when name is a ethernet,portchannel name set interface mac address learning, only support for vlan and its members when an interface is configured as a vlan member, mac address learning is automatically enabled default value "false" mtu co 1312 9216 (sub property of interfaces) only applicable when name is a ethernet,ethernet sub interface,portchannel,portchannel sub interface,vlan name set the max transmission unit size in octets for the physical interface if this is not set, the mtu is set to the operational default default value 9216 vrf o "default" vrf name (sub property of interfaces) set interface vrf nat zone o 0 1 (sub property of interfaces) set interface nat zone (0 1) default value 0 ipv4 m (sub property of interfaces) path only node, has no configurable value parameters for the ipv4 address family address m (sub property of ipv4) path only node, has no configurable value the list of ipv4 addresses on the interface ip prefix m a b c d/m (sub property of address) secondary co "true" "false" (sub property of address) only applicable when name is a ethernet,ethernet sub interface,portchannel,portchannel sub interface,vlan name set secondary ipv6 address for interface must set primary ipv6 address in the same network first default value "false" ipv6 m (sub property of interfaces) path only node, has no configurable value parameters for the ipv6 address family address m (sub property of ipv6) path only node, has no configurable value the list of ipv6 addresses on the interface ip prefix m xx\ xx\ xx\ xx\ xx\ xx\ xx\ xx/m (sub property of address) secondary co "true" "false" (sub property of address) only applicable when name is a ethernet,ethernet sub interface,portchannel,portchannel sub interface,vlan name set secondary ipv6 address for interface must set primary ipv6 address in the same network first default value "false" ipv6 link local co "true" "false" (sub property of interfaces) only applicable when name is a ethernet,ethernet sub interface,portchannel,portchannel sub interface,vlan name set ipv6 use link local when an ipv6 address is configured on the interface, ipv6 link local is automatically enabled default value "false" ndp proxy co "true" "false" (sub property of interfaces) only applicable when name is a ethernet,portchannel,vlan name set interface ndp proxy default value "false" pbr policy co string (sub property of interfaces) only applicable when name is a ethernet,portchannel name name of the pbr map to apply only support in ethernet and portchannel, not support sub interface interfaces read only fields interfaces read only fields tree diagrams + rw interfaces + rw interface \[name] + rw name + ro statistics + ro in octets? + ro in unicast pkts? + ro in broadcast pkts? + ro in multicast pkts? + ro in discards? + ro in errors? + ro out octets? + ro out unicast pkts? + ro out broadcast pkts? + ro out multicast pkts? + ro out discards? + ro out errors? table of properties name required type/range description interfaces m path only node, has no configurable value interface parameters name m ethernet name ethernet sub interface name portchannel name portchannel sub interface name vlan name loopback name (sub property of interfaces) the name of the interface statistics ro (sub property of interfaces) path only node, has no configurable value a collection of interface related statistics objects in octets ro yang\ counter64 (sub property of interfaces) the total number of octets received on the interface, including framing characters discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" in unicast pkts ro yang\ counter64 (sub property of interfaces) the number of packets, delivered by this sub layer to a higher (sub )layer, that were not addressed to a multicast or broadcast address at this sub layer discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" in broadcast pkts ro yang\ counter64 (sub property of interfaces) the number of packets, delivered by this sub layer to a higher (sub )layer, that were addressed to a broadcast address at this sub layer discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" in multicast pkts ro yang\ counter64 (sub property of interfaces) the number of packets, delivered by this sub layer to a higher (sub )layer, that were addressed to a multicast address at this sub layer for a mac layer protocol, this includes both group and functional addresses discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" in discards ro yang\ counter64 (sub property of interfaces) the number of inbound packets that were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher layer protocol one possible reason for discarding such a packet could be to free up buffer space discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" in errors ro yang\ counter64 (sub property of interfaces) for packet oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher layer protocol for character oriented or fixed length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher layer protocol discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" out octets ro yang\ counter64 (sub property of interfaces) the total number of octets transmitted out of the interface, including framing characters discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" out unicast pkts ro yang\ counter64 (sub property of interfaces) the total number of packets that higher level protocols requested be transmitted and that were not addressed to a multicast or broadcast address at this sub layer, including those that were discarded or not sent discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" out broadcast pkts ro yang\ counter64 (sub property of interfaces) the total number of packets that higher level protocols requested be transmitted and that were addressed to a broadcast address at this sub layer, including those that were discarded or not sent discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" out multicast pkts ro yang\ counter64 (sub property of interfaces) the total number of packets that higher level protocols requested be transmitted and that were addressed to a multicast address at this sub layer, including those that were discarded or not sent for a mac layer protocol, this includes both group and functional addresses discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" out discards ro yang\ counter64 (sub property of interfaces) the number of outbound packets that were chosen to be discarded even though no errors had been detected to prevent their being transmitted one possible reason for discarding such a packet could be to free up buffer space discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" out errors ro yang\ counter64 (sub property of interfaces) for packet oriented interfaces, the number of outbound packets that could not be transmitted because of errors for character oriented or fixed length interfaces, the number of outbound transmission units that could not be transmitted because of errors discontinuities in the value of this counter can occur at re initialization of the management system and at other times as indicated by the value of "discontinuity time" clear counters interface clear counters interface tree diagrams + x clear counters interface \| + ro output \| + ro data? table of properties n ame ame required required type/range type/range description description clear counters interface m path only node, has no configurable value rpc for clearing interface counters data ro string (sub property of output) the result of clear counters interface clear counters router interface clear counters router interface tree diagrams + x clear counters rif \| + ro output \| + ro data? table of properties name required type/range description clear counters rif m path only node, has no configurable value rpc for clearing router interface counters data ro string (sub property of output) the result of clear counters router interface show counters interface show counters interface tree diagrams + x show counters interface \| + w input \| | + w name? \| | + w errors only? \| | + w rates only? \| | + w raw stats? \| | + w period? \| | + w all? \| | + w detail? \| | + w json? \| + ro output \| + ro result? table of properties name required type/range description show counters interface m path only node, has no configurable value rpc for showing interface counters name o ethernet name (sub property of input) the name of the interface errors only o "true" "false" (sub property of input) display interface errors rates only o "true" "false" (sub property of input) display interface rates raw stats o "true" "false" (sub property of input) raw stats (unmodified output of netstat) period o 0 100 (sub property of input) display stats over a specified period (in seconds), default=0 all o "true" "false" (sub property of input) display all the stats counters detail o "true" "false" (sub property of input) display detailed statistics json o "true" "false" (sub property of input) display in json format result ro string (sub property of output) a table that shows counter of router interface show counters router interface show counters router interface tree diagrams + x show counters router interface \| + w input \| | + w name? \| | + w period? \| | + w json? \| + ro output \| + ro result? table of properties name required type/range description show counters router interface m path only node, has no configurable value rpc for showing router interface counters name o ethernet name ethernet sub interface name portchannel name portchannel sub interface name vlan name (sub property of input) the name of the router interface period o 0 100 (sub property of input) display stats over a specified period (in seconds), default=0 json o "true" "false" (sub property of input) display in json format result ro string (sub property of output) a table that shows counter of router interface clear vlan membership for interface clear vlan membership for interface tree diagrams + x clear vlan membership \| + w input \| + w interface table of properties name required type/range description clear vlan membership m path only node, has no configurable value clear vlan membership of an ethernet port or link aggregation group return an error if the interface is a router interface interface m string (sub property of input) the name of the interface clear router interface clear router interface tree diagrams + x clear router interface \| + w input \| + w interface table of properties name required type/range description clear router interface m path only node, has no configurable value clear router interface of an ethernet port or link aggregation group return an error if the interface is a vlan trunk port interface m string (sub property of input) the name of the interface show interface summary show interface summary tree diagrams + x show interface summary \| + ro output \| + ro result? \| + ro result? table of properties name required type/range description show interface summary m path only node, has no configurable value result ro string (sub property of output) a table that shows information of all interface show interface detail information show interface detail information tree diagrams + x show interface \| + w input \| | + w interface \| + ro output \| + ro result? table of properties name required type/range description show interface m path only node, has no configurable value interface m ethernet name portchannel name (sub property of input) the name of the ethernet or portchannel interface result ro string (sub property of output) a table that shows information of ethernet interface show sub interface show sub interface tree diagrams + x show sub interface \| + w input \| | + w interface? \| + ro output \| + ro result? table of properties name required type/range description show sub interface m path only node, has no configurable value interface o ethernet sub interface name portchannel sub interface name (sub property of input) the name of the ethernet or portchannel sub interface result ro string (sub property of output) a table that shows information of ethernet interface c show interface error down show interface error down tree diagrams + x show interface errdown \| + ro output \| + ro result? table of properties name required type/range description show interface errdown m path only node, has no configurable value result ro string (sub property of output) show errdown information of interfaces show interface description show interface description tree diagrams + x show interface description \| + ro output \| + ro result? table of properties name required type/range description show interface description m path only node, has no configurable value result ro string (sub property of output) show description of interfaces show interface startup delay show interface startup delay tree diagrams + x show interface startup delay \| + ro output \| + ro result? table of properties name required type/range description show interface startup delay m path only node, has no configurable value result ro string (sub property of output) show startup delay information of interfaces show interface ipv4 address show interface ipv4 address tree diagrams + x show ip interface \| + ro output \| + ro result? table of properties name required type/range description show ip interface m path only node, has no configurable value result ro string (sub property of output) a table that shows information of all interface with ipv4 address show interface ipv6 address show interface ipv6 address tree diagrams + x show ipv6 interface + ro output + ro result? table of properties name required type/range description show ipv6 interface m path only node, has no configurable value result ro string (sub property of output) a table that shows information of all interface with ipv6 address
