Class: Falcon::Alerts

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/api/alerts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ Alerts

Returns a new instance of Alerts.



35
36
37
# File 'lib/crimson-falcon/api/alerts.rb', line 35

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



33
34
35
# File 'lib/crimson-falcon/api/alerts.rb', line 33

def api_client
  @api_client
end

Instance Method Details

#get_queries_alerts_v1(opts = {}) ⇒ DetectsapiAlertQueryResponse

Deprecated: please use version v2 of this endpoint. Retrieves all Alerts ids that match a given query.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results.

  • :limit (Integer)

    The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results.

  • :sort (String)

    Sort parameter takes the form <field|direction>. Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering

  • :filter (String)

    Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform … Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique … Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp… All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](falcon.crowdstrike.com/documentation/45/falcon-query-language-fql).

  • :q (String)

    Search all alert metadata for the provided string

Returns:



46
47
48
49
# File 'lib/crimson-falcon/api/alerts.rb', line 46

def get_queries_alerts_v1(opts = {})
  data, _status_code, _headers = get_queries_alerts_v1_with_http_info(opts)
  data
end

#get_queries_alerts_v1_with_http_info(opts = {}) ⇒ Array<(DetectsapiAlertQueryResponse, Integer, Hash)>

Deprecated: please use version v2 of this endpoint. Retrieves all Alerts ids that match a given query.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :offset (Integer)

    The first detection to return, where &#x60;0&#x60; is the latest detection. Use with the &#x60;offset&#x60; parameter to manage pagination of results.

  • :limit (Integer)

    The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the &#x60;offset&#x60; parameter to manage pagination of the results.

  • :sort (String)

    Sort parameter takes the form &lt;field|direction&gt;. Direction can be either &#x60;asc&#x60; (ascending) or &#x60;desc&#x60; (descending) order. For example: &#x60;status|asc&#x60; or &#x60;status|desc&#x60;. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering

  • :filter (String)

    Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard &#x60;*&#x60; includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform … Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique … Most commonly filter fields that supports range comparisons (&gt;, &lt;, &gt;&#x3D;, &lt;&#x3D;): severity, created_timestamp, timestamp, updated_timestamp… All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](falcon.crowdstrike.com/documentation/45/falcon-query-language-fql).

  • :q (String)

    Search all alert metadata for the provided string

Returns:



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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
110
111
112
113
114
# File 'lib/crimson-falcon/api/alerts.rb', line 59

def get_queries_alerts_v1_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Alerts.get_queries_alerts_v1 ...'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling Alerts.get_queries_alerts_v1, must be smaller than or equal to 10000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling Alerts.get_queries_alerts_v1, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/alerts/queries/alerts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DetectsapiAlertQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Alerts.get_queries_alerts_v1",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Alerts#get_queries_alerts_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_queries_alerts_v2(opts = {}) ⇒ DetectsapiAlertQueryResponse

Retrieves all Alerts ids that match a given query.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_hidden (Boolean)

    allows previously hidden alerts to be retrieved (default to true)

  • :offset (Integer)

    The first detection to return, where &#x60;0&#x60; is the latest detection. Use with the &#x60;offset&#x60; parameter to manage pagination of results.

  • :limit (Integer)

    The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the &#x60;offset&#x60; parameter to manage pagination of the results.

  • :sort (String)

    Sort parameter takes the form &lt;field|direction&gt;. Direction can be either &#x60;asc&#x60; (ascending) or &#x60;desc&#x60; (descending) order. For example: &#x60;status|asc&#x60; or &#x60;status|desc&#x60;. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering

  • :filter (String)

    Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard &#x60;*&#x60; includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform … Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique … Most commonly filter fields that supports range comparisons (&gt;, &lt;, &gt;&#x3D;, &lt;&#x3D;): severity, created_timestamp, timestamp, updated_timestamp… All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](falcon.crowdstrike.com/documentation/45/falcon-query-language-fql).

  • :q (String)

    Search all alert metadata for the provided string

Returns:



125
126
127
128
# File 'lib/crimson-falcon/api/alerts.rb', line 125

def get_queries_alerts_v2(opts = {})
  data, _status_code, _headers = get_queries_alerts_v2_with_http_info(opts)
  data
