Module: Organizations
- Included in:
- DashboardAPI
- Defined in:
- lib/organizations.rb
Overview
Organization section of the Meraki Dashboard API
Instance Method Summary collapse
-
#claim(org_id, options) ⇒ Integer
Claim something.
-
#clone_organization(source_org_id, options) ⇒ Hash
Clone an organization.
-
#create_organization(options) ⇒ Hash
Create a new organization.
-
#get_inventory(org_id) ⇒ Array
Returns the current inventory for an organization.
-
#get_license_state(org_id) ⇒ Hash
Returns the current license state for a given organization.
-
#get_organization(org_id) ⇒ Hash
Returns information about an organization.
-
#get_snmp_settings(org_id) ⇒ Hash
Returns the current SNMP status for an organization.
-
#get_third_party_peers(org_id) ⇒ Array
Returns the configurations for an organizations 3rd party VPN peers.
-
#list_all_organizations ⇒ Array
Returns all organizations a user is an administrator on.
-
#update_organization(org_id, options) ⇒ Hash
Update an organization.
-
#update_snmp_settings(org_id, options) ⇒ Hash
Updates the current SNMP status for an organization.
-
#update_third_party_peers(org_id, options) ⇒ Array
Updates your third party peers.
Instance Method Details
#claim(org_id, options) ⇒ Integer
Claim something
105 106 107 108 109 |
# File 'lib/organizations.rb', line 105 def claim(org_id, ) raise 'Options were not passed as a Hash' if !.is_a?(Hash) self.make_api_call("/organizations/#{org_id}/claim", 'POST', ) end |
#clone_organization(source_org_id, options) ⇒ Hash
Clone an organization
93 94 95 96 97 |
# File 'lib/organizations.rb', line 93 def clone_organization(source_org_id, ) raise 'Options were not passed as a Hash' if !.is_a?(Hash) self.make_api_call("/organizations/#{source_org_id}/clone", 'POST', ) end |
#create_organization(options) ⇒ Hash
Create a new organization
83 84 85 86 87 |
# File 'lib/organizations.rb', line 83 def create_organization() raise 'Options were not passed as a Hash' if !.is_a?(Hash) self.make_api_call("/organizations", 'POST', ) end |
#get_inventory(org_id) ⇒ Array
Returns the current inventory for an organization
21 22 23 |
# File 'lib/organizations.rb', line 21 def get_inventory(org_id) self.make_api_call("/organizations/#{org_id}/inventory", 'GET') end |
#get_license_state(org_id) ⇒ Hash
Returns the current license state for a given organization
14 15 16 |
# File 'lib/organizations.rb', line 14 def get_license_state(org_id) self.make_api_call("/organizations/#{org_id}/licenseState", 'GET') end |
#get_organization(org_id) ⇒ Hash
Returns information about an organization
7 8 9 |
# File 'lib/organizations.rb', line 7 def get_organization(org_id) self.make_api_call("/organizations/#{org_id}", 'GET') end |
#get_snmp_settings(org_id) ⇒ Hash
Returns the current SNMP status for an organization
28 29 30 |
# File 'lib/organizations.rb', line 28 def get_snmp_settings(org_id) self.make_api_call("/organizations/#{org_id}/snmp", 'GET') end |
#get_third_party_peers(org_id) ⇒ Array
Returns the configurations for an organizations 3rd party VPN peers
49 50 51 |
# File 'lib/organizations.rb', line 49 def get_third_party_peers(org_id) self.make_api_call("/organizations/#{org_id}/thirdPartyVPNPeers", 'GET') end |
#list_all_organizations ⇒ Array
Returns all organizations a user is an administrator on
66 67 68 |
# File 'lib/organizations.rb', line 66 def list_all_organizations self.make_api_call("/organizations", 'GET') end |
#update_organization(org_id, options) ⇒ Hash
Update an organization
74 75 76 77 78 |
# File 'lib/organizations.rb', line 74 def update_organization(org_id, ) raise 'Options were not passed as a Hash' if !.is_a?(Hash) self.make_api_call("/organizations/#{org_id}", 'PUT', ) end |
#update_snmp_settings(org_id, options) ⇒ Hash
Updates the current SNMP status for an organization
38 39 40 41 42 43 |
# File 'lib/organizations.rb', line 38 def update_snmp_settings(org_id, ) raise 'Options were not passed as a Hash' if !.is_a?(Hash) self.make_api_call("/organizations/#{org_id}/snmp", 'PUT', ) end |
#update_third_party_peers(org_id, options) ⇒ Array
Updates your third party peers
58 59 60 61 62 |
# File 'lib/organizations.rb', line 58 def update_third_party_peers(org_id, ) raise 'Options were not passed as an Array' if !.is_a?(Array) self.make_api_call("/organizations/#{org_id}/thirdPartyVPNPeers", 'PUT', ) end |