コンテンツにスキップ

Onboard one or more organizations under a single read-only API key.

POST
/api/v1/meraki/orgs
curl --request POST \
--url https://example.com/api/v1/meraki/orgs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "api_key": "example", "base_url": "example", "credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "org_ids": [ "example" ] }'

The key is validated by listing orgs. A typed key is then sealed once as a shared credential — each org row holds a reference plus its own org id, so onboarding twenty orgs stores one secret, not twenty copies of the same one. A saved key (credential_id, ADR-164 Inc.6) seals nothing: the new rows point at the credential that is already there, which is how an organization is added later under a key nobody has to find and paste again.

An organization that is already monitored here is skipped and counted. A per-org create failure is logged and skipped rather than failing the batch: the counts say what landed, and retrying is harmless.

Media typeapplication/json
object
api_key

A key typed by the operator; sealed as a new credential. Send this or credential_id.

string | null
base_url
string | null
credential_id

A meraki_api credential already stored here. The new organizations share it, and no new credential is created.

string | null format: uuid
org_ids
required
Array<string>
Examplegenerated
{
"api_key": "example",
"base_url": "example",
"credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"org_ids": [
"example"
]
}

How many organizations the batch created, and how many it named were here already; a per-org failure is skipped, not fatal

Media typeapplication/json

What an onboarding batch did.

object
already_added
required

Organizations it named that were monitored here already, and were left as they are.

integer format: int32
created
required

Organizations this request added.

integer format: int32
Examplegenerated
{
"already_added": 1,
"created": 1
}

The org list is empty or both api_key and credential_id were sent (invalid_request), no key was named (invalid_api_key), credential_id is not a stored Meraki API key (invalid_credential), base_url is not an https allow-listed Meraki host, or an org id is not one the key can see (unknown_org)

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

The Dashboard API rejected the key or was unreachable

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