Create A Layer 3 Static Route For A Switch

POST {{baseUrl}}/devices/:serial/switch/routing/staticRoutes

Create a layer 3 static route for a switch #### Body Parameters Parameter|Type|Description :-------------: |:-------------: |:-------------: name| string| Name or description for layer 3 static route subnet| string| The subnet which is routed via this static route and should be specified in CIDR notation (ex. 1.2.3.0/24) nextHopIp| string| IP address of the next hop device to which the device sends its traffic for the subnet advertiseViaOspfEnabled| boolean| Option to advertise static route via OSPF preferOverOspfRoutesEnabled| boolean| Option to prefer static route over OSPF routes

Supports Action Batches

ResourceOperation
/devices/{serial}/switch/routing/staticRoutescreate

Request Body

{"subnet"=>"<string>", "nextHopIp"=>"<string>", "name"=>"<string>", "advertiseViaOspfEnabled"=>"<boolean>", "preferOverOspfRoutesEnabled"=>"<boolean>"}

HEADERS

KeyDatatypeRequiredDescription
X-Cisco-Meraki-API-Keynull
Content-Typestring

RESPONSES

status: Created

{&quot;staticRouteId&quot;:&quot;1234&quot;,&quot;name&quot;:&quot;My route&quot;,&quot;subnet&quot;:&quot;192.168.1.0/24&quot;,&quot;nextHopIp&quot;:&quot;1.2.3.4&quot;,&quot;advertiseViaOspfEnabled&quot;:false,&quot;preferOverOspfRoutesEnabled&quot;:false}