IP Route APIs
Action |
Method |
Payload Required |
API |
---|---|---|---|
To enable static routes |
PUT |
Yes |
/api/running/switch/ip/routing |
To add a static route |
PUT |
Yes |
/api/running/switch/ip/route |
To remove a static route |
DELETE |
No |
/api/running/switch/ip/route/ip-route-forwarding-list |
Example for IP Route APIs Payload
<routing></routing>
Example for IP Route APIs Payload
<route><ip-route-forwarding-list><prefix>2.2.2.2</prefix><mask>255.255.255.255</mask><forwarding-address>5.5.5.1</forwarding-address></ip-route-forwarding-list></route>
Example: PUT IP Route APIs
curl -k -u admin:admin -d "<routing></routing>" -X PUT https://209.165.201.1/api/running/switch/ip/routing -H "Content-Type: application/vnd.yang.data+xml"
Example: PUT IP Route APIs
curl -k -u admin:admin -d "<route><ip-route-forwarding-list><prefix>2.2.2.2</prefix><mask>255.255.255.255</mask><forwarding-address>5.5.5.1</forwarding-address></ip-route-forwarding-list></route>" -X PUT https://209.165.201.1/api/running/switch/ip/route -H "Content-Type: application/vnd.yang.data+xml"
Example: DELETE IP Route APIs
curl -k -u admin:admin -X DELETE https://209.165.201.1/api/running/switch/ip/route/ip-route-forwarding-list/2.2.2.2,255.255.255.255,5.5.5.1