Class: CtdDocumentation::InsightsController
- Inherits:
-
BaseController
- Object
- BaseController
- CtdDocumentation::InsightsController
- Defined in:
- lib/ctd_documentation/controllers/insights_controller.rb
Overview
InsightsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#get_insight_details_by_name(insight_name, format: 'insight_page', page: 1, per_page: 10, site_id__exact: 1, ghost__exact: false, special_hint__exact: nil, insight_status__exact: nil) ⇒ void
In order to retrieve all the assets associated with a specific Insight: Step 2 (Step1 is in ‘Get Insights Summary’ endpoint): 1.
-
#get_insights_summary(format, sort, content_type, page: 1, per_page: 50, site_id__exact: 1, ghost__exact: false, special_hint__exact: nil, insight_status__exact: nil) ⇒ void
In order to retrieve all the assets associated with a specific Insight Step 1: 1.
Methods inherited from BaseController
#initialize, #new_api_call_builder, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from CtdDocumentation::BaseController
Instance Method Details
#get_insight_details_by_name(insight_name, format: 'insight_page', page: 1, per_page: 10, site_id__exact: 1, ghost__exact: false, special_hint__exact: nil, insight_status__exact: nil) ⇒ void
This method returns an undefined value.
In order to retrieve all the assets associated with a specific Insight: Step 2 (Step1 is in ‘Get Insights Summary’ endpoint):
-
Enter (paste) the insight name from above into the insight_name field
-
Apply the relevant site number in the site_id__exact field
-
Click Execute
-
From the Response Body, Select the FILTER_KEY
-
Copy the string of the FILTER_KEY
-
Find further instructions in /ranger/assets
per page Site related to the Insight not this is a ghost asset: TRUE = Ghost Example: The status of the Insight associated with this Asset – this is a dropdown for choosing the integer type: 0 = Open 1 = Hidden 2 = Completed
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/ctd_documentation/controllers/insights_controller.rb', line 84 def get_insight_details_by_name(insight_name, format: 'insight_page', page: 1, per_page: 10, site_id__exact: 1, ghost__exact: false, special_hint__exact: nil, insight_status__exact: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::GET, '/ranger/insight_details/{insight_name}', Server::DEFAULT) .template_param(new_parameter(insight_name, key: 'insight_name') .should_encode(true)) .query_param(new_parameter(format, key: 'format')) .query_param(new_parameter(page, key: 'page')) .query_param(new_parameter(per_page, key: 'per_page')) .query_param(new_parameter(site_id__exact, key: 'site_id__exact')) .query_param(new_parameter(ghost__exact, key: 'ghost__exact')) .query_param(new_parameter(special_hint__exact, key: 'special_hint__exact')) .query_param(new_parameter(insight_status__exact, key: 'insight_status__exact')) .auth(Single.new('global'))) .response(new_response_handler .is_response_void(true)) .execute end |
#get_insights_summary(format, sort, content_type, page: 1, per_page: 50, site_id__exact: 1, ghost__exact: false, special_hint__exact: nil, insight_status__exact: nil) ⇒ void
This method returns an undefined value.
In order to retrieve all the assets associated with a specific Insight Step 1:
-
Apply the relevant site number in the site_id__exact field
-
Click “Try It Out”
-
From the Response body, select the insight of interest, e.g. Assets
Accessed SMB shares
-
Copy the string of the insight name e.g. “Assets Accessed SMB shares”
-
Find further instructions in ‘Get Insight Details by Name’ API endpoint
per page Site related to the Insight not this is a ghost asset: TRUE = Ghost Example: The status of the Insight associated with this Asset – this is a dropdown for choosing the integer type: 0 = Open 1 = Hidden 2 = Completed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/ctd_documentation/controllers/insights_controller.rb', line 33 def get_insights_summary(format, sort, content_type, page: 1, per_page: 50, site_id__exact: 1, ghost__exact: false, special_hint__exact: nil, insight_status__exact: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::GET, '/ranger/insights_summary', Server::DEFAULT) .query_param(new_parameter(format, key: 'format')) .query_param(new_parameter(sort, key: 'sort')) .header_param(new_parameter(content_type, key: 'Content-Type')) .query_param(new_parameter(page, key: 'page')) .query_param(new_parameter(per_page, key: 'per_page')) .query_param(new_parameter(site_id__exact, key: 'site_id__exact')) .query_param(new_parameter(ghost__exact, key: 'ghost__exact')) .query_param(new_parameter(special_hint__exact, key: 'special_hint__exact')) .query_param(new_parameter(insight_status__exact, key: 'insight_status__exact')) .auth(Single.new('global'))) .response(new_response_handler .is_response_void(true)) .execute end |