Custom

Module: Custom

Custom Scripts

These scripts are helfpul for iterating through API endpoints, chaining data or returing enhanced results.

Methods

(static) getClientPolicyForClients(networkId, clients, timespanopt)

gets the client policy for an array of clients in a network.

Parameters
Name Type Attributes Default Description
networkId string

ID of network L_123456789

clients Array

Array of clients with MAC property [{mac: 'aa:bb:cc:dd:ee:ff}, {mac: 'bb:bb:cc:dd:ee:ff}]

timespan number <optional>
86400

Timespan to search for clients

(static) getClientsForDevices(devices, timespanopt, modelopt)

get clients for devices

Parameters
Name Type Attributes Default Description
devices Array

Array of devices, [{serial: abcd-asdf-asdf}, {serial: qwer-asdf-asdf}]

timespan number <optional>
86400

Timespan to search for clients in seconds

model string <optional>

Meraki device model MR, MS, MX

(static) getClientsForNetwork(networkId, timespanopt, modelopt)

Synchronous script to traverse the Meraki API and display the clients and their policies

Parameters
Name Type Attributes Default Description
networkId string

Network ID L_123456789

timespan number <optional>
86400

Timespan to search for clients in seconds

model string <optional>

Meraki device model MR, MS, MX

(static) getClientsForNetworks(networks, timespanopt, modelopt)

get clients for devices

Parameters
Name Type Attributes Default Description
networks Array

Array of networks, [{id: L_123456789}, {id: N_1234567890}]

timespan number <optional>
86400

Timespan to search for clients in seconds

model string <optional>

Meraki device model MR, MS, MX

(static) getClientsForOrg(orgId, timespanopt)

get clients for an organization within specified timespan

Parameters
Name Type Attributes Default Description
orgId string
timespan number <optional>
86400

Timespan to search for clients in seconds

(async, static) getNetworkIdForDeviceMac(orgId, mac)

Async

Get the network ID for a Meraki Device using its MAC address

Parameters
Name Type Description
orgId string

Meraki Organization ID

mac string

Meraki device MAC address