You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

REST API Method: PUT /rest/staticiproute/{identifier}

Creates a static IP Route given a specific ID and values.

URL:

https://134.56.227.163/rest/staticiproute/{identifier}

HTTP Method

PUT

Requires Authentication:

true



Parameters

Parameter Name Required Service Affecting Data Type Default Value Possible Values Description
ipStaticRouteTypeNoNoEnum1Possible values:
  • 0 - ROUTE_ENTRY_DIRECT
  • 1 - ROUTE_ENTRY_INDIRECT
Specifies the route type. Only indirect route types are currently supported.
ifNameYesYesstringnone20 - Max Length Deprecated. Is the interface name for this static route.
ipDestinationAddrYesYesstringnone23 - Max Length Is the IP address of the destination host or subnet, in dotted notation. {info}If Destination IP Address field and Mask field are both set to 0.0.0.0, then the static route is called default static route.
ipDestinationMaskYesYesstringnone23 - Max Length Is the network mask of the destination host or subnet, in dotted notation. {info}If Destination IP Address field and Mask field are both set to 0.0.0.0, then the static route is called default static route.
ipNexthopAddressYesYesstringnone23 - Max Length Is the IP address of the next-hop router, in dotted notation.
ipLinkMonitorEnabledNoNoEnum0Possible values:
  • 0 - btFalse
  • 1 - btTrue
Specifies if this next-hop router is monitored by the link monitor. This field is automatically enabled when the link monitor selects this next-hop router as the gateway for monitoring.
ipStaticRouteMetricYesYesint1Possible values:
  • 1 - Minimum
  • 255 - Maximum
Is the routing cost of this route and hence indirectly specifies the preference of the route. Lower values indicate more preferred routes. Typical value is 1 for most static routes indicating that static routes are preferred to dynamic routes.

Usage Example: (about cURL | requires a session token)

curl --cookie PHPSESSID=cuc2h83fqaispmu6m519sa5642 -s -k -i https://134.56.72.218/rest/staticiproute/1 -X PUT --data "ConfigIEState=1&ipNexthopAddress=192.168.5.5&ipDestinationAddr=0.0.0.0&ipStaticRouteType=2&ipDestinationMask=0.0.0.0&ifName=&ipLinkMonitorEnabled=0&ipStaticRouteMetric=1"

Response:

<?xml version="1.0"?>
<root>
 <status>
  <http_code>200</http_code>
 </status>
 <staticiproute id="1" href="https://134.56.72.218/rest/staticiproute/1">
  <ifName></ifName>
  <ipDestinationAddr>0.0.0.0</ipDestinationAddr>
  <ipDestinationMask>0.0.0.0</ipDestinationMask>
  <ipLinkMonitorEnabled>0</ipLinkMonitorEnabled>
  <ipNexthopAddress>192.168.5.5</ipNexthopAddress>
  <ipStaticRouteMetric>1</ipStaticRouteMetric>
  <ipStaticRouteType>2</ipStaticRouteType>
 </staticiproute>
</root>
  • No labels