end

#get_queries_alerts_v2_with_http_info(opts = {}) ⇒ Array<(DetectsapiAlertQueryResponse, Integer, Hash)>

Retrieves all Alerts ids that match a given query.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_hidden (Boolean)

    allows previously hidden alerts to be retrieved (default to true)

  • :offset (Integer)

    The first detection to return, where &#x60;0&#x60; is the latest detection. Use with the &#x60;offset&#x60; parameter to manage pagination of results.

  • :limit (Integer)

    The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the &#x60;offset&#x60; parameter to manage pagination of the results.

  • :sort (String)

    Sort parameter takes the form &lt;field|direction&gt;. Direction can be either &#x60;asc&#x60; (ascending) or &#x60;desc&#x60; (descending) order. For example: &#x60;status|asc&#x60; or &#x60;status|desc&#x60;. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering

  • :filter (String)

    Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard &#x60;*&#x60; includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform … Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique … Most commonly filter fields that supports range comparisons (&gt;, &lt;, &gt;&#x3D;, &lt;&#x3D;): severity, created_timestamp, timestamp, updated_timestamp… All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](falcon.crowdstrike.com/documentation/45/falcon-query-language-fql).

  • :q (String)

    Search all alert metadata for the provided string

Returns:



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/crimson-falcon/api/alerts.rb', line 139

def get_queries_alerts_v2_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Alerts.get_queries_alerts_v2 ...'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling Alerts.get_queries_alerts_v2, must be smaller than or equal to 10000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling Alerts.get_queries_alerts_v2, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/alerts/queries/alerts/v2'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include_hidden'] = opts[:'include_hidden'] if !opts[:'include_hidden'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'DetectsapiAlertQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Alerts.get_queries_alerts_v2",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Alerts#get_queries_alerts_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_entities_alerts_v2(body, opts = {}) ⇒ DetectsapiResponseFields

Deprecated: Please use version v3 of this endpoint. Perform actions on Alerts identified by composite ID(s) in request. Each action has a name and a description which describes what the action does. If a request adds and removes tag in a single request, the order of processing would be to remove tags before adding new ones in.

Parameters:

  • body (DetectsapiPatchEntitiesAlertsV2Request)

    &#x60;ids&#x60; - IDs of Alerts to modify. &#x60;action_parameters&#x60; values - &#x60;assign_to_uuid&#x60; - Assign Alert to user UUID, such as &#x60;00000000-0000-0000-0000-000000000000&#x60; - &#x60;assign_to_user_id&#x60; - Assign Alert to user ID, such as &#x60;user@example.com&#x60; - &#x60;assign_to_name&#x60; - Assign Alert to username, such as &#x60;John Doe&#x60; - &#x60;unassign&#x60; - Unassign Alert clears out the assigned user UUID, user ID, and username. - &#x60;add_tag&#x60; - Add a tag to the Alert. - &#x60;remove_tag&#x60; - Remove a tag from the Alert. - &#x60;remove_tags_by_prefix&#x60; - Remove tags from the Alert based on the prefix. - &#x60;append_comment&#x60; - Comments are displayed with the Alert in Falcon and are usually used to provide context or notes for other Falcon users. An Alert can have multiple comments over time. - &#x60;update_status&#x60; values - &#x60;new&#x60; - &#x60;in_progress&#x60; - &#x60;reopened&#x60; - &#x60;closed&#x60; - &#x60;show_in_ui&#x60; values - &#x60;true&#x60;: This alert is displayed in Falcon - &#x60;false&#x60;: This alert is not displayed in Falcon.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



201
202
203
204
# File 'lib/crimson-falcon/api/alerts.rb', line 201

def patch_entities_alerts_v2(body, opts = {})
  data, _status_code, _headers = patch_entities_alerts_v2_with_http_info(body, opts)
  data
end

#patch_entities_alerts_v2_with_http_info(body, opts = {}) ⇒ Array<(DetectsapiResponseFields, Integer, Hash)>

Deprecated: Please use version v3 of this endpoint. Perform actions on Alerts identified by composite ID(s) in request. Each action has a name and a description which describes what the action does. If a request adds and removes tag in a single request, the order of processing would be to remove tags before adding new ones in.

