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