コンテンツにスキップ

A node's VLANs with their names, states and gateways (ADR-257).

GET
/api/v1/nodes/{node_id}/vlans
curl --request GET \
--url https://example.com/api/v1/nodes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/vlans \
--header 'Authorization: Bearer <token>'

View, like the interface list it sits beside. Skeleton mode answers an empty list: the VLANs are PostgreSQL-only, so “none known” is the truthful answer.

node_id
required
string format: uuid

Node id

The node’s VLANs by ID: the ones its VLAN table defines and the ones its ports use. Empty until the hourly VLAN walk (or, for Meraki, the network’s LAN read) has run, and in skeleton mode

Media typeapplication/json
Array<object>

One VLAN of a node (ADR-257).

object
defined

false: a port uses this VLAN and the device’s own VLAN table does not list it — a configuration gap. null when that cannot be judged (names not read, or a Meraki switch, whose own VLANs need no definition on the MX).

boolean | null
gateway
One of:
null
name

The name the device (or the Meraki Dashboard) gives it, verbatim. null when the names were not read; an empty string when the device gives this VLAN none.

string | null
state
One of:
null
subnet

The VLAN’s subnet as the Meraki Dashboard writes it (10.1.0.0/24). null elsewhere.

string | null
vlan_id
required

The VLAN ID, 1-4094.

integer format: int32
Example
[
{
"state": "active"
}
]

No valid bearer token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role lacks View

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}