Parameters:

  • body (DetectsapiPatchEntitiesAlertsV2Request)

    &#x60;ids&#x60; - IDs of Alerts to modify. &#x60;action_parameters&#x60; values - &#x60;assign_to_uuid&#x60; - Assign Alert to user UUID, such as &#x60;00000000-0000-0000-0000-000000000000&#x60; - &#x60;assign_to_user_id&#x60; - Assign Alert to user ID, such as &#x60;user@example.com&#x60; - &#x60;assign_to_name&#x60; - Assign Alert to username, such as &#x60;John Doe&#x60; - &#x60;unassign&#x60; - Unassign Alert clears out the assigned user UUID, user ID, and username. - &#x60;add_tag&#x60; - Add a tag to the Alert. - &#x60;remove_tag&#x60; - Remove a tag from the Alert. - &#x60;remove_tags_by_prefix&#x60; - Remove tags from the Alert based on the prefix. - &#x60;append_comment&#x60; - Comments are displayed with the Alert in Falcon and are usually used to provide context or notes for other Falcon users. An Alert can have multiple comments over time. - &#x60;update_status&#x60; values - &#x60;new&#x60; - &#x60;in_progress&#x60; - &#x60;reopened&#x60; - &#x60;closed&#x60; - &#x60;show_in_ui&#x60; values - &#x60;true&#x60;: This alert is displayed in Falcon - &#x60;false&#x60;: This alert is not displayed in Falcon.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DetectsapiResponseFields, Integer, Hash)>)

    DetectsapiResponseFields data, response status code and response headers



210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/crimson-falcon/api/alerts.rb', line 210

def patch_entities_alerts_v2_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Alerts.patch_entities_alerts_v2 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Alerts.patch_entities_alerts_v2"
  end
  # resource path
  local_var_path = '/alerts/entities/alerts/v2'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DetectsapiResponseFields'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Alerts.patch_entities_alerts_v2",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Alerts#patch_entities_alerts_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_entities_alerts_v3(body, opts = {}) ⇒ DetectsapiResponseFields

Perform actions on Alerts identified by composite ID(s) in request. Each action has a name and a description which describes what the action does. If a request adds and removes tag in a single request, the order of processing would be to remove tags before adding new ones in.

Parameters:

  • body (DetectsapiPatchEntitiesAlertsV3Request)

    &#x60;composite_ids&#x60; - CompositeIDs of Alerts to modify. &#x60;action_parameters&#x60; values - &#x60;assign_to_uuid&#x60; - Assign Alert to user UUID, such as &#x60;00000000-0000-0000-0000-000000000000&#x60; - &#x60;assign_to_user_id&#x60; - Assign Alert to user ID, such as &#x60;user@example.com&#x60; - &#x60;assign_to_name&#x60; - Assign Alert to username, such as &#x60;John Doe&#x60; - &#x60;unassign&#x60; - Unassign Alert clears out the assigned user UUID, user ID, and username. - &#x60;add_tag&#x60; - Add a tag to the Alert. - &#x60;remove_tag&#x60; - Remove a tag from the Alert. - &#x60;remove_tags_by_prefix&#x60; - Remove tags from the Alert based on the prefix. - &#x60;append_comment&#x60; - Comments are displayed with the Alert in Falcon and are usually used to provide context or notes for other Falcon users. An Alert can have multiple comments over time. - &#x60;update_status&#x60; values - &#x60;new&#x60; - &#x60;in_progress&#x60; - &#x60;reopened&#x60; - &#x60;closed&#x60; - &#x60;show_in_ui&#x60; values - &#x60;true&#x60;: This alert is displayed in Falcon - &#x60;false&#x60;: This alert is not displayed in Falcon.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_hidden (Boolean)

    allows previously hidden alerts to be retrieved (default to true)

Returns:



268
269
270
271
# File 'lib/crimson-falcon/api/alerts.rb', line 268

def patch_entities_alerts_v3(body, opts = {})
  data, _status_code, _headers = patch_entities_alerts_v3_with_http_info(body, opts)
  data
end

#patch_entities_alerts_v3_with_http_info(body, opts = {}) ⇒ Array<(DetectsapiResponseFields, Integer, Hash)>

