REST API  14
REST API for Luna Network HSMs
DELETE /api/lunasa/network/devices/{deviceid}/routes/{routeid}

DELETE /api/lunasa/network/devices/{deviceid}/routes/{routeid}

Removes a specific route.

It is strongly recommended to perform this operation through a serial connection to the appliance in order to avoid any loss of connection with the appliance.

User Privileges

Users with the following role privileges can perform this command:

  • admin
  • operator

Parameters

deviceid

Specifies the id of the device.

Use: Required

JSON Schema:

    Object
    type:string

routeid

Specifies the id of the route.

Use: Required

JSON Schema:

    Object
    type:string

routeType

The parameter to determine the route to be set is a host route or network.

Use: Required

JSON Schema:

   Object
   type:string
   pattern: (host|network)

destination

The IP address or the hostname to route to. It must be calculated with the mask provided.

Use: Required

JSON Schema:

   Object
   type: string

netmask

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

gateway

The default gateway to set for the device.

Use: Optional

JSON Schema:

   Object
   type: string

metric

Specifies the path the router should take.

Use: Optional

JSON Schema:

   Object
   type: int
   MinValue: 0
   MacValue: 65535

isIPv6

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

Responses

204

Success

400

Unexpected error or device is slave of an active bond or bad request.

400

FRAMEWORK_BAD_REQUEST

Failed to execute due to malformed request.

404

APPLIANCE_INTERFACE_DOES_NOT_EXIST

Specified interface does not exist.

Example Request

    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
    }

Example Response

{}

Notes

  • Deleting the only default route present in the appliance routing table may cause remote connection to lose with the appliance.
  • This resource will return a waiting task.