node-red-contrib-meraki-dashboard-api-v1.0

published

A Node-RED node for interacting with the Cisco Meraki Dashboard API v1.

This node provides access to 933 API endpoints covering the full Meraki Dashboard API v1.70.0, including devices, networks, organizations, appliances, switches, wireless, cameras, sensors, and more. All endpoints utilize OpenAPI Specification version 3, pulled directly from Meraki's spec3.json file from GitHub.

Features

  • All Meraki Dashboard API v1 endpoints available from a single node
  • Cascading category/sub-category/filter selectors for easy endpoint discovery
  • Parameters configurable in the node editor or passed dynamically via msg properties
  • API host and key overridable per-message for multi-org workflows
  • Body examples shown inline for POST/PUT operations
  • Data-driven architecture — endpoints defined in a single JSON file for easy maintenance

Installation

Copy the 'node-red-contrib-meraki-dashboard-api-v1' folder to your Node-Red modules directory.

Default location:
C:\Users\username\.node-red\node_modules\node-red-contrib-meraki-dashboard-api-v1

Then restart Node-RED.

Configuration

  1. Drag the Meraki Dashboard API v1 node onto your flow
  2. Double-click to configure
  3. Add a new Service configuration:
    • API URL: https://api.meraki.com/api/v1 (default)
    • Header Name: X-Cisco-Meraki-API-Key
    • API Key: Your Meraki Dashboard API key
  4. Select a Category, Sub-Category, and Method
  5. Fill in the required parameters

Getting an API Key

  1. Log in to the Meraki Dashboard
  2. Navigate to Organization → API & Webhooks
  3. Under API keys and access, generate your API key

See the Meraki API documentation for more details.

Usage

Inputs

Property Type Description
msg.payload object For POST/PUT methods, the request body as a JSON object
msg.service object Optional. Override API host and/or key: { host: "https://...", apiKey: "..." }
msg.operationId string Optional. Dynamically select which API method to call
msg.<paramName> string Any parameter can be passed as a message property (e.g., msg.serial, msg.networkId)

Outputs

Property Type Description
msg.payload object The API response body
msg.statusCode number HTTP status code
msg.headers object Response headers
msg.responseUrl string Final URL after redirects

Example Flow

[
    {
        "id": "example1",
        "type": "inject",
        "name": "Get Org Devices",
        "props": [
            { "p": "organizationId", "v": "YOUR_ORG_ID", "vt": "str" }
        ],
        "wires": [["meraki1"]]
    },
    {
        "id": "meraki1",
        "type": "meraki-dashboard-api-v1",
        "name": "getOrganizationDevices",
        "method": "getOrganizationDevices",
        "wires": [["debug1"]]
    },
    {
        "id": "debug1",
        "type": "debug",
        "name": "Output"
    }
]

Updating Endpoints

This node uses a data-driven architecture. All API endpoints are defined in endpoints.json and the code is fully generic. No per-endpoint logic exists in the source files.

To update to the latest Meraki API version:

cd node_modules/node-red-contrib-meraki-dashboard-api-v1
node update_from_openapi.js
node build.js

This downloads the latest Meraki OpenAPI spec from GitHub, regenerates endpoints.json, and rebuilds node.html. Restart Node-RED to pick up the changes.

Project Structure

File Purpose
endpoints.json All API endpoint definitions (operationId, method, path, params, tags, summary)
lib.js Generic API client with a single callEndpoint() method
node.js Node-RED node logic — generic parameter resolution and API invocation
node.html Node-RED editor UI — dynamically generated from endpoint data
node.html.template Template for node.html with placeholder for endpoint data
build.js Build script that injects endpoints.json into the HTML template
update_from_openapi.js Downloads the latest Meraki OpenAPI spec and regenerates endpoints.json

Adding a Custom Endpoint

If you need to add an endpoint manually (e.g., a beta or private API), add an entry to endpoints.json:

{
    "operationId": "getMyCustomEndpoint",
    "method": "GET",
    "path": "/organizations/{organizationId}/custom/endpoint",
    "params": [
        { "name": "organizationId", "in": "path", "type": "string", "required": true },
        { "name": "perPage", "in": "query", "type": "string", "required": false }
    ],
    "tags": ["organizations", "custom"],
    "summary": "Description of what this endpoint does"
}

Then run node build.js and restart Node-RED.

Dependencies

  • request — HTTP client
  • q — Promise library
  • file-type — File type detection for multipart uploads

Related Resources

License

This project is licensed under the Apache License 2.0.

See the LICENSE file for details.

Credits

Originally created by Cory Guynn.
Updated and maintained by Austin Kutzer.

The Meraki Dashboard API is developed and maintained by Cisco Meraki. This node is a community project and is not officially supported by Cisco.

View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.