![]()  | 
  
    REST API
    4.0.0
    
   REST API for SafeNet Network HSMs 
   | 
 
Creates a route.
The IP address or the hostname to route to.
Use:  Required  
JSON Schema:  
Object type: string
The subnet mask to set for the device.
Use:  Required  
JSON Schema:  
Object type: integer
The default gateway to set for the device.
Use:  Required  
JSON Schema:  
Object type: string
Specifies the path the router should take.
Use:  Required  
JSON Schema:  
Object type: int
Success
"Location" is the URL to the newly created route. 
 see GET /api/lunasa/network/devices/{deviceid}/routes/{routeid} 
Unexpected error
Device does not exist.
 
    POST
    https://1.2.3.4:8443/api/lunasa/network/devices/eth0/routes
    {
        "destination" : "1.2.3.6",
        "mask" : 24,
        "gateway" : "1.2.3.7",
        "metric" : 1
    }
Example on ipv6  
    POST
    https://1.2.3.4:8443/api/lunasa/network/devices/eth0/routes
    {
        "destination" : "2000::10",
        "mask" : 128,
        "gateway" : "2000::1",
        "metric" : 1
    }
 
{}
This resource will restart the server.