![]() |
REST API
17
REST API for Luna Network HSMs
|
Removes a specific route.
Users with the following role privileges can perform this command:
Specifies the id of the device.
Use: Required
JSON Schema:
Object
type: string
minLength: 1
maxLength: 32
pattern: ^[a-zA-Z0-9_.-]*$
Specifies the id of the route.
Use: Required
JSON Schema:
Object
type:string
minLength: 1
maxLength: 64
pattern: ^[a-zA-Z0-9_:.]+$
The parameter to determine the route to be set is a host route or network.
Use: Required
JSON Schema:
Object type:string minLength: 4 maxLength: 7 pattern: ^(host|network)$
The IP address or the hostname to route to. It must be calculated with the mask provided.
Use: Required
JSON Schema:
Object
type: string
minLength: 7
maxLength: 39
pattern: ^((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|([a-fA-F0-9]{1,4}:){1,7}[a-fA-F0-9]{1,4})$
The subnet mask to set for the device.
Default value of network route is "255.255.255.0" .
Use: Not Required
JSON Schema:
Object
type: string
pattern: ^(((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?$)|([0-9]{1,2}|1[01][0-9]|12[0-8]))$
The default gateway to set for the device. Note: This parameter is mandatory to provide while deleting a route if the same has been provided while adding a route.
Use: Optional
JSON Schema:
Object
type: string
minLength: 7
maxLength: 39
pattern: ^((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|([a-fA-F0-9]{1,4}:){1,7}[a-fA-F0-9]{1,4})$
Specifies the path the router should take.
Use: Optional
JSON Schema:
Object type: int minimum: 0 maximum: 65535
The flag to determine the route to be added has IPv6 address. Flag is set to false by default.
Use: Optional
JSON Schema:
Object type:boolean
Success
Unexpected error or device is slave of an active bond or bad request.
Returned when the input data does not conform to the required validation schema.
Specified interface does not exist.
DELETE
https://1.2.3.4:8443/api/lunasa/network/devices/eth0/routes/192.168.0.0_24_s_50
{
"routeType" : "network",
"destination" : "192.168.0.0",
"netmask" : "255.255.255.0",
"gateway" : "192.168.0.1",
"metric" : 105,
"isIPv6": false
}
{}