meraki/rest

Create a Meraki REST API wrapper. See the online documentation for more information.

Source:
Example
const apiKey = 'secret meraki api key'
const organizationId = 'meraki organization id'
const version = 'v0' (default)
const target = 'n12'
const baseUrl = 'https://api.meraki.com' (default)
const rateLimiter = {
  enabled: true
}
const meraki = require('./lib')({ version, apiKey, target, baseUrl, rateLimiter, loggerEnabled: true })
Parameters:
Name Type Attributes Default Description
version string <optional>
'v0'

Which Meraki api version to use

apiKey string <optional>
''

The Meraki api key

target string <optional>
'api'

The Meraki target

baseUrl string <optional>
'https://api.meraki.com'

The Meraki organization id

rateLimiter Object <optional>

The rate limiter (bottleneck) configuration

Properties
Name Type Attributes Default Description
enabled boolean <optional>

Whether use the rate limiter

maxConcurrent number <optional>
5

How many jobs can be running at the same time (null for unlimited)

minTime number <optional>
200

How long to wait after launching a job before launching another one

highWater number <optional>
1000

How long can the queue get? When the queue length exceeds that value, the selected strategy is executed to shed the load

strategy string <optional>
'LEAK'

Which strategy to use if the queue gets longer than the high water mark. Read about strategies.

scoped string <optional>
false

If set to true uses a scoped rate limiter instance (pooled) which can be defined on per request level by the scope field

loggerEnabled boolean <optional>
false

Whether to use logging (request-based) or not

logger Object <optional>
console

Logger to be used in case loggerEnabled is set to true

Returns:

The initialized Meraki REST API wrapper

Type
Object

Members

(static, constant) adminEndpoints

Source:
See:

The admin endpoints

(static, constant) alertSettingsEndpoints

Source:
See:

The alert settings endpoints

(static, constant) clientEndpoints

Source:
See:

The client endpoints

(static, constant) devicesEndpoints

Source:
See:

The device endpoints

(static, constant) httpServesEndpoints

Source:
See:

The HTTP server endpoint (Webhooks)

(static, constant) mxL3FirewallEndpoints

Source:
See:

The MX L3 firewall endpoints

(static, constant) networksEndpoints

Source:
See:

The network endpoints

(static, constant) organizationEndpoints

Source:
See:

The organization endpoints

(static, constant) policiesEndpoints

Source:
See:

The group policy endpoints

(static, constant) portsEndpoints

Source:
See:

The switch port endpoints

(static, constant) rawEndpoints

Source:
See:

The raw endpoints for GET, POST, PUT, and DELETE requests with raw paths, params, and data

(static, constant) routesEndpoints

Source:
See:

The static route endpoints

(static, constant) samlEndpoints

Source:
See:

The samle role endpoints

(static, constant) ssidsEndpoints

Source:
See:

The SSID endpoints

(static, constant) templatesEndpoints

Source:
See:

The config template endpoints

(static, constant) vlansEndpoints

Source:
See:

The VLAN endpoints