Configure Static Route

Configure Static Route
Configure Static Route

Adds a new static route to the HCX Manager appliance. Static routes allow you to define custom network paths for specific destination networks.

Validations:

  • static_network: Must be a valid IPv4 address (e.g., 192.168.0.0)
  • static_prefix: Integer between 0 and 32 (CIDR prefix length)
  • static_gateway_ip: Must be a valid IPv4 address and should be reachable

Important Notes:

  • Duplicate routes (same network/prefix) may override existing routes
  • Gateway must be reachable from HCX Manager's network
  • Invalid gateway can cause connectivity issues
  • Routes are applied to the primary network interface
Request
URI
PUT
https://{server}:9443/system/network/staticroutes
COPY
Request Body
Required
{
    "static_network": "string",
    "static_prefix": "string",
    "static_gateway_ip": "string"
}
string
static_network
Required

static_network

string
static_prefix
Required

static_prefix

string
static_gateway_ip
Required

static_gateway_ip

Authentication
This operation uses the following authentication methods.
Responses
200

Static route configured successfully

Returns SystemNetworkStaticRoutesGetResponse200Item of type(s) application/json
{
    "static_network": "string",
    "static_prefix": "string",
    "static_gateway_ip": "string"
}
string
static_network
Required

static_network

string
static_prefix
Required

static_prefix

string
static_gateway_ip
Required

static_gateway_ip


400

Bad request - invalid route parameters

Returns ErrorResponse of type(s) application/json
{
    "isSuccess": false,
    "message": "Request schema validation failed",
    "httpStatusCode": 400
}
boolean
isSuccess
Required

Indicates if the operation was successful

string
message
Required

Human-readable error message

integer
httpStatusCode
Required

HTTP status code


500

Internal server error while configuring route

Returns ErrorResponse of type(s) application/json
{
    "isSuccess": false,
    "message": "Request schema validation failed",
    "httpStatusCode": 400
}
boolean
isSuccess
Required

Indicates if the operation was successful

string
message
Required

Human-readable error message

integer
httpStatusCode
Required

HTTP status code


Code Samples
COPY
                    curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"static_gateway_ip":"string","static_network":"string","static_prefix":"string"}' https://{api_host}/system/network/staticroutes