meraki/rest/static-routes

Create a Meraki REST API wrapper for the static route 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}/networks`
const rateLimiter = {
 enabled: true
}
const routeEndpoints = require('./lib/rest/routes')({ apiKey, target, basePath, baseUrl })
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 static route 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 static route ressource

Type
Object

Methods

(static) createStaticNetworkRoute(apiKeyopt, targetopt, scopeopt, networkId, name, subnet, gatewayIp) → {Promise}

Source:

Add a static route.

Examples

Example request data

{
  "name": "VOIP",
  "subnet": "192.168.10.0/24",
  "gatewayIp":"10.0.13.37"
}

Example response

{
  "id": "10",
  "networkId": "N_1234",
  "name": "VOIP",
  "gatewayIp":"10.0.13.37",
  "subnet": "192.168.10.0/24"
}
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

networkId string

The id of the network for which to list the static routes

name string

The name of the static route

subnet string

The subnet of the static route

gatewayIp string

The gateway IP (next hop) of the static route

Returns:

A promise holding the newly created static route of this network

Type
Promise

(static) deleteStaticNetworkRoute(apiKeyopt, targetopt, scopeopt, networkId, srId) → {Promise}

Source:

Delete a static route.

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

networkId string

The id of the network for which to list the static routes

srId string

The id of the static route to remove

Returns:

A promise with no data

Type
Promise

(static) listStaticNetworkRoutes(apiKeyopt, targetopt, scopeopt, networkId) → {Promise}

Source:

List the static routes for this network.

Example

Example response

[
  {
    "id": "10",
    "networkId": "N_1234",
    "name": "VOIP",
    "gatewayIp": "10.8.0.5",
    "subnet": "192.168.10.0/24"
  }
]
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

networkId string

The id of the network for which to list the static routes

Returns:

A promise holding the static routes of this network

Type
Promise

(static) showStaticNetworkRoute(apiKeyopt, targetopt, scopeopt, networkId, srId) → {Promise}

Source:

Return a static route.

Example

Example response

{
  "id": "10",
  "networkId": "N_1234",
  "name": "VOIP",
  "gatewayIp": "10.8.0.5",
  "subnet": "192.168.10.0/24"
}
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

networkId string

The id of the network for which to list the static routes

srId string

The id of the static route for which to show the details

Returns:

A promise holding the details of a static route this network

Type
Promise

(static) updateStaticNetworkRoute(apiKeyopt, targetopt, scopeopt, networkId, srId, name, subnet, gatewayIp, enabled, fixedIpAssignments, reservedIpRanges) → {Promise}

Source:

Update a static route.

Examples

Example request data

{
  "name": "VOIP",
  "subnet": "192.168.10.0/24",
  "fixedIpAssignments": {
    "13:37:de:ad:be:ef": {
      "ip": "192.168.10.5",
      "name": "fixed"
    }
  },
  "reservedIpRanges": [{
    "start": "192.168.10.20",
    "end": "192.168.10.30",
    "comment": "reserved"
  }]
}

Example response

{
  "id": "10",
  "networkId": "N_1234",
  "name": "VOIP",
  "gatewayIp": "10.8.0.5",
  "subnet": "192.168.10.0/24"
}
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

networkId string

The id of the network for which to list the static routes

srId string

The id of the static route to update

name string

The name of the static route

subnet string

The subnet of the static route

gatewayIp string

The gateway IP (next hop) of the static route

enabled boolean

The enabled state of the static route

fixedIpAssignments string

The DHCP fixed IP assignments on the static route

reservedIpRanges string

The DHCP reserved IP ranges on the static route

Returns:

A promise holding the updated static route of this network

Type
Promise