meraki/rest/organizations

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

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

The Meraki api key

target string <optional>
'api'

The Meraki target

basePath string <optional>
'/'

The Meraki base path for the organization ressource

rateLimiter string

The rate limiter (bottleneck) configuration

logger object <optional>

Logger to use if logging is enabled

Returns:

The initialized Meraki REST API wrapper for the organization ressource

Type
Object

Methods

(static) claimOrganization(apiKeyopt, targetopt, scopeopt, orgId, order, serial, licenseKey, licenseMode) → {Promise}

Source:

Claim a device, license key, or order into an organization. When claiming by order, all devices and licenses in the order will be claimed; licenses will be added to the organization and devices will be placed in the organization's inventory. These three types of claims are mutually exclusive and cannot be performed in one request.

Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

orgId string

The id of the organization to claime

order string

The order number that should be claimed

serial string

The serial of the device that should be claimed

licenseKey string

The license key that should be claimed

licenseMode string

Either renew or addDevices. addDevices will increase the license limit, while renew will extend the amount of time until expiration. This parameter is required when claiming by licenseKey

Returns:

A promise with no data

Type
Promise

(static) cloneOrganization(apiKeyopt, targetopt, scopeopt, orgId, name) → {Promise}

Source:

Create a new organization by cloning the addressed organization.

Example

Example response

{
  "id":1234,
  "name":"My cloned org"
}
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

orgId string

The id of the organization to clone

name string

The name of the new organization

Returns:

A promise holding the newly created / cloned organization

Type
Promise

(static) createOrganization(apiKeyopt, targetopt, scopeopt, name) → {Promise}

Source:

Create a new organization.

Example

Example response

{
  "id":1234,
  "name":"My org"
}
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

name string

The name of the organization

Returns:

A promise holding the newly created organization

Type
Promise

(static) listOrganizationInventory(apiKeyopt, targetopt, scopeopt, orgId) → {Promise}

Source:

Return the inventory for an organization.

Example

Example response

[
  {
    "mac": "00:11:22:33:44:55:66",
    "serial": "Q2XX-XXXX-XXXX",
    "networkId": "N_1234",
    "model": "MR34",
    "claimedAt": "1477958158.69776",
    "publicIp": "1.2.3.4",
  }
]
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

orgId string

The id of the organization

Returns:

A promise holding the inventory for this organization

Type
Promise

(static) listOrganizations(apiKeyopt, targetopt, scopeopt) → {Promise}

Source:

List the organizations that the user has privileges on.

Example

Example response

[
  {
    "id":1234,
    "name":"My org"
  }
]
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

Returns:

A promise holding the organizations this user has privileges on

Type
Promise

(static) showOrganization(apiKeyopt, targetopt, scopeopt, orgId) → {Promise}

Source:

Return an organization.

Example

Example response

{
  "id":1234,
  "name":"My org"
}
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

orgId string

The organization id

Returns:

A promise holding the organization for this id

Type
Promise

(static) showOrganizationDeviceStatuses(apiKeyopt, targetopt, scopeopt, orgId) → {Promise}

Source:

List the status of every Meraki device in the organization.

Example

Example response

[
  {
    "name": "My AP",
    "serial": "Q234-ABCD-5678",
    "mac": "00:11:22:33:44:55",
    "status": "only",
    "lanIp": "1.2.3.4",
    "publicIp": "123.123.123.1",
    "networkId": "N_24329156"
  }
]
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

orgId string

The id of the organization

Returns:

A promise holding then device statues for this organization

Type
Promise

(static) showOrganizationLicense(apiKeyopt, targetopt, scopeopt, orgId) → {Promise}

Source:

Return the license state for an organization.

Example

Example response

{
  "status": "OK",
  "expirationDate": "Nov 16, 2016 UTC",
  "licensedDeviceCounts": {
    "MS": 100
  }
}
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

orgId string

The id of the organization

Returns:

A promise holding the license state for this organization

Type
Promise

(static) showOrganizationSNMP(apiKeyopt, targetopt, scopeopt, orgId) → {Promise}

Source:

Return the SNMP settings for an organization.

Example

Example response

{
  "v2cEnabled":false,
  "v3Enabled":false,
  "v3AuthMode":null,
  "v3PrivMode":null,
  "hostname":"n1.meraki.com",
  "port":16100
}
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

orgId string

The id of the organization

Returns:

A promise holding then SNMP settings for this organization

Type
Promise

(static) updateOrganization(apiKeyopt, targetopt, scopeopt, orgId, name) → {Promise}

Source:

Update an organization.

Example

Example response

{
  "id":1234,
  "name":"My org"
}
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

orgId string

The organization id

name string

The name of the organization

Returns:

A promise holding the updated organization

Type
Promise

(static) updateOrganizationSNMP(apiKeyopt, targetopt, scopeopt, orgId, v2cEnabled, v3Enabled, v3AuthMode, v3AuthPass, v3PrivMode, v3PrivPass, peerIps) → {Promise}

Source:

Update the SNMP settings for an organization.

Example

Example response

{
  "v2cEnabled":false,
  "v3Enabled":false,
  "v3AuthMode":null,
  "v3PrivMode":null,
  "hostname":"n1.meraki.com",
  "port":16100,
  "peerIps":null
}
Parameters:
Name Type Attributes Description
apiKey string <optional>

Optional custom apiKey for this request (if not set will take the inital apiKey)

target string <optional>

Optional custom target for this request (if not set will take the inital target)

scope string <optional>

Optional custom scope for rate limiter

orgId string

The id of the organization

v2cEnabled boolean

Boolean indicating whether SNMP version 2c is enabled for the organization

v3Enabled boolean

Boolean indicating whether SNMP version 3 is enabled for the organization

v3AuthMode string

The SNMP version 3 authentication mode either MD5 or SHA

v3AuthPass string

The SNMP version 3 authentication password. Must be at least 8 characters if specified

v3PrivMode string

The SNMP version 3 privacy mode DES or AES128

v3PrivPass string

The SNMP version 3 privacy password. Must be at least 8 characters if specified

peerIps string

The IPs that are allowed to access the SNMP server. This list should be IPv4 addresses separated by semi-colons (ie. "1.2.3.4;2.3.4.5")

Returns:

A promise holding then updated SNMP settings for this organization

Type
Promise