Create a Meraki REST API wrapper for the config template ressource. See the online documentation for more information.
- Source:
Example
const apiKey = 'secret meraki api key'
const version = 'v0'
const target = 'n12'
const basePath = `/${target}/${version}`
const rateLimiter = {
enabled: true
}
const templateEndpoints = require('./lib/rest/templates')({ 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 config template 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 config template ressource
- Type
- Object
Methods
(static) deleteConfigurationTemplate(apiKeyopt, targetopt, scopeopt, orgId, templateId) → {Promise}
- Source:
Remove a configuration template.
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 |
|
templateId |
string | The id of the template to delete |
Returns:
A promise with no data
- Type
- Promise
(static) listConfigurationTemplates(apiKeyopt, targetopt, scopeopt, orgId) → {Promise}
- Source:
List the configuration templates for this organization.
Example
Example response
[
{
"id": "N_1234",
"name": "Your config template"
}
]
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 configuration templates for this organization
- Type
- Promise