Module: Zanshin::SDK::Summaries
- Included in:
- Client
- Defined in:
- lib/zanshin/summaries.rb
Overview
Zanshin SDK Summary
Instance Method Summary collapse
-
#get_alert_summaries(organization_id, scan_target_ids = []) ⇒ Object
Gets a summary of the current state of alerts for an organization, both in total and broken down by scan target [#reference](api.zanshin.tenchisecurity.com/#operation/alertSummary).
-
#get_following_alert_summaries(organization_id, following_ids = []) ⇒ Object
Gets a summary of the current state of alerts for followed organizations [#reference](api.zanshin.tenchisecurity.com/#operation/alertFollowingSummary).
-
#get_following_scan_summaries(organization_id, following_ids = [], days = 7) ⇒ Object
Gets a summary of the current state of alerts for followed organizations [#reference](api.zanshin.tenchisecurity.com/#operation/scanSummaryFollowing).
-
#get_scan_summaries(organization_id, scan_target_ids = [], days = 7) ⇒ Object
Returns summaries of scan results over a period of time, summarizing number of alerts that changed states [#reference](api.zanshin.tenchisecurity.com/#operation/scanSummary).
Instance Method Details
#get_alert_summaries(organization_id, scan_target_ids = []) ⇒ Object
Gets a summary of the current state of alerts for an organization, both in total and broken down by scan target [#reference](api.zanshin.tenchisecurity.com/#operation/alertSummary)
18 19 20 21 22 23 24 25 |
# File 'lib/zanshin/summaries.rb', line 18 def get_alert_summaries(organization_id, scan_target_ids = []) body = { 'organizationId' => validate_uuid(organization_id), 'scanTargetIds' => scan_target_ids.each { |scan_target_id| validate_uuid(scan_target_id) } } @http.request('POST', '/alerts/summaries', body) end |
#get_following_alert_summaries(organization_id, following_ids = []) ⇒ Object
Gets a summary of the current state of alerts for followed organizations [#reference](api.zanshin.tenchisecurity.com/#operation/alertFollowingSummary)
34 35 36 37 38 39 40 41 |
# File 'lib/zanshin/summaries.rb', line 34 def get_following_alert_summaries(organization_id, following_ids = []) body = { 'organizationId' => validate_uuid(organization_id), 'followingIds' => following_ids.each { |following_id| validate_uuid(following_id) } } @http.request('POST', '/alerts/summaries/following', body) end |
#get_following_scan_summaries(organization_id, following_ids = [], days = 7) ⇒ Object
Gets a summary of the current state of alerts for followed organizations [#reference](api.zanshin.tenchisecurity.com/#operation/scanSummaryFollowing)
69 70 71 72 73 74 75 76 77 |
# File 'lib/zanshin/summaries.rb', line 69 def get_following_scan_summaries(organization_id, following_ids = [], days = 7) body = { 'organizationId' => validate_uuid(organization_id), 'followingIds' => following_ids.each { |following_id| validate_uuid(following_id) }, 'daysBefore' => days } @http.request('POST', '/alerts/summaries/scans/following', body) end |
#get_scan_summaries(organization_id, scan_target_ids = [], days = 7) ⇒ Object
Returns summaries of scan results over a period of time, summarizing number of alerts that changed states [#reference](api.zanshin.tenchisecurity.com/#operation/scanSummary)
51 52 53 54 55 56 57 58 59 |
# File 'lib/zanshin/summaries.rb', line 51 def get_scan_summaries(organization_id, scan_target_ids = [], days = 7) body = { 'organizationId' => validate_uuid(organization_id), 'scanTargetIds' => scan_target_ids.each { |scan_target_id| validate_uuid(scan_target_id) }, 'daysBefore' => days } @http.request('POST', '/alerts/summaries/scans', body) end |