Create static route
POST
/network/route
const url = 'https://sylve.lan:8181/api/network/route';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"description":"example","destination":"example","destinationObjId":1,"destinationRaw":"example","destinationType":"host","enabled":true,"family":"inet","fib":1,"gateway":"example","gatewayObjId":1,"gatewayRaw":"example","gatewayZone":"example","interface":"example","name":"example","nextHopMode":"gateway"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/network/route \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "description": "example", "destination": "example", "destinationObjId": 1, "destinationRaw": "example", "destinationType": "host", "enabled": true, "family": "inet", "fib": 1, "gateway": "example", "gatewayObjId": 1, "gatewayRaw": "example", "gatewayZone": "example", "interface": "example", "name": "example", "nextHopMode": "gateway" }'Create and apply a static route
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Static Route Request
Media typeapplication/json
object
description
string
destination
string
destinationObjId
integer
destinationRaw
string
destinationType
required
string
enabled
boolean
family
required
string
fib
integer
gateway
string
gatewayObjId
integer
gatewayRaw
string
gatewayZone
string
interface
string
name
required
string
nextHopMode
required
string
Responses
Section titled “Responses”Created
Media typeapplication/json
object
data
integer
error
string
message
string
status
string
Examplegenerated
{ "data": 1, "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Unauthorized
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Forbidden
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Conflict
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Request Entity Too Large
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}