Skip to main content

Meraki

@tagur/merakiv2026.09.18.2· 18d agoMODELS
01README

Cisco Meraki Dashboard API v1 integration model for swamp.

Reads organization inventory and status and stores every record as a separately addressable resource using the factory pattern — enabling CEL queries, cross-model composition, and drift detection via versioned snapshots. All methods are read-only.

One model instance covers many Meraki organizations. profiles maps a friendly name to an organization ID plus its own API key, and every method fans out over all profiles in a single run (or one profile via --input profile=<name>), so a multi-org fleet needs one model and one lock acquisition rather than N of each.

Methods: sync_organizations, sync_networks, sync_devices, sync_device_statuses, sync_licenses, sync_uplink_statuses, sync_clients, and request — a read-only escape hatch for any other v1 path.

Organizations on co-termination licensing fall back automatically from the per-device licenses endpoint to the license overview endpoint, so sync_licenses works on both licensing models.

RFC5988 Link pagination is followed to completion under a page cap, and the documented 10 req/s per-organization rate limit is respected by honoring Retry-After on HTTP 429 with exponential backoff.

Quick Start

swamp extension pull @tagur/meraki
swamp vault create local_encryption meraki
printf '%s' "$MERAKI_KEY" | swamp vault put meraki CORP_API_KEY

swamp model create @tagur/meraki meraki
# then set globalArguments.profiles in the model YAML:
#   profiles:
#     corp:
#       organizationId: "549236"
#       apiKey: ${{ vault.get("meraki", "CORP_API_KEY") }}

swamp model @tagur/meraki method run sync_devices meraki
swamp data query 'modelName == "meraki" && specName == "device"' \
  --select '{"serial": attributes.serial, "model": attributes.model}'
02Release Notes

First stable release.

Read-only Cisco Meraki Dashboard API v1 model. A profiles map lets one model instance cover several organizations that do not share an API key — each profile carries its own key and an optional organization ID, and every method fans out over all profiles in a single run, so a multi-org fleet takes one lock acquisition rather than N. Omit the organization ID and a profile covers every organization its key can see.

Methods: sync_organizations, sync_networks, sync_devices, sync_device_statuses, sync_licenses, sync_uplink_statuses, sync_clients, and request — a read-only escape hatch for any v1 path, with {organizationId} substitution.

Both licensing models are supported: sync_licenses reads per-device licenses and falls back automatically to the license overview endpoint for co-termination organizations, storing the summary as a licenseOverview record.

RFC5988 Link pagination under a configurable page cap, Retry-After-aware backoff for 429 and 5xx, repeated key[] array filters as the API requires, and per-profile snapshots recording counts, truncation and per-organization errors so partial failures are assertable without discarding the records that did come back.

API keys are vault-sourced and sensitive-marked, never logged; URLs are stripped of query parameters in logs and errors; license keys are withheld unless explicitly enabled.

Validated end to end against a live six-organization fleet — 348 networks, 346 devices and statuses, 340 uplink statuses, and license data for all six — alongside 21 unit tests over a mocked API covering pagination, truncation, rate-limit retry, the licensing fallback and its negative case, redaction and both pre-flight checks.

03Models1
@tagur/merakiv2026.09.18.2meraki.ts

Global Arguments

ArgumentTypeDescription
profilesrecordNamed organization profiles — each with its own API key and optional organization ID
baseUrlstringDefault API base URL for profiles that do not override it
perPagenumberEntries requested per page for paginated endpoints
maxPagesnumberPage cap per endpoint per organization — guards against unbounded fetches
maxRetriesnumberRetry attempts for rate-limited (429) and transient (5xx) responses
includeLicenseKeysbooleanStore the licenseKey field on license records — off by default, license keys are credentials
fn sync_organizations(profile?: string)
List every organization each profile's API key can see. Fans out over all profiles unless one is named.
ArgumentTypeDescription
profile?stringLimit the run to a single configured profile
fn sync_networks(profile?: string, tags?: array)
Sync every network in each profile's organization(s). Optionally filter by configuration-template or tag.
ArgumentTypeDescription
profile?stringLimit the run to a single configured profile
tags?arrayOnly return networks carrying these tags
fn sync_devices(profile?: string, productTypes?: array)
Sync the device inventory for each profile's organization(s), including unclaimed devices.
ArgumentTypeDescription
profile?stringLimit the run to a single configured profile
productTypes?arrayFilter by product type (appliance, switch, wireless, camera, sensor, cellularGateway)
fn sync_device_statuses(profile?: string, statuses?: array)
Sync reachability status (online, offline, alerting, dormant) for every device in each organization.
ArgumentTypeDescription
profile?stringLimit the run to a single configured profile
statuses?arrayFilter to specific statuses (online, alerting, offline, dormant)
fn sync_licenses(profile?: string, state?: string)
Sync per-device license entitlements. Organizations on co-termination licensing fall back automatically to the license overview endpoint, stored as a licenseOverview record.
ArgumentTypeDescription
profile?stringLimit the run to a single configured profile
state?stringFilter by license state (active, expired, expiring, recentlyQueued, unused, unusedActive)
fn sync_uplink_statuses(profile?: string, networkIds?: array)
Sync WAN uplink status for appliances and cellular gateways across each organization.
ArgumentTypeDescription
profile?stringLimit the run to a single configured profile
networkIds?arrayRestrict results to specific network IDs
fn sync_clients(profile?: string, networkIds: array, timespan: number)
Sync clients seen on the given networks within the lookback window. Networks must be named explicitly — run sync_networks first to discover IDs.
ArgumentTypeDescription
profile?stringLimit the run to a single configured profile
networkIdsarrayNetwork IDs to fetch clients for
timespannumberLookback window in seconds — the API caps this at 2678400 (31 days)
fn request(path: string, query?: record, profile?: string, paginate: boolean)
Read-only escape hatch: GET any Dashboard API v1 path and store the raw response. Use {organizationId} in the path to substitute the profile's organization.
ArgumentTypeDescription
pathstringAPI path relative to /api/v1 (e.g. organizations/{organizationId}/admins)
query?recordQuery parameters to append
profile?stringLimit the run to a single configured profile
paginatebooleanFollow Link headers and store the combined array instead of a single page

Resources

organization(infinite)— Meraki organization visible to a profile's API key
network(infinite)— Network within an organization
device(infinite)— Device in an organization's inventory
deviceStatus(30d)— Reachability and addressing status for a device
license(infinite)— Per-device license entitlement
licenseOverview(infinite)— Co-termination license summary for an organization that does not support per-device licensing
uplinkStatus(30d)— WAN uplink status for an appliance or cellular gateway
client(30d)— Client observed on a network within the lookback window
snapshot(infinite)— Per-profile run metadata — organizations covered, counts, truncation, and errors
response(30d)— Raw response body from an arbitrary Dashboard API GET
04Stats
A
100 / 100
Downloads
16
Archive size
26.6 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels