Module: Admins
- Included in:
- DashboardAPI
- Defined in:
- lib/admins.rb
Overview
Admins section of the Meraki Dashboard API
Instance Method Summary collapse
-
#add_admin(org_id, options) ⇒ Object
Add an admin to a specific org.
-
#list_admins(org_id) ⇒ Array
List all of the administrators for a given org.
-
#revoke_admin(org_id, admin_id) ⇒ Integer
Revoke an administrator for a specific org.
-
#update_admin(org_id, admin_id, options) ⇒ Object
Update an administrator for a specific org.
Instance Method Details
#add_admin(org_id, options) ⇒ Object
Add an admin to a specific org
15 16 17 18 |
# File 'lib/admins.rb', line 15 def add_admin(org_id, ) # self.make_api_call("/organizations/#{org_id}/admins", 'POST', ) end |
#list_admins(org_id) ⇒ Array
List all of the administrators for a given org
7 8 9 |
# File 'lib/admins.rb', line 7 def list_admins(org_id) self.make_api_call("/organizations/#{org_id}/admins", 'GET') end |
#revoke_admin(org_id, admin_id) ⇒ Integer
Revoke an administrator for a specific org
34 35 36 |
# File 'lib/admins.rb', line 34 def revoke_admin(org_id, admin_id) self.make_api_call("/organizations/#{org_id}/admins/#{admin_id}", 'DELETE') end |
#update_admin(org_id, admin_id, options) ⇒ Object
Update an administrator for a specific org
25 26 27 28 |
# File 'lib/admins.rb', line 25 def update_admin(org_id, admin_id, ) # self.make_api_call("/organizations/#{org_id}/admins/#{admin_id}", 'PUT', ) end |