Module: Templates

Included in:
DashboardAPI
Defined in:
lib/templates.rb

Overview

Templates section of the Meraki Dashboard API

Author:

  • Joe Letizia

Instance Method Summary collapse

Instance Method Details

#list_templates(org_id) ⇒ Array

Return a list of all templates for a specific organization

Parameters:

  • org_id (String)

    organization ID where that we want to list all of the templates from

Returns:

  • (Array)

    an array of hashes containing the attributes for all configuration templates



7
8
9
# File 'lib/templates.rb', line 7

def list_templates(org_id)
  self.make_api_call("/organizations/#{org_id}/configTemplates", 'GET')
end

#remove_template(org_id, template_id) ⇒ Integer

Remove a single configuration template

Parameters:

  • org_id (String)

    organization ID where that we want to remove the templates from

  • template_id (String)

    the template ID we want to delete

Returns:

  • (Integer)

    HTTP code



15
16
17
# File 'lib/templates.rb', line 15

def remove_template(org_id, template_id)
  self.make_api_call("/organizations/#{org_id}/configTemplates/#{template_id}", 'DELETE')
end