OPNexusdocs

API: host-gateways

GET /api/hosts/{host_id}/gateways#

List Gateways

Live gateway state (loss, delay, deviation, OPNsense' verdict) of one firewall.

Permission hosts.read (look)

Parameters

host_id *pathstring (uuid)

Response 200 GatewayHealth[]

Show 9 fields
FieldTypeNotes
addressstring | null
alert_enabledboolean default: true
delaynumber | null
lossnumber | null
monitorstring | null
name *string
state *"online" | "degraded" | "offline" | "forced_down" | "unknown"
status *string
stddevnumber | null

PUT /api/hosts/{host_id}/gateways/{name}/alert#

Set Gateway Alert

Switch the gateway-down alert on or off for ONE gateway (admins only, see api_token_service).

Permission hosts.manage (administer)

Parameters

host_id *pathstring (uuid)
name *pathstring

Request body GatewayAlertUpdate

Show 1 fields
FieldTypeNotes
enabled *boolean

Response 200 GatewayAlertState

Show 2 fields
FieldTypeNotes
alert_enabled *boolean
name *string

GET /api/hosts/{host_id}/gateways/api-rights#

Api Rights

Side readings the newest FRESH resource sample could not take because the API key lacks the right (null = no fresh sample, so nothing is known). Stored data only: no call to the firewall.

Permission hosts.read (look)

Parameters

host_id *pathstring (uuid)

Response 200 ApiRightsState

Show 1 fields
FieldTypeNotes
missingstring[] | null