REST API  4.0.0
REST API for SafeNet Network HSMs
POST /api/lunasa/network/devices/{deviceid}/routes

POST /api/lunasa/network/devices/{deviceid}/routes

Creates a route.

Parameters

destination

The IP address or the hostname to route to.

Use: Required

JSON Schema:

   Object
   type: string

mask

The subnet mask to set for the device.

Use: Required

JSON Schema:

   Object
   type: integer

gateway

The default gateway to set for the device.

Use: Required

JSON Schema:

   Object
   type: string

metric

Specifies the path the router should take.

Use: Required

JSON Schema:

   Object
   type: int

Responses

204

Success

Location

"Location" is the URL to the newly created route.

see GET /api/lunasa/network/devices/{deviceid}/routes/{routeid}

400

Unexpected error

404

Device does not exist.

Example Request

    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
    }

Example Response

{}

Notes

This resource will restart the server.