Class: MistApi::MSPsInventory
- Inherits:
-
BaseController
- Object
- BaseController
- MistApi::MSPsInventory
- Defined in:
- lib/mist_api/controllers/ms_ps_inventory.rb
Overview
MSPsInventory
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#get_msp_inventory_by_mac(msp_id, device_mac) ⇒ ApiResponse
Get Inventory By device MAC address here here.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from MistApi::BaseController
Instance Method Details
#get_msp_inventory_by_mac(msp_id, device_mac) ⇒ ApiResponse
Get Inventory By device MAC address here here
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/mist_api/controllers/ms_ps_inventory.rb', line 15 def get_msp_inventory_by_mac(msp_id, device_mac) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/api/v1/msps/{msp_id}/inventory/{device_mac}', Server::API_HOST) .template_param(new_parameter(msp_id, key: 'msp_id') .should_encode(true)) .template_param(new_parameter(device_mac, key: 'device_mac') .should_encode(true)) .auth(Or.new('apiToken', 'basicAuth', And.new('basicAuth', 'csrfToken')))) .response(new_response_handler .is_nullify404(true) .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(ResponseMspInventoryDevice.method(:from_hash)) .is_api_response(true) .local_error('400', 'Bad Syntax', APIException) .local_error('401', 'Unauthorized', APIException) .local_error('403', 'Permission Denied', APIException) .local_error('404', 'Not found. The API endpoint doesn’t exist or resource doesn’ t'\ ' exist', APIException) .local_error('429', 'Too Many Request. The API Token used for the request reached'\ ' the 5000 API Calls per hour threshold', APIException)) .execute end |