This flow provides a demonstration of using the Meraki Dashboard API with Node-RED. It will display a simple webform and send the details to Meraki using the API. This concept can also be used for any of the other API calls available.
Update the function node labelled "Env Variables: UPDATE THIS" with your Meraki API key, your organization ID and shard number.
-
Meraki API Key Meraki Dashboard --> Organization --> Settings --> Enable API Meraki Dashboard --> Profile --> Generate Key
-
Your Shard number is the prefix to the normal Dashboard.meraki.com website. You will notice that once you login, a number will prefix the meraki.com domain. This is your "shard" number and indicates which servers your organization resides on. Because some API calls do not like this redirect, its best to just hard code the number if the orgs share a shard.
https://n123.dashboard.meraki.com
n123 is the shard number. Enter that in your variables.
This demo flow will create an Organizational administrator.
It will first do a 'get' request to Meraki and pull a listing of all organizations, which includes their names and ID.
The form then asks for the name, email and permission access (full or read-only). Once submitted, the flow sends a 'post' request to Meraki to create the account. If successful, the screen will update with the details of the new user as a confirmation. If there are errors, they will appear as well (although not formatted at this time).
developers.meraki.com
Cory Guynn 2017