コンテンツにスキップ

Import selected devices as nodes, atomically.

POST
/api/v1/meraki/import
curl --request POST \
--url https://example.com/api/v1/meraki/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "devices": [ { "lan_ip": "example", "model": "example", "name": "example", "network_id": "example", "network_name": "example", "product_type": "example", "serial": "example" } ], "file_by_prefix": true, "monitored_network_ids": [ "example" ], "org_uuid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

A device whose address falls inside exactly one folder’s IP range is filed in that folder; every other device goes under the organization’s folder, in a folder named after its network. Already-imported serials are skipped rather than rejected, so importing again after a partial selection does the obvious thing instead of erroring on the ones already there.

Media typeapplication/json
object
devices
required
Array<object>

One device to import. Only serial is read (ADR-164 decision 39): everything else about the device — its name, model, network and address — is taken from what this organization’s last sync recorded, never from the request. A page opened before Meraki renamed a device used to create the node under the old name, and the node then never followed a rename again. The other fields are accepted and ignored, so a client that still sends them keeps working.

object
lan_ip

Ignored; the inventory’s address is used.

string | null
model

Ignored.

string | null
name

Ignored; the inventory’s name is used.

string
network_id

Ignored.

string
network_name

Ignored.

string | null
product_type

Ignored.

string
serial
required
string
file_by_prefix

File each device into the folder whose IP range holds its address, when exactly one does; false files every device under the organization’s network folders. Absent means the organization’s own file_by_prefix setting — what its page shows and the sync uses.

boolean | null
monitored_network_ids

Networks to start watching along with the import — normally the ones devices are in. Collection asks the Dashboard about watched networks only, so a device imported from a network that stays unwatched becomes a node nothing is collected for. Absent or empty changes no network. ⚠️ With automatic import on, watching a network also makes the next sync import every other device in it.

Array<string>
org_uuid
required
string format: uuid
Examplegenerated
{
"devices": [
{
"lan_ip": "example",
"model": "example",
"name": "example",
"network_id": "example",
"network_name": "example",
"product_type": "example",
"serial": "example"
}
],
"file_by_prefix": true,
"monitored_network_ids": [
"example"
],
"org_uuid": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

How many devices became nodes and how they were filed; already-imported serials are skipped, and an MX whose network’s LAN side has not been read yet is not imported (waiting_lan)

Media typeapplication/json

What an import created, and where it put it.

object
bound_elsewhere
required

Devices asked for that are already a node of another organization (the device was moved between organizations in Meraki). A serial is one node deployment-wide, so they were skipped.

integer format: int32
filed
required

How those devices were filed. The four add up to imported, except that all four are zero when filing by IP range was off for this import: the request’s file_by_prefix, or the organization’s own setting when the request leaves it out.

object
ambiguous
required

Two or more folders claimed the address equally; filed under the network folder.

integer format: int32
matched
required

Filed into the one folder whose IP range holds the device’s address.

integer format: int32
no_address
required

Meraki reported no address; filed under the network folder.

integer format: int32
unmatched
required

No folder’s range holds the address; filed under the network folder.

integer format: int32
imported
required

Devices that became nodes. A serial that already was one is not counted.

integer format: int32
ranges_configured
required

Whether any folder carries an IP range at all. False means filed.unmatched says nothing about the devices: there was nothing for an address to match.

boolean
waiting_lan
required

MX that were asked for and not imported, because their network’s LAN side has not been read yet (ADR-164 decision 39) — their address, and so their folder, is not known. The next sync reads it; import them after that.

integer format: int32
Examplegenerated
{
"bound_elsewhere": 1,
"filed": {
"ambiguous": 1,
"matched": 1,
"no_address": 1,
"unmatched": 1
},
"imported": 1,
"ranges_configured": true,
"waiting_lan": 1
}

A serial this organization’s inventory does not hold (unknown_serial)

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 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 ManageConfig, or the account is restricted to folders (scope_unsupported)

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 such organization

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