Perform actions on Alerts identified by composite ID(s) in request. Each action has a name and a description which describes what the action does. If a request adds and removes tag in a single request, the order of processing would be to remove tags before adding new ones in.

Parameters:

  • body (DetectsapiPatchEntitiesAlertsV3Request)

    &#x60;composite_ids&#x60; - CompositeIDs of Alerts to modify. &#x60;action_parameters&#x60; values - &#x60;assign_to_uuid&#x60; - Assign Alert to user UUID, such as &#x60;00000000-0000-0000-0000-000000000000&#x60; - &#x60;assign_to_user_id&#x60; - Assign Alert to user ID, such as &#x60;user@example.com&#x60; - &#x60;assign_to_name&#x60; - Assign Alert to username, such as &#x60;John Doe&#x60; - &#x60;unassign&#x60; - Unassign Alert clears out the assigned user UUID, user ID, and username. - &#x60;add_tag&#x60; - Add a tag to the Alert. - &#x60;remove_tag&#x60; - Remove a tag from the Alert. - &#x60;remove_tags_by_prefix&#x60; - Remove tags from the Alert based on the prefix. - &#x60;append_comment&#x60; - Comments are displayed with the Alert in Falcon and are usually used to provide context or notes for other Falcon users. An Alert can have multiple comments over time. - &#x60;update_status&#x60; values - &#x60;new&#x60; - &#x60;in_progress&#x60; - &#x60;reopened&#x60; - &#x60;closed&#x60; - &#x60;show_in_ui&#x60; values - &#x60;true&#x60;: This alert is displayed in Falcon - &#x60;false&#x60;: This alert is not displayed in Falcon.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_hidden (Boolean)

    allows previously hidden alerts to be retrieved (default to true)

Returns:

  • (Array<(DetectsapiResponseFields, Integer, Hash)>)

    DetectsapiResponseFields data, response status code and response headers



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/crimson-falcon/api/alerts.rb', line 278

def patch_entities_alerts_v3_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Alerts.patch_entities_alerts_v3 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Alerts.patch_entities_alerts_v3"
  end
  # resource path
  local_var_path = '/alerts/entities/alerts/v3'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include_hidden'] = opts[:'include_hidden'] if !opts[:'include_hidden'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DetectsapiResponseFields'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Alerts.patch_entities_alerts_v3",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Alerts#patch_entities_alerts_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_aggregates_alerts_v1(body, opts = {}) ⇒ DetectsapiAggregatesResponse

Deprecated: Please use version v2 of this endpoint. Retrieves aggregate values for Alerts across all CIDs.

Parameters:

Returns:



336
337
338
339
# File 'lib/crimson-falcon/api/alerts.rb', line 336

def post_aggregates_alerts_v1(body, opts = {})
  data, _status_code, _headers = post_aggregates_alerts_v1_with_http_info(body, opts)
  data
end

#post_aggregates_alerts_v1_with_http_info(body, opts = {}) ⇒ Array<(DetectsapiAggregatesResponse, Integer, Hash)>

Deprecated: Please use version v2 of this endpoint. Retrieves aggregate values for Alerts across all CIDs.

Parameters:

Returns:



345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/crimson-falcon/api/alerts.rb', line 345

def post_aggregates_alerts_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Alerts.post_aggregates_alerts_v1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Alerts.post_aggregates_alerts_v1"
  end
  # resource path
  local_var_path = '/alerts/aggregates/alerts/v1'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DetectsapiAggregatesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Alerts.post_aggregates_alerts_v1",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Alerts#post_aggregates_alerts_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_aggregates_alerts_v2(body, opts = {}) ⇒ DetectsapiAggregatesResponse

Retrieves aggregate values for Alerts across all CIDs.

Parameters:

Options Hash (opts):

  • :include_hidden (Boolean)

    allows previously hidden alerts to be retrieved (default to true)

Returns:



403
404
405
406
# File 'lib/crimson-falcon/api/alerts.rb', line 403

def post_aggregates_alerts_v2(body, opts = {})
  data, _status_code, _headers = post_aggregates_alerts_v2_with_http_info(body, opts)
  data
end

#post_aggregates_alerts_v2_with_http_info(body, opts = {}) ⇒ Array<(DetectsapiAggregatesResponse, Integer, Hash)>

