コンテンツにスキップ

The node's current CDP/LLDP neighbours.

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

404 means nothing has recorded this node’s neighbours yet — the node may be neither an SNMP device nor a Meraki switch, MX or MR (whose neighbours are read from the Meraki Dashboard), may not speak either protocol, or may simply not have been read since collection was enabled. It is distinct from a recorded empty set, which is a real answer meaning the device reports no neighbours.

node_id
required
string format: uuid

Node id

The node’s current adjacency and how long it has held

Media typeapplication/json

A node’s current adjacency and how long it has held.

object
chassis_peers
required

For each distinct MAC-address chassis id on a row that advertises no usable management address, the Meraki device a Meraki organization lists under that MAC, if any (ADR-180 Inc.3). The Dashboard reports no management address for an MR or an MX, so this is how those rows say whether the device is monitored. Only MACs a Meraki device listing states are matched; any other chassis id is absent here, as is a row that has an address — that one is answered in peers.

Array<object>

One neighbour chassis MAC and the Meraki device listed under it (ADR-180 Inc.3).

object
capabilities
required

What the device is, from the kind of product the organization lists it as — switch for an MS, wlan_ap for an MR, router for an MX (ADR-181 Inc.4 decision 2). For a row whose own capabilities are blank; empty for a product with no such role.

Array<string>
Allowed values: router bridge switch wlan_ap phone host repeater cable_device igmp other
chassis
required

The chassis id exactly as the neighbour row carries it (aa:bb:cc:dd:ee:ff).

string
managed_by
One of:
null
node_id

Present only when state is node.

string | null format: uuid
node_name

Present only when state is node.

string | null
state
required

node, outside_scope or unregistered — never ambiguous. When two organizations list the same MAC (a device moving between them), the first by organization name answers.

string
Allowed values: node outside_scope ambiguous unregistered
first_seen
required

When this exact set was first seen (RFC 3339).

string
last_seen
required

When it was last confirmed unchanged (RFC 3339).

string
mac_vendors
required

The maker the IEEE registered each MAC-address chassis or port id to. Only ids the device labelled as MAC addresses are looked up — except on a Meraki switch, MX or MR, whose Dashboard reports no label, where an id shaped like a MAC address is (six octets, or twelve bare hex digits for a CDP device id). This names who made the network interface, which is not necessarily who made the device or its software.

Array<object>

The registered maker of one MAC address.

object
mac
required

The MAC exactly as the neighbour row carries it.

string
vendor
required
string
neighbors
required

The adjacencies the node last reported.

object
format

How the producer spelled these rows (ADR-182): a number the producer raises whenever it changes how it writes a field — a port name, an id’s notation — without the cabling having changed. Core compares it with the stored set’s, and a set whose key moved and whose format moved is recorded as a change of spelling, not a change of adjacency. Absent (an older poller, a set stored before this existed) reads as 0.

Not part of [Self::content_key]: a format raised for one producer must not re-key the sets whose rows did not change.

integer format: int32
neighbors

The adjacencies, canonically ordered.

Array<object>

One observed adjacency.

The first three string fields are the identity; everything below them is payload. Payload changes still append a history row (a peer that was reimaged is a real change on that port), but they never split one link into two records.

object
capabilities

What the peer says it is, normalized across both protocols.

Array<string>
Allowed values: router bridge switch wlan_ap phone host repeater cable_device igmp other
local_ifindex

The local ifIndex, when the protocol genuinely supplies one. CDP indexes its cache by ifIndex so this is exact; LLDP’s lldpLocPortNum is an arbitrary local index that only often equals ifIndex, so LLDP records leave this None rather than guess.

integer | null format: int32
local_port
required

The local port, as the device names it: LLDP renders lldpLocPortId by its subtype, CDP uses cdpInterfaceName. Falls back to port <n> / ifindex <n> when the naming table has no row, so the record still has an identity rather than being dropped. The current set and the history show a CDP ifindex <n> as that port’s interface name (ifName) when the node’s interface list has one, unless two ports would then share a name.

string
proto
required

Which protocol reported this.

string
Allowed values: lldp cdp
remote_chassis
required

The peer’s chassis id, rendered by subtype: LLDP lldpRemChassisId, CDP cdpCacheDeviceId.

string
remote_chassis_kind
One of:
null
remote_mgmt_addr

The peer’s management address, from cdpCacheAddress for CDP and from lldpRemManAddrTable for LLDP. None when the peer advertised none.

string | null
remote_platform

cdpCachePlatform — the peer’s hardware/software platform string (CDP only).

string | null
remote_port
required

The peer’s port id, rendered by subtype: LLDP lldpRemPortId, CDP cdpCacheDevicePort.

string
remote_port_desc

lldpRemPortDesc — the peer’s own description of its port.

string | null
remote_port_kind
One of:
null
remote_sys_desc

The peer’s own description of itself: lldpRemSysDesc for LLDP, cdpCacheVersion for CDP. Control characters (line breaks included) are removed and the text is cut at 255 characters.

string | null
remote_sys_name

lldpRemSysName. CDP has no separate system name (its device id serves both).

string | null
truncated

Whether [MAX_NEIGHBORS_PER_NODE] was hit and rows were dropped. Reported rather than silently swallowed — a truncated view that looks complete is worse than no view.

boolean
peers
required

For each distinct management address the neighbours advertise, which monitored node it belongs to. Matched on the address — an inventory address or any address one of a node’s interfaces carries. Only when several nodes claim it is the name the neighbour sent used, and only to choose among those nodes (ADR-180 Inc.4); a name alone never matches.

Array<object>

One neighbour management address and the node it belongs to.

object
address
required

The address exactly as the neighbour row carries it in remote_mgmt_addr.

string
also_claimed_by
required

The other nodes that claim the address, when more than one does — the ones the caller may see, by name, at most ten. Empty when one node or none claims it. A duplicate address stays visible even when the name picked the peer out.

Array<object>

Another node that claims a neighbour’s management address (ADR-180 Inc.4).

object
node_id
required
string format: uuid
node_name
required
string
port_state
required

Whether the ports carrying the address on that node have link.

string
Allowed values: up link_down unknown
also_claimed_total
required

How many other nodes claim the address, including those outside the caller’s folders and those past the first ten. 0 when one node or none claims it.

integer format: int32
discovery_id

That list’s row for the address, when discovery_listed — the id the endpoint probe and import act on (ADR-179 Inc.3).

string | null format: uuid
discovery_listed
required

Whether the address is on the caller’s Discovery ▸ Unregistered list.

boolean
managed_by
One of:
null
matched_by_name
required

Several nodes claim the address and the node answered was chosen among them by the name the neighbour sent (ADR-180 Inc.4). The others are in also_claimed_by.

boolean
node_id

Present only when state is node.

string | null format: uuid
node_name

Present only when state is node.

string | null
setup_blocked
One of:
null
state
required

What a neighbour’s management address is to this deployment.

string
Allowed values: node outside_scope ambiguous unregistered
Example
{
"chassis_peers": [
{
"capabilities": [
"router"
],
"managed_by": {
"kind": "controller"
},
"state": "node"
}
],
"neighbors": {
"neighbors": [
{
"capabilities": [
"router"
],
"proto": "lldp",
"remote_chassis_kind": "mac",
"remote_port_kind": "mac"
}
]
},
"peers": [
{
"also_claimed_by": [
{
"port_state": "up"
}
],
"managed_by": {
"kind": "controller"
},
"setup_blocked": "not_a_device_address",
"state": "node"
}
]
}

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"
}
}

No adjacency has been recorded for the node

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"
}
}

Inventory storage is unavailable (skeleton mode)

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"
}
}