Published On: August 5ᵗʰ, 2019 19:12

API Reference for Cisco Enterprise Network Function Virtualization Infrastructure Software

Table 1. Interface Stat APIs

Action

Method

Payload Required

API

To display the status of all interfaces or of a specific interface

GET

No

/api/operational/switch/interface/status/gigabitEthernet/\"1/0\"

To display traffic seen by all the physical interfaces or by a specific interface

GET

No

/api/operational/switch/interface/counters/gigabitEthernet/\"1/0\"

To display RMON Ethernet statistics

GET

No

/api/operational/switch/interface/rmon/gigabitEthernet/\"1/0\"

To display information about the inline power for all interfaces or for a specific interface

GET

No

/api/operational/switch/interface/inline-status/gigabitEthernet/\"1/0\"

To display the administrative and operational status of all interfaces or a specific interface.

GET

No

/api/operational/switch/interface/switchPort/gigabitEthernet/\"1/0\"

To display the configuration for all configured interfaces

GET

No

/api/running/switch/interface/gigabitEthernet

To display the configuration for a specific interface

GET

No

/api/running/switch/interface/gigabitEthernet/\"1/0\"

To configure the speed of a given Ethernet interface when not using auto-negotiation

PATCH

Yes

/api/running/switch/interface/gigabitEthernet

Example for Interface Stat APIs Payload

<gigabitEthernet><name>1/0</name><speed>1000</speed></gigabitEthernet>

Example: GET Interface Stat APIs

curl -k -u admin:admin -X GET https://172.25.212.178/api/operational/switch/interface/status/gigabitEthernet/\"1/0\"

Example: GET Interface Stat APIs

curl -k -u admin:admin -X GET https://172.25.212.178/api/operational/switch/interface/counters/gigabitEthernet/\"1/0\"

Example: GET Interface Stat APIs

curl -k -u admin:admin -X GET https://172.25.212.178/api/operational/switch/interface/rmon/gigabitEthernet/\"1/0\"

Example: GET Interface Stat APIs

curl -k -u admin:admin -X GET https://172.25.212.178/api/operational/switch/interface/inline-status/gigabitEthernet/\"1/0\"

Example: GET Interface Stat APIs

curl -k -u admin:admin -X GET https://172.25.212.178/api/operational/switch/interface/switchPort/gigabitEthernet/\"1/0\"

Example: GET Interface Stat APIs

curl -i -k -u admin:admin -X GET https://209.165.201.1/api/running/switch/interface/gigabitEthernet -H "Accept: application/vnd.yang.collection+xml"

Example: GET Interface Stat APIs

curl -k -u admin:admin -X GET http://209.165.201.1/api/running/switch/interface?deep

Example: GET Interface Stat APIs

curl -k -u admin:admin -X GET https://209.165.201.1/api/running/switch/interface/gigabitEthernet/\"1/0\"

Example: PATCH Interface Stat APIs

curl -k -u admin:admin -d "<gigabitEthernet><name>1/0</name><speed>1000</speed></gigabitEthernet>" -X PATCH https://209.165.201.1/api/running/switch/interface/gigabitEthernet -H "Content-Type: application/vnd.yang.data+xml"

Interface Port APIs

Table 2. Interface Port APIs

Action

Method

Payload Required

API

To delete the interface speed configuration

DELETE

No

/api/running/switch/interface/gigabitEthernet/speed

To disable an interface

PATCH

Yes

/api/running/switch/interface/gigabitEthernet

To restart a disabled interface

DELETE

No

/api/running/switch/interface/gigabitEthernet/\"1/0\"/shutdown

To delete the interface description

DELETE

No

/api/running/switch/interface/gigabitEthernet/\"1/0\"/description

Example for Interface Port APIs Payload

<gigabitEthernet><name>1/0</name><shutdown/></gigabitEthernet>

Example: DELETE Interface Port APIs

curl -k -u admin:admin -X DELETE https://209.165.201.1/api/running/switch/interface/gigabitEthernet/speed

Example: PATCH Interface Port APIs

curl -k -u admin:admin -d "<gigabitEthernet><name>1/0</name><shutdown/></gigabitEthernet>" -X PATCH https://209.165.201.1/api/running/switch/interface/gigabitEthernet -H "Content-Type: application/vnd.yang.data+xml"

Example: DELETE Interface Port APIs

curl -k -u admin:admin -X DELETE https://209.165.201.1/api/running/switch/interface/gigabitEthernet/\"1/0\"/shutdown

Example: DELETE Interface Port APIs

curl -i -k -u admin:admin -X DELETE https://209.165.201.1/api/running/switch/interface/gigabitEthernet/\"1/0\"/description