Retrieves aggregate values for Alerts across all CIDs.

Parameters:

Options Hash (opts):

  • :include_hidden (Boolean)

    allows previously hidden alerts to be retrieved (default to true)

Returns:



413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/crimson-falcon/api/alerts.rb', line 413

def post_aggregates_alerts_v2_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Alerts.post_aggregates_alerts_v2 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Alerts.post_aggregates_alerts_v2"
  end
  # resource path
  local_var_path = '/alerts/aggregates/alerts/v2'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include_hidden'] = opts[:'include_hidden'] if !opts[:'include_hidden'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DetectsapiAggregatesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Alerts.post_aggregates_alerts_v2",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Alerts#post_aggregates_alerts_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_combined_alerts_v1(body, opts = {}) ⇒ DetectsapiPostCombinedAlertsV1ResponseSwagger

Retrieves all Alerts that match a particular FQL filter. This API is intended for retrieval of large amounts of Alerts(>10k) using a pagination based on a ‘after` token. If you need to use `offset` pagination, consider using GET /alerts/queries/alerts/* and POST /alerts/entities/alerts/* APIs.

Parameters:

  • body (DetectsapiPostCombinedAlertsV1RequestSwagger)

    &#x60;after&#x60; - The &#x60;after&#x60; token is used for pagination of results. The &#x60;after&#x60; token is present when more results are available on the next page. To retrieve all Alerts: - Use the &#x60;after&#x60; token in subsequent requests to fetch the next page. - Continue this process until you reach a page without an &#x60;after&#x60; token, indicating the last page. This value is highly dependant on the &#x60;sort&#x60; parameter, so if you plan to change the sort order, you will have to re-start your search from the first page (without &#x60;after&#x60; parameter). &#x60;filter&#x60; - Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard &#x60;*&#x60; includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform … Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique … Most commonly filter fields that supports range comparisons (&gt;, &lt;, &gt;&#x3D;, &lt;&#x3D;): severity, created_timestamp, timestamp, updated_timestamp… All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). &#x60;limit&#x60; - The maximum number of detections to return in this response (default: 100; max: 1000). Use this parameter together with the &#x60;after&#x60; parameter to manage pagination of the results. &#x60;sort&#x60; - Sort parameter takes the form of &#x60;&lt;field|direction&gt;&#x60;. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields for sorting are: timestamp, created_timestamp, updated_timestamp, status, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, tactic_id, tactic, technique, technique_id, pattern_id or product. By default all the results are sorted by the &#x60;created_timestamp&#x60; field in the descending order. Important: The pagination is done on live data in the order defined by the &#x60;sort&#x60; field parameter (default: &#x60;created_timestamp|desc&#x60;), so if you want to avoid inconsistent results where the same record might appear on multiple pages (or none), sort only on the fields that do not change over time (e.g. created_timestamp, composite_id, …).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



471
472
473
474
# File 'lib/crimson-falcon/api/alerts.rb', line 471

def post_combined_alerts_v1(body, opts = {})
  data, _status_code, _headers = post_combined_alerts_v1_with_http_info(body, opts)
  data
end

#post_combined_alerts_v1_with_http_info(body, opts = {}) ⇒ Array<(DetectsapiPostCombinedAlertsV1ResponseSwagger, Integer, Hash)>

Retrieves all Alerts that match a particular FQL filter. This API is intended for retrieval of large amounts of Alerts(&gt;10k) using a pagination based on a &#x60;after&#x60; token. If you need to use &#x60;offset&#x60; pagination, consider using GET /alerts/queries/alerts/* and POST /alerts/entities/alerts/* APIs.

Parameters:

  • body (DetectsapiPostCombinedAlertsV1RequestSwagger)

    &#x60;after&#x60; - The &#x60;after&#x60; token is used for pagination of results. The &#x60;after&#x60; token is present when more results are available on the next page. To retrieve all Alerts: - Use the &#x60;after&#x60; token in subsequent requests to fetch the next page. - Continue this process until you reach a page without an &#x60;after&#x60; token, indicating the last page. This value is highly dependant on the &#x60;sort&#x60; parameter, so if you plan to change the sort order, you will have to re-start your search from the first page (without &#x60;after&#x60; parameter). &#x60;filter&#x60; - Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard &#x60;*&#x60; includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform … Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique … Most commonly filter fields that supports range comparisons (&gt;, &lt;, &gt;&#x3D;, &lt;&#x3D;): severity, created_timestamp, timestamp, updated_timestamp… All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). &#x60;limit&#x60; - The maximum number of detections to return in this response (default: 100; max: 1000). Use this parameter together with the &#x60;after&#x60; parameter to manage pagination of the results. &#x60;sort&#x60; - Sort parameter takes the form of &#x60;&lt;field|direction&gt;&#x60;. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields for sorting are: timestamp, created_timestamp, updated_timestamp, status, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, tactic_id, tactic, technique, technique_id, pattern_id or product. By default all the results are sorted by the &#x60;created_timestamp&#x60; field in the descending order. Important: The pagination is done on live data in the order defined by the &#x60;sort&#x60; field parameter (default: &#x60;created_timestamp|desc&#x60;), so if you want to avoid inconsistent results where the same record might appear on multiple pages (or none), sort only on the fields that do not change over time (e.g. created_timestamp, composite_id, …).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/crimson-falcon/api/alerts.rb', line 480

def post_combined_alerts_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Alerts.post_combined_alerts_v1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Alerts.post_combined_alerts_v1"
  end
  # resource path
  local_var_path = '/alerts/combined/alerts/v1'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DetectsapiPostCombinedAlertsV1ResponseSwagger'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Alerts.post_combined_alerts_v1",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Alerts#post_combined_alerts_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_entities_alerts_v1(body, opts = {}) ⇒ DetectsapiPostEntitiesAlertsV1ResponseSwagger

Deprecated: please use version v2 of this endpoint. Retrieves all Alerts given their ids.

Parameters:

Returns:



537
538
539
540
# File 'lib/crimson-falcon/api/alerts.rb', line 537

def post_entities_alerts_v1(body, opts = {})
  data, _status_code, _headers = post_entities_alerts_v1_with_http_info(body, opts)
  data
end

#post_entities_alerts_v1_with_http_info(body, opts = {}) ⇒ Array<(DetectsapiPostEntitiesAlertsV1ResponseSwagger, Integer, Hash)>

Deprecated: please use version v2 of this endpoint. Retrieves all Alerts given their ids.

Parameters:

Returns:



546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
# File 'lib/crimson-falcon/api/alerts.rb', line 546

def post_entities_alerts_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Alerts.post_entities_alerts_v1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Alerts.post_entities_alerts_v1"
  end
  # resource path
  local_var_path = '/alerts/entities/alerts/v1'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DetectsapiPostEntitiesAlertsV1ResponseSwagger'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Alerts.post_entities_alerts_v1",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Alerts#post_entities_alerts_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_entities_alerts_v2(body, opts = {}) ⇒ DetectsapiPostEntitiesAlertsV2ResponseSwagger

Retrieves all Alerts given their composite ids.

Parameters:

Options Hash (opts):

  • :include_hidden (Boolean)

    allows previously hidden alerts to be retrieved (default to true)

Returns:



604
605
606
607
# File 'lib/crimson-falcon/api/alerts.rb', line 604

def post_entities_alerts_v2(body, opts = {})
  data, _status_code, _headers = post_entities_alerts_v2_with_http_info(body, opts)
  data
end

#post_entities_alerts_v2_with_http_info(body, opts = {}) ⇒ Array<(DetectsapiPostEntitiesAlertsV2ResponseSwagger, Integer, Hash)>

Retrieves all Alerts given their composite ids.

Parameters:

Options Hash (opts):

  • :include_hidden (Boolean)

    allows previously hidden alerts to be retrieved (default to true)

Returns:



614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
# File 'lib/crimson-falcon/api/alerts.rb', line 614

def post_entities_alerts_v2_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Alerts.post_entities_alerts_v2 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Alerts.post_entities_alerts_v2"
  end
  # resource path
  local_var_path = '/alerts/entities/alerts/v2'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include_hidden'] = opts[:'include_hidden'] if !opts[:'include_hidden'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'DetectsapiPostEntitiesAlertsV2ResponseSwagger'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"Alerts.post_entities_alerts_v2",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: Alerts#post_entities_alerts_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end