Class: Falcon::RealTimeResponseAdmin

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ RealTimeResponseAdmin

Returns a new instance of RealTimeResponseAdmin.



35
36
37
# File 'lib/crimson-falcon/api/real_time_response_admin.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/real_time_response_admin.rb', line 33

def api_client
  @api_client
end

Instance Method Details

#batch_admin_cmd(body, opts = {}) ⇒ DomainMultiCommandExecuteResponseWrapper

Batch executes a RTR administrator command across the hosts mapped to the given batch ID.

Parameters:

  • body (DomainBatchExecuteCommandRequest)

    Use this endpoint to run these [real time response commands](falcon.crowdstrike.com/documentation/page/b8c1738c/real-time-response-and-network-containment#k893b7c0): - `cat` - `cd` - `clear` - `cp` - `encrypt` - `env` - `eventlog` - `filehash` - `get` - `getsid` - `help` - `history` - `ipconfig` - `kill` - `ls` - `map` - `memdump` - `mkdir` - `mount` - `mv` - `netstat` - `ps` - `put` - `reg query` - `reg set` - `reg delete` - `reg load` - `reg unload` - `restart` - `rm` - `run` - `runscript` - `shutdown` - `unmap` - `update history` - `update install` - `update list` - `update query` - `xmemdump` - `zip` **`base_command`** Active-Responder command type we are going to execute, for example: `get` or `cp`. Refer to the RTR documentation for the full list of commands. **`batch_id`** Batch ID to execute the command on. Received from `/real-time-response/combined/batch-init-session/v1`. **`command_string`** Full command string for the command. For example `get some_file.txt` **`optional_hosts`** List of a subset of hosts we want to run the command on. If this list is supplied, only these hosts will receive the command.

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

    the optional parameters

Options Hash (opts):

  • :timeout (Integer)

    Timeout for how long to wait for the request in seconds, default timeout is 30 seconds. Maximum is 5 minutes. (default to 30)

  • :timeout_duration (String)

    Timeout duration for how long to wait for the request in duration syntax. Example, `10s`. Valid units: `ns, us, ms, s, m, h`. Maximum is 5 minutes. (default to ‘30s’)

  • :host_timeout_duration (String)

    Timeout duration for how long a host has time to complete processing. Default value is a bit less than the overall timeout value. It cannot be greater than the overall request timeout. Maximum is < 5 minutes. Example, `10s`. Valid units: `ns, us, ms, s, m, h`. (default to ‘tiny bit less than overall request timeout’)

Returns:



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

def batch_admin_cmd(body, opts = {})
  data, _status_code, _headers = batch_admin_cmd_with_http_info(body, opts)
  data
end

#batch_admin_cmd_with_http_info(body, opts = {}) ⇒ Array<(DomainMultiCommandExecuteResponseWrapper, Integer, Hash)>

Batch executes a RTR administrator command across the hosts mapped to the given batch ID.

Parameters:

  • body (DomainBatchExecuteCommandRequest)

    Use this endpoint to run these [real time response commands](falcon.crowdstrike.com/documentation/page/b8c1738c/real-time-response-and-network-containment#k893b7c0): - &#x60;cat&#x60; - &#x60;cd&#x60; - &#x60;clear&#x60; - &#x60;cp&#x60; - &#x60;encrypt&#x60; - &#x60;env&#x60; - &#x60;eventlog&#x60; - &#x60;filehash&#x60; - &#x60;get&#x60; - &#x60;getsid&#x60; - &#x60;help&#x60; - &#x60;history&#x60; - &#x60;ipconfig&#x60; - &#x60;kill&#x60; - &#x60;ls&#x60; - &#x60;map&#x60; - &#x60;memdump&#x60; - &#x60;mkdir&#x60; - &#x60;mount&#x60; - &#x60;mv&#x60; - &#x60;netstat&#x60; - &#x60;ps&#x60; - &#x60;put&#x60; - &#x60;reg query&#x60; - &#x60;reg set&#x60; - &#x60;reg delete&#x60; - &#x60;reg load&#x60; - &#x60;reg unload&#x60; - &#x60;restart&#x60; - &#x60;rm&#x60; - &#x60;run&#x60; - &#x60;runscript&#x60; - &#x60;shutdown&#x60; - &#x60;unmap&#x60; - &#x60;update history&#x60; - &#x60;update install&#x60; - &#x60;update list&#x60; - &#x60;update query&#x60; - &#x60;xmemdump&#x60; - &#x60;zip&#x60; **&#x60;base_command&#x60;** Active-Responder command type we are going to execute, for example: &#x60;get&#x60; or &#x60;cp&#x60;. Refer to the RTR documentation for the full list of commands. **&#x60;batch_id&#x60;** Batch ID to execute the command on. Received from &#x60;/real-time-response/combined/batch-init-session/v1&#x60;. **&#x60;command_string&#x60;** Full command string for the command. For example &#x60;get some_file.txt&#x60; **&#x60;optional_hosts&#x60;** List of a subset of hosts we want to run the command on. If this list is supplied, only these hosts will receive the command.

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

    the optional parameters

Options Hash (opts):

  • :timeout (Integer)

    Timeout for how long to wait for the request in seconds, default timeout is 30 seconds. Maximum is 5 minutes. (default to 30)

  • :timeout_duration (String)

    Timeout duration for how long to wait for the request in duration syntax. Example, &#x60;10s&#x60;. Valid units: &#x60;ns, us, ms, s, m, h&#x60;. Maximum is 5 minutes. (default to ‘30s’)

  • :host_timeout_duration (String)

    Timeout duration for how long a host has time to complete processing. Default value is a bit less than the overall timeout value. It cannot be greater than the overall request timeout. Maximum is &lt; 5 minutes. Example, &#x60;10s&#x60;. Valid units: &#x60;ns, us, ms, s, m, h&#x60;. (default to ‘tiny bit less than overall request timeout’)

Returns:



57
58
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
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 57

def batch_admin_cmd_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.batch_admin_cmd ...'
  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 RealTimeResponseAdmin.batch_admin_cmd"
  end
  # resource path
  local_var_path = '/real-time-response/combined/batch-admin-command/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
  query_params[:'timeout_duration'] = opts[:'timeout_duration'] if !opts[:'timeout_duration'].nil?
  query_params[:'host_timeout_duration'] = opts[:'host_timeout_duration'] if !opts[:'host_timeout_duration'].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] || 'DomainMultiCommandExecuteResponseWrapper'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.batch_admin_cmd",
    :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: RealTimeResponseAdmin#batch_admin_cmd\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_check_admin_command_status(cloud_request_id, sequence_id, opts = {}) ⇒ DomainStatusResponseWrapper

Get status of an executed RTR administrator command on a single host.

Parameters:

  • cloud_request_id (String)

    Cloud Request ID of the executed command to query

  • sequence_id (Integer)

    Sequence ID that we want to retrieve. Command responses are chunked across sequences

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

    the optional parameters

Returns:



118
119
120
121
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 118

def r_tr_check_admin_command_status(cloud_request_id, sequence_id, opts = {})
  data, _status_code, _headers = r_tr_check_admin_command_status_with_http_info(cloud_request_id, sequence_id, opts)
  data
end

#r_tr_check_admin_command_status_with_http_info(cloud_request_id, sequence_id, opts = {}) ⇒ Array<(DomainStatusResponseWrapper, Integer, Hash)>

Get status of an executed RTR administrator command on a single host.

Parameters:

  • cloud_request_id (String)

    Cloud Request ID of the executed command to query

  • sequence_id (Integer)

    Sequence ID that we want to retrieve. Command responses are chunked across sequences

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

    the optional parameters

Returns:

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

    DomainStatusResponseWrapper data, response status code and response headers



128
129
130
131
132
133
134
135
136
137
138
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
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 128

def r_tr_check_admin_command_status_with_http_info(cloud_request_id, sequence_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_check_admin_command_status ...'
  end
  # verify the required parameter 'cloud_request_id' is set
  if @api_client.config.client_side_validation && cloud_request_id.nil?
    fail ArgumentError, "Missing the required parameter 'cloud_request_id' when calling RealTimeResponseAdmin.r_tr_check_admin_command_status"
  end
  # verify the required parameter 'sequence_id' is set
  if @api_client.config.client_side_validation && sequence_id.nil?
    fail ArgumentError, "Missing the required parameter 'sequence_id' when calling RealTimeResponseAdmin.r_tr_check_admin_command_status"
  end
  # resource path
  local_var_path = '/real-time-response/entities/admin-command/v1'

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

  # 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] || 'DomainStatusResponseWrapper'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_check_admin_command_status",
    :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: RealTimeResponseAdmin#r_tr_check_admin_command_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_create_put_files(file, description, opts = {}) ⇒ MsaReplyMetaOnly

Upload a new put-file to use for the RTR ‘put` command.

Parameters:

  • file (File)

    put-file to upload

  • description (String)

    File description

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

Returns:



189
190
191
192
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 189

def r_tr_create_put_files(file, description, opts = {})
  data, _status_code, _headers = r_tr_create_put_files_with_http_info(file, description, opts)
  data
end

#r_tr_create_put_files_v2(file, description, opts = {}) ⇒ EmpowerapiMsaPFResponseV2

Upload a new put-file to use for the RTR ‘put` command.

Parameters:

  • file (File)

    put-file to upload

  • description (String)

    File description

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

Returns:



277
278
279
280
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 277

def r_tr_create_put_files_v2(file, description, opts = {})
  data, _status_code, _headers = r_tr_create_put_files_v2_with_http_info(file, description, opts)
  data
end

#r_tr_create_put_files_v2_with_http_info(file, description, opts = {}) ⇒ Array<(EmpowerapiMsaPFResponseV2, Integer, Hash)>

Upload a new put-file to use for the RTR &#x60;put&#x60; command.

Parameters:

  • file (File)

    put-file to upload

  • description (String)

    File description

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

Returns:

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

    EmpowerapiMsaPFResponseV2 data, response status code and response headers



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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 289

def r_tr_create_put_files_v2_with_http_info(file, description, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_create_put_files_v2 ...'
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling RealTimeResponseAdmin.r_tr_create_put_files_v2"
  end
  # verify the required parameter 'description' is set
  if @api_client.config.client_side_validation && description.nil?
    fail ArgumentError, "Missing the required parameter 'description' when calling RealTimeResponseAdmin.r_tr_create_put_files_v2"
  end
  if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 32766
    fail ArgumentError, 'invalid value for "opts[:"name"]" when calling RealTimeResponseAdmin.r_tr_create_put_files_v2, the character length must be smaller than or equal to 32766.'
  end

  if @api_client.config.client_side_validation && !opts[:'comments_for_audit_log'].nil? && opts[:'comments_for_audit_log'].to_s.length > 4096
    fail ArgumentError, 'invalid value for "opts[:"comments_for_audit_log"]" when calling RealTimeResponseAdmin.r_tr_create_put_files_v2, the character length must be smaller than or equal to 4096.'
  end

  # resource path
  local_var_path = '/real-time-response/entities/put-files/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(['multipart/form-data'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['file'] = file
  form_params['description'] = description
  form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
  form_params['comments_for_audit_log'] = opts[:'comments_for_audit_log'] if !opts[:'comments_for_audit_log'].nil?

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

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

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_create_put_files_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: RealTimeResponseAdmin#r_tr_create_put_files_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_create_put_files_with_http_info(file, description, opts = {}) ⇒ Array<(MsaReplyMetaOnly, Integer, Hash)>

Upload a new put-file to use for the RTR &#x60;put&#x60; command.

Parameters:

  • file (File)

    put-file to upload

  • description (String)

    File description

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

    the optional parameters

Options Hash (opts):

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

Returns:

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

    MsaReplyMetaOnly data, response status code and response headers



201
202
203
204
205
206
207
208
209
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
262
263
264
265
266
267
268
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 201

def r_tr_create_put_files_with_http_info(file, description, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_create_put_files ...'
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling RealTimeResponseAdmin.r_tr_create_put_files"
  end
  # verify the required parameter 'description' is set
  if @api_client.config.client_side_validation && description.nil?
    fail ArgumentError, "Missing the required parameter 'description' when calling RealTimeResponseAdmin.r_tr_create_put_files"
  end
  if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 32766
    fail ArgumentError, 'invalid value for "opts[:"name"]" when calling RealTimeResponseAdmin.r_tr_create_put_files, the character length must be smaller than or equal to 32766.'
  end

  if @api_client.config.client_side_validation && !opts[:'comments_for_audit_log'].nil? && opts[:'comments_for_audit_log'].to_s.length > 4096
    fail ArgumentError, 'invalid value for "opts[:"comments_for_audit_log"]" when calling RealTimeResponseAdmin.r_tr_create_put_files, the character length must be smaller than or equal to 4096.'
  end

  # resource path
  local_var_path = '/real-time-response/entities/put-files/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(['multipart/form-data'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['file'] = file
  form_params['description'] = description
  form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
  form_params['comments_for_audit_log'] = opts[:'comments_for_audit_log'] if !opts[:'comments_for_audit_log'].nil?

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

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

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_create_put_files",
    :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: RealTimeResponseAdmin#r_tr_create_put_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_create_scripts(description, permission_type, opts = {}) ⇒ MsaReplyMetaOnly

Upload a new custom-script to use for the RTR ‘runscript` command.

Parameters:

  • description (String)

    File description

  • permission_type (String)

    Permission for the custom-script. Valid permission values: - &#x60;private&#x60;, usable by only the user who uploaded it - &#x60;group&#x60;, usable by all RTR Admins - &#x60;public&#x60;, usable by all active-responders and RTR admins

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    custom-script file to upload. These should be powershell scripts.

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

  • :content (String)

    The script text that you want to use to upload

  • :platform (Array<String>)

    Platforms for the file. Currently supports: windows, mac, linux, . If no platform is provided, it will default to &#39;windows&#39;

Returns:



368
369
370
371
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 368

def r_tr_create_scripts(description, permission_type, opts = {})
  data, _status_code, _headers = r_tr_create_scripts_with_http_info(description, permission_type, opts)
  data
end

#r_tr_create_scripts_v2(description, permission_type, opts = {}) ⇒ EmpowerapiMsaPFResponseV2

Upload a new custom-script to use for the RTR ‘runscript` command.

Parameters:

  • description (String)

    File description

  • permission_type (String)

    Permission for the custom-script. Valid permission values: - &#x60;private&#x60;, usable by only the user who uploaded it - &#x60;group&#x60;, usable by all RTR Admins - &#x60;public&#x60;, usable by all active-responders and RTR admins

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    custom-script file to upload. These should be powershell scripts.

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

  • :content (String)

    The script text that you want to use to upload

  • :platform (Array<String>)

    Platforms for the file. Currently supports: windows, mac, linux, . If no platform is provided, it will default to &#39;windows&#39;

Returns:



465
466
467
468
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 465

def r_tr_create_scripts_v2(description, permission_type, opts = {})
  data, _status_code, _headers = r_tr_create_scripts_v2_with_http_info(description, permission_type, opts)
  data
end

#r_tr_create_scripts_v2_with_http_info(description, permission_type, opts = {}) ⇒ Array<(EmpowerapiMsaPFResponseV2, Integer, Hash)>

Upload a new custom-script to use for the RTR &#x60;runscript&#x60; command.

Parameters:

  • description (String)

    File description

  • permission_type (String)

    Permission for the custom-script. Valid permission values: - &#x60;private&#x60;, usable by only the user who uploaded it - &#x60;group&#x60;, usable by all RTR Admins - &#x60;public&#x60;, usable by all active-responders and RTR admins

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    custom-script file to upload. These should be powershell scripts.

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

  • :content (String)

    The script text that you want to use to upload

  • :platform (Array<String>)

    Platforms for the file. Currently supports: windows, mac, linux, . If no platform is provided, it will default to &#39;windows&#39;

Returns:

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

    EmpowerapiMsaPFResponseV2 data, response status code and response headers



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
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 480

def r_tr_create_scripts_v2_with_http_info(description, permission_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_create_scripts_v2 ...'
  end
  # verify the required parameter 'description' is set
  if @api_client.config.client_side_validation && description.nil?
    fail ArgumentError, "Missing the required parameter 'description' when calling RealTimeResponseAdmin.r_tr_create_scripts_v2"
  end
  # verify the required parameter 'permission_type' is set
  if @api_client.config.client_side_validation && permission_type.nil?
    fail ArgumentError, "Missing the required parameter 'permission_type' when calling RealTimeResponseAdmin.r_tr_create_scripts_v2"
  end
  if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 32766
    fail ArgumentError, 'invalid value for "opts[:"name"]" when calling RealTimeResponseAdmin.r_tr_create_scripts_v2, the character length must be smaller than or equal to 32766.'
  end

  if @api_client.config.client_side_validation && !opts[:'comments_for_audit_log'].nil? && opts[:'comments_for_audit_log'].to_s.length > 4096
    fail ArgumentError, 'invalid value for "opts[:"comments_for_audit_log"]" when calling RealTimeResponseAdmin.r_tr_create_scripts_v2, the character length must be smaller than or equal to 4096.'
  end

  # resource path
  local_var_path = '/real-time-response/entities/scripts/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(['multipart/form-data'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['description'] = description
  form_params['permission_type'] = permission_type
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
  form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
  form_params['comments_for_audit_log'] = opts[:'comments_for_audit_log'] if !opts[:'comments_for_audit_log'].nil?
  form_params['content'] = opts[:'content'] if !opts[:'content'].nil?
  form_params['platform'] = @api_client.build_collection_param(opts[:'platform'], :csv) if !opts[:'platform'].nil?

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

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

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_create_scripts_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: RealTimeResponseAdmin#r_tr_create_scripts_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_create_scripts_with_http_info(description, permission_type, opts = {}) ⇒ Array<(MsaReplyMetaOnly, Integer, Hash)>

Upload a new custom-script to use for the RTR &#x60;runscript&#x60; command.

Parameters:

  • description (String)

    File description

  • permission_type (String)

    Permission for the custom-script. Valid permission values: - &#x60;private&#x60;, usable by only the user who uploaded it - &#x60;group&#x60;, usable by all RTR Admins - &#x60;public&#x60;, usable by all active-responders and RTR admins

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    custom-script file to upload. These should be powershell scripts.

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

  • :content (String)

    The script text that you want to use to upload

  • :platform (Array<String>)

    Platforms for the file. Currently supports: windows, mac, linux, . If no platform is provided, it will default to &#39;windows&#39;

Returns:

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

    MsaReplyMetaOnly data, response status code and response headers



383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
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
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 383

def r_tr_create_scripts_with_http_info(description, permission_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_create_scripts ...'
  end
  # verify the required parameter 'description' is set
  if @api_client.config.client_side_validation && description.nil?
    fail ArgumentError, "Missing the required parameter 'description' when calling RealTimeResponseAdmin.r_tr_create_scripts"
  end
  # verify the required parameter 'permission_type' is set
  if @api_client.config.client_side_validation && permission_type.nil?
    fail ArgumentError, "Missing the required parameter 'permission_type' when calling RealTimeResponseAdmin.r_tr_create_scripts"
  end
  if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 32766
    fail ArgumentError, 'invalid value for "opts[:"name"]" when calling RealTimeResponseAdmin.r_tr_create_scripts, the character length must be smaller than or equal to 32766.'
  end

  if @api_client.config.client_side_validation && !opts[:'comments_for_audit_log'].nil? && opts[:'comments_for_audit_log'].to_s.length > 4096
    fail ArgumentError, 'invalid value for "opts[:"comments_for_audit_log"]" when calling RealTimeResponseAdmin.r_tr_create_scripts, the character length must be smaller than or equal to 4096.'
  end

  # resource path
  local_var_path = '/real-time-response/entities/scripts/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(['multipart/form-data'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['description'] = description
  form_params['permission_type'] = permission_type
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
  form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
  form_params['comments_for_audit_log'] = opts[:'comments_for_audit_log'] if !opts[:'comments_for_audit_log'].nil?
  form_params['content'] = opts[:'content'] if !opts[:'content'].nil?
  form_params['platform'] = @api_client.build_collection_param(opts[:'platform'], :csv) if !opts[:'platform'].nil?

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

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

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_create_scripts",
    :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: RealTimeResponseAdmin#r_tr_create_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_delete_put_files(ids, opts = {}) ⇒ MsaReplyMetaOnly

Delete a put-file based on the ID given. Can only delete one file at a time.

Parameters:

  • ids (String)

    File id

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

    the optional parameters

Returns:



556
557
558
559
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 556

def r_tr_delete_put_files(ids, opts = {})
  data, _status_code, _headers = r_tr_delete_put_files_with_http_info(ids, opts)
  data
end

#r_tr_delete_put_files_with_http_info(ids, opts = {}) ⇒ Array<(MsaReplyMetaOnly, Integer, Hash)>

Delete a put-file based on the ID given. Can only delete one file at a time.

Parameters:

  • ids (String)

    File id

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

    the optional parameters

Returns:

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

    MsaReplyMetaOnly data, response status code and response headers



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
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 565

def r_tr_delete_put_files_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_delete_put_files ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling RealTimeResponseAdmin.r_tr_delete_put_files"
  end
  # resource path
  local_var_path = '/real-time-response/entities/put-files/v1'

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

  # 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] || 'MsaReplyMetaOnly'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_delete_put_files",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RealTimeResponseAdmin#r_tr_delete_put_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_delete_scripts(ids, opts = {}) ⇒ MsaReplyMetaOnly

Delete a custom-script based on the ID given. Can only delete one script at a time.

Parameters:

  • ids (String)

    File id

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

    the optional parameters

Returns:



618
619
620
621
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 618

def r_tr_delete_scripts(ids, opts = {})
  data, _status_code, _headers = r_tr_delete_scripts_with_http_info(ids, opts)
  data
end

#r_tr_delete_scripts_with_http_info(ids, opts = {}) ⇒ Array<(MsaReplyMetaOnly, Integer, Hash)>

Delete a custom-script based on the ID given. Can only delete one script at a time.

Parameters:

  • ids (String)

    File id

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

    the optional parameters

Returns:

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

    MsaReplyMetaOnly data, response status code and response headers



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
667
668
669
670
671
672
673
674
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 627

def r_tr_delete_scripts_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_delete_scripts ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling RealTimeResponseAdmin.r_tr_delete_scripts"
  end
  # resource path
  local_var_path = '/real-time-response/entities/scripts/v1'

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

  # 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] || 'MsaReplyMetaOnly'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_delete_scripts",
    :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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RealTimeResponseAdmin#r_tr_delete_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_execute_admin_command(body, opts = {}) ⇒ DomainCommandExecuteResponseWrapper

Execute a RTR administrator command on a single host.

Parameters:

  • body (DomainCommandExecuteRequest)

    Use this endpoint to run these [real time response commands](falcon.crowdstrike.com/documentation/page/b8c1738c/real-time-response-and-network-containment#k893b7c0): - &#x60;cat&#x60; - &#x60;cd&#x60; - &#x60;clear&#x60; - &#x60;cp&#x60; - &#x60;encrypt&#x60; - &#x60;env&#x60; - &#x60;eventlog&#x60; - &#x60;filehash&#x60; - &#x60;get&#x60; - &#x60;getsid&#x60; - &#x60;help&#x60; - &#x60;history&#x60; - &#x60;ipconfig&#x60; - &#x60;kill&#x60; - &#x60;ls&#x60; - &#x60;map&#x60; - &#x60;memdump&#x60; - &#x60;mkdir&#x60; - &#x60;mount&#x60; - &#x60;mv&#x60; - &#x60;netstat&#x60; - &#x60;ps&#x60; - &#x60;put&#x60; - &#x60;reg query&#x60; - &#x60;reg set&#x60; - &#x60;reg delete&#x60; - &#x60;reg load&#x60; - &#x60;reg unload&#x60; - &#x60;restart&#x60; - &#x60;rm&#x60; - &#x60;run&#x60; - &#x60;runscript&#x60; - &#x60;shutdown&#x60; - &#x60;unmap&#x60; - &#x60;update history&#x60; - &#x60;update install&#x60; - &#x60;update list&#x60; - &#x60;update query&#x60; - &#x60;xmemdump&#x60; - &#x60;zip&#x60; Required values. The rest of the fields are unused. **&#x60;base_command&#x60;** Active-Responder command type we are going to execute, for example: &#x60;get&#x60; or &#x60;cp&#x60;. Refer to the RTR documentation for the full list of commands. **&#x60;command_string&#x60;** Full command string for the command. For example &#x60;get some_file.txt&#x60; **&#x60;session_id&#x60;** RTR session ID to run the command on

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

    the optional parameters

Returns:



680
681
682
683
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 680

def r_tr_execute_admin_command(body, opts = {})
  data, _status_code, _headers = r_tr_execute_admin_command_with_http_info(body, opts)
  data
end

#r_tr_execute_admin_command_with_http_info(body, opts = {}) ⇒ Array<(DomainCommandExecuteResponseWrapper, Integer, Hash)>

Execute a RTR administrator command on a single host.

Parameters:

  • body (DomainCommandExecuteRequest)

    Use this endpoint to run these [real time response commands](falcon.crowdstrike.com/documentation/page/b8c1738c/real-time-response-and-network-containment#k893b7c0): - &#x60;cat&#x60; - &#x60;cd&#x60; - &#x60;clear&#x60; - &#x60;cp&#x60; - &#x60;encrypt&#x60; - &#x60;env&#x60; - &#x60;eventlog&#x60; - &#x60;filehash&#x60; - &#x60;get&#x60; - &#x60;getsid&#x60; - &#x60;help&#x60; - &#x60;history&#x60; - &#x60;ipconfig&#x60; - &#x60;kill&#x60; - &#x60;ls&#x60; - &#x60;map&#x60; - &#x60;memdump&#x60; - &#x60;mkdir&#x60; - &#x60;mount&#x60; - &#x60;mv&#x60; - &#x60;netstat&#x60; - &#x60;ps&#x60; - &#x60;put&#x60; - &#x60;reg query&#x60; - &#x60;reg set&#x60; - &#x60;reg delete&#x60; - &#x60;reg load&#x60; - &#x60;reg unload&#x60; - &#x60;restart&#x60; - &#x60;rm&#x60; - &#x60;run&#x60; - &#x60;runscript&#x60; - &#x60;shutdown&#x60; - &#x60;unmap&#x60; - &#x60;update history&#x60; - &#x60;update install&#x60; - &#x60;update list&#x60; - &#x60;update query&#x60; - &#x60;xmemdump&#x60; - &#x60;zip&#x60; Required values. The rest of the fields are unused. **&#x60;base_command&#x60;** Active-Responder command type we are going to execute, for example: &#x60;get&#x60; or &#x60;cp&#x60;. Refer to the RTR documentation for the full list of commands. **&#x60;command_string&#x60;** Full command string for the command. For example &#x60;get some_file.txt&#x60; **&#x60;session_id&#x60;** RTR session ID to run the command on

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

    the optional parameters

Returns:



689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 689

def r_tr_execute_admin_command_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_execute_admin_command ...'
  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 RealTimeResponseAdmin.r_tr_execute_admin_command"
  end
  # resource path
  local_var_path = '/real-time-response/entities/admin-command/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] || 'DomainCommandExecuteResponseWrapper'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_execute_admin_command",
    :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: RealTimeResponseAdmin#r_tr_execute_admin_command\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_get_falcon_scripts(ids, opts = {}) ⇒ EmpowerapiMsaFalconScriptResponse

Get Falcon scripts with metadata and content of script

Parameters:

  • ids (Array<String>)

    IDs of the Falcon scripts you want to retrieve

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

    the optional parameters

Returns:



746
747
748
749
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 746

def r_tr_get_falcon_scripts(ids, opts = {})
  data, _status_code, _headers = r_tr_get_falcon_scripts_with_http_info(ids, opts)
  data
end

#r_tr_get_falcon_scripts_with_http_info(ids, opts = {}) ⇒ Array<(EmpowerapiMsaFalconScriptResponse, Integer, Hash)>

Get Falcon scripts with metadata and content of script

Parameters:

  • ids (Array<String>)

    IDs of the Falcon scripts you want to retrieve

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

    the optional parameters

Returns:



755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 755

def r_tr_get_falcon_scripts_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_get_falcon_scripts ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling RealTimeResponseAdmin.r_tr_get_falcon_scripts"
  end
  # resource path
  local_var_path = '/real-time-response/entities/falcon-scripts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

  # 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] || 'EmpowerapiMsaFalconScriptResponse'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_get_falcon_scripts",
    :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: RealTimeResponseAdmin#r_tr_get_falcon_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_get_put_file_contents(id, opts = {}) ⇒ Array<Integer>

Get RTR put file contents for a given file ID

Parameters:

  • id (String)

    put file ID

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

    the optional parameters

Returns:

  • (Array<Integer>)


808
809
810
811
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 808

def r_tr_get_put_file_contents(id, opts = {})
  data, _status_code, _headers = r_tr_get_put_file_contents_with_http_info(id, opts)
  data
end

#r_tr_get_put_file_contents_with_http_info(id, opts = {}) ⇒ Array<(Array<Integer>, Integer, Hash)>

Get RTR put file contents for a given file ID

Parameters:

  • id (String)

    put file ID

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

    the optional parameters

Returns:

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

    Array<Integer> data, response status code and response headers



817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 817

def r_tr_get_put_file_contents_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_get_put_file_contents ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling RealTimeResponseAdmin.r_tr_get_put_file_contents"
  end
  # resource path
  local_var_path = '/real-time-response/entities/put-file-contents/v1'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', '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] || 'Array<Integer>'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_get_put_file_contents",
    :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: RealTimeResponseAdmin#r_tr_get_put_file_contents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_get_put_files(ids, opts = {}) ⇒ EmpowerapiMsaPFResponseV1

Get put-files based on the ID’s given. These are used for the RTR ‘put` command.

Parameters:

  • ids (Array<String>)

    File IDs

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

    the optional parameters

Returns:



870
871
872
873
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 870

def r_tr_get_put_files(ids, opts = {})
  data, _status_code, _headers = r_tr_get_put_files_with_http_info(ids, opts)
  data
end

#r_tr_get_put_files_v2(ids, opts = {}) ⇒ EmpowerapiMsaPFResponseV2

Get put-files based on the ID’s given. These are used for the RTR ‘put` command.

Parameters:

  • ids (Array<String>)

    File IDs

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

    the optional parameters

Returns:



932
933
934
935
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 932

def r_tr_get_put_files_v2(ids, opts = {})
  data, _status_code, _headers = r_tr_get_put_files_v2_with_http_info(ids, opts)
  data
end

#r_tr_get_put_files_v2_with_http_info(ids, opts = {}) ⇒ Array<(EmpowerapiMsaPFResponseV2, Integer, Hash)>

Get put-files based on the ID&#39;s given. These are used for the RTR &#x60;put&#x60; command.

Parameters:

  • ids (Array<String>)

    File IDs

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

    the optional parameters

Returns:

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

    EmpowerapiMsaPFResponseV2 data, response status code and response headers



941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 941

def r_tr_get_put_files_v2_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_get_put_files_v2 ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling RealTimeResponseAdmin.r_tr_get_put_files_v2"
  end
  # resource path
  local_var_path = '/real-time-response/entities/put-files/v2'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

  # 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] || 'EmpowerapiMsaPFResponseV2'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_get_put_files_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: RealTimeResponseAdmin#r_tr_get_put_files_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_get_put_files_with_http_info(ids, opts = {}) ⇒ Array<(EmpowerapiMsaPFResponseV1, Integer, Hash)>

Get put-files based on the ID&#39;s given. These are used for the RTR &#x60;put&#x60; command.

Parameters:

  • ids (Array<String>)

    File IDs

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

    the optional parameters

Returns:

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

    EmpowerapiMsaPFResponseV1 data, response status code and response headers



879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 879

def r_tr_get_put_files_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_get_put_files ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling RealTimeResponseAdmin.r_tr_get_put_files"
  end
  # resource path
  local_var_path = '/real-time-response/entities/put-files/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

  # 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] || 'EmpowerapiMsaPFResponseV1'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_get_put_files",
    :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: RealTimeResponseAdmin#r_tr_get_put_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_get_scripts(ids, opts = {}) ⇒ EmpowerapiMsaPFResponseV1

Get custom-scripts based on the ID’s given. These are used for the RTR ‘runscript` command.

Parameters:

  • ids (Array<String>)

    File IDs

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

    the optional parameters

Returns:



994
995
996
997
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 994

def r_tr_get_scripts(ids, opts = {})
  data, _status_code, _headers = r_tr_get_scripts_with_http_info(ids, opts)
  data
end

#r_tr_get_scripts_v2(ids, opts = {}) ⇒ EmpowerapiMsaPFResponseV2

Get custom-scripts based on the ID’s given. These are used for the RTR ‘runscript` command.

Parameters:

  • ids (Array<String>)

    File IDs

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

    the optional parameters

Returns:



1056
1057
1058
1059
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1056

def r_tr_get_scripts_v2(ids, opts = {})
  data, _status_code, _headers = r_tr_get_scripts_v2_with_http_info(ids, opts)
  data
end

#r_tr_get_scripts_v2_with_http_info(ids, opts = {}) ⇒ Array<(EmpowerapiMsaPFResponseV2, Integer, Hash)>

Get custom-scripts based on the ID&#39;s given. These are used for the RTR &#x60;runscript&#x60; command.

Parameters:

  • ids (Array<String>)

    File IDs

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

    the optional parameters

Returns:

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

    EmpowerapiMsaPFResponseV2 data, response status code and response headers



1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1065

def r_tr_get_scripts_v2_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_get_scripts_v2 ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling RealTimeResponseAdmin.r_tr_get_scripts_v2"
  end
  # resource path
  local_var_path = '/real-time-response/entities/scripts/v2'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

  # 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] || 'EmpowerapiMsaPFResponseV2'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_get_scripts_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: RealTimeResponseAdmin#r_tr_get_scripts_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_get_scripts_with_http_info(ids, opts = {}) ⇒ Array<(EmpowerapiMsaPFResponseV1, Integer, Hash)>

Get custom-scripts based on the ID&#39;s given. These are used for the RTR &#x60;runscript&#x60; command.

Parameters:

  • ids (Array<String>)

    File IDs

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

    the optional parameters

Returns:

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

    EmpowerapiMsaPFResponseV1 data, response status code and response headers



1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1003

def r_tr_get_scripts_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_get_scripts ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling RealTimeResponseAdmin.r_tr_get_scripts"
  end
  # resource path
  local_var_path = '/real-time-response/entities/scripts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

  # 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] || 'EmpowerapiMsaPFResponseV1'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_get_scripts",
    :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: RealTimeResponseAdmin#r_tr_get_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_list_falcon_scripts(opts = {}) ⇒ EmpowerapiMsaIDListResponse

Get a list of Falcon script IDs available to the user to run

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide).

  • :offset (Integer)

    Starting index of overall result set from which to return ids.

  • :limit (Integer)

    Number of ids to return.

  • :sort (String)

    Sort by spec. Ex: &#39;created_at|asc&#39;.

Returns:



1121
1122
1123
1124
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1121

def r_tr_list_falcon_scripts(opts = {})
  data, _status_code, _headers = r_tr_list_falcon_scripts_with_http_info(opts)
  data
end

#r_tr_list_falcon_scripts_with_http_info(opts = {}) ⇒ Array<(EmpowerapiMsaIDListResponse, Integer, Hash)>

Get a list of Falcon script IDs available to the user to run

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide).

  • :offset (Integer)

    Starting index of overall result set from which to return ids.

  • :limit (Integer)

    Number of ids to return.

  • :sort (String)

    Sort by spec. Ex: &#39;created_at|asc&#39;.

Returns:

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

    EmpowerapiMsaIDListResponse data, response status code and response headers



1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1133

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

  allowable_values = ["created_timestamp", "modified_timestamp", "name"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/real-time-response/queries/falcon-scripts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].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?

  # 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] || 'EmpowerapiMsaIDListResponse'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_list_falcon_scripts",
    :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: RealTimeResponseAdmin#r_tr_list_falcon_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_list_put_files(opts = {}) ⇒ BinservapiMsaPutFileResponse

Get a list of put-file ID’s that are available to the user for the ‘put` command.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide).

  • :offset (String)

    Starting index of overall result set from which to return ids.

  • :limit (Integer)

    Number of ids to return.

  • :sort (String)

    Sort by spec. Ex: &#39;created_at|asc&#39;.

Returns:



1196
1197
1198
1199
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1196

def r_tr_list_put_files(opts = {})
  data, _status_code, _headers = r_tr_list_put_files_with_http_info(opts)
  data
end

#r_tr_list_put_files_with_http_info(opts = {}) ⇒ Array<(BinservapiMsaPutFileResponse, Integer, Hash)>

Get a list of put-file ID&#39;s that are available to the user for the &#x60;put&#x60; command.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide).

  • :offset (String)

    Starting index of overall result set from which to return ids.

  • :limit (Integer)

    Number of ids to return.

  • :sort (String)

    Sort by spec. Ex: &#39;created_at|asc&#39;.

Returns:



1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1208

def r_tr_list_put_files_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_list_put_files ...'
  end
  # resource path
  local_var_path = '/real-time-response/queries/put-files/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].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?

  # 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] || 'BinservapiMsaPutFileResponse'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_list_put_files",
    :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: RealTimeResponseAdmin#r_tr_list_put_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_list_scripts(opts = {}) ⇒ BinservapiMsaPutFileResponse

Get a list of custom-script ID’s that are available to the user for the ‘runscript` command.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide).

  • :offset (String)

    Starting index of overall result set from which to return ids.

  • :limit (Integer)

    Number of ids to return.

  • :sort (String)

    Sort by spec. Ex: &#39;created_at|asc&#39;.

Returns:



1263
1264
1265
1266
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1263

def r_tr_list_scripts(opts = {})
  data, _status_code, _headers = r_tr_list_scripts_with_http_info(opts)
  data
end

#r_tr_list_scripts_with_http_info(opts = {}) ⇒ Array<(BinservapiMsaPutFileResponse, Integer, Hash)>

Get a list of custom-script ID&#39;s that are available to the user for the &#x60;runscript&#x60; command.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide).

  • :offset (String)

    Starting index of overall result set from which to return ids.

  • :limit (Integer)

    Number of ids to return.

  • :sort (String)

    Sort by spec. Ex: &#39;created_at|asc&#39;.

Returns:



1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1275

def r_tr_list_scripts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_list_scripts ...'
  end
  # resource path
  local_var_path = '/real-time-response/queries/scripts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].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?

  # 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] || 'BinservapiMsaPutFileResponse'

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_list_scripts",
    :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: RealTimeResponseAdmin#r_tr_list_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_update_scripts(id, opts = {}) ⇒ MsaReplyMetaOnly

Upload a new scripts to replace an existing one.

Parameters:

  • id (String)

    ID to update

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    custom-script file to upload. These should be powershell scripts.

  • :description (String)

    File description

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

  • :permission_type (String)

    Permission for the custom-script. Valid permission values: - &#x60;private&#x60;, usable by only the user who uploaded it - &#x60;group&#x60;, usable by all RTR Admins - &#x60;public&#x60;, usable by all active-responders and RTR admins (default to ‘none’)

  • :content (String)

    The script text that you want to use to upload

  • :platform (Array<String>)

    Platforms for the file. Currently supports: windows, mac, linux,

Returns:



1334
1335
1336
1337
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1334

def r_tr_update_scripts(id, opts = {})
  data, _status_code, _headers = r_tr_update_scripts_with_http_info(id, opts)
  data
end

#r_tr_update_scripts_v2(id, opts = {}) ⇒ EmpowerapiMsaPFResponseV2

Upload a new scripts to replace an existing one.

Parameters:

  • id (String)

    ID to update

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    custom-script file to upload. These should be powershell scripts.

  • :description (String)

    File description

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

  • :permission_type (String)

    Permission for the custom-script. Valid permission values: - &#x60;private&#x60;, usable by only the user who uploaded it - &#x60;group&#x60;, usable by all RTR Admins - &#x60;public&#x60;, usable by all active-responders and RTR admins (default to ‘none’)

  • :content (String)

    The script text that you want to use to upload

  • :platform (Array<String>)

    Platforms for the file. Currently supports: windows, mac, linux,

Returns:



1430
1431
1432
1433
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1430

def r_tr_update_scripts_v2(id, opts = {})
  data, _status_code, _headers = r_tr_update_scripts_v2_with_http_info(id, opts)
  data
end

#r_tr_update_scripts_v2_with_http_info(id, opts = {}) ⇒ Array<(EmpowerapiMsaPFResponseV2, Integer, Hash)>

Upload a new scripts to replace an existing one.

Parameters:

  • id (String)

    ID to update

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    custom-script file to upload. These should be powershell scripts.

  • :description (String)

    File description

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

  • :permission_type (String)

    Permission for the custom-script. Valid permission values: - &#x60;private&#x60;, usable by only the user who uploaded it - &#x60;group&#x60;, usable by all RTR Admins - &#x60;public&#x60;, usable by all active-responders and RTR admins (default to ‘none’)

  • :content (String)

    The script text that you want to use to upload

  • :platform (Array<String>)

    Platforms for the file. Currently supports: windows, mac, linux,

Returns:

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

    EmpowerapiMsaPFResponseV2 data, response status code and response headers



1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1446

def r_tr_update_scripts_v2_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_update_scripts_v2 ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling RealTimeResponseAdmin.r_tr_update_scripts_v2"
  end
  if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 32766
    fail ArgumentError, 'invalid value for "opts[:"name"]" when calling RealTimeResponseAdmin.r_tr_update_scripts_v2, the character length must be smaller than or equal to 32766.'
  end

  if @api_client.config.client_side_validation && !opts[:'comments_for_audit_log'].nil? && opts[:'comments_for_audit_log'].to_s.length > 4096
    fail ArgumentError, 'invalid value for "opts[:"comments_for_audit_log"]" when calling RealTimeResponseAdmin.r_tr_update_scripts_v2, the character length must be smaller than or equal to 4096.'
  end

  # resource path
  local_var_path = '/real-time-response/entities/scripts/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(['multipart/form-data'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['id'] = id
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
  form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
  form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
  form_params['comments_for_audit_log'] = opts[:'comments_for_audit_log'] if !opts[:'comments_for_audit_log'].nil?
  form_params['permission_type'] = opts[:'permission_type'] if !opts[:'permission_type'].nil?
  form_params['content'] = opts[:'content'] if !opts[:'content'].nil?
  form_params['platform'] = @api_client.build_collection_param(opts[:'platform'], :csv) if !opts[:'platform'].nil?

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

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

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_update_scripts_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: RealTimeResponseAdmin#r_tr_update_scripts_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#r_tr_update_scripts_with_http_info(id, opts = {}) ⇒ Array<(MsaReplyMetaOnly, Integer, Hash)>

Upload a new scripts to replace an existing one.

Parameters:

  • id (String)

    ID to update

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

    the optional parameters

Options Hash (opts):

  • :file (File)

    custom-script file to upload. These should be powershell scripts.

  • :description (String)

    File description

  • :name (String)

    File name (if different than actual file name)

  • :comments_for_audit_log (String)

    The audit log comment

  • :permission_type (String)

    Permission for the custom-script. Valid permission values: - &#x60;private&#x60;, usable by only the user who uploaded it - &#x60;group&#x60;, usable by all RTR Admins - &#x60;public&#x60;, usable by all active-responders and RTR admins (default to ‘none’)

  • :content (String)

    The script text that you want to use to upload

  • :platform (Array<String>)

    Platforms for the file. Currently supports: windows, mac, linux,

Returns:

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

    MsaReplyMetaOnly data, response status code and response headers



1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
# File 'lib/crimson-falcon/api/real_time_response_admin.rb', line 1350

def r_tr_update_scripts_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RealTimeResponseAdmin.r_tr_update_scripts ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling RealTimeResponseAdmin.r_tr_update_scripts"
  end
  if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 32766
    fail ArgumentError, 'invalid value for "opts[:"name"]" when calling RealTimeResponseAdmin.r_tr_update_scripts, the character length must be smaller than or equal to 32766.'
  end

  if @api_client.config.client_side_validation && !opts[:'comments_for_audit_log'].nil? && opts[:'comments_for_audit_log'].to_s.length > 4096
    fail ArgumentError, 'invalid value for "opts[:"comments_for_audit_log"]" when calling RealTimeResponseAdmin.r_tr_update_scripts, the character length must be smaller than or equal to 4096.'
  end

  # resource path
  local_var_path = '/real-time-response/entities/scripts/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(['multipart/form-data'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['id'] = id
  form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
  form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
  form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
  form_params['comments_for_audit_log'] = opts[:'comments_for_audit_log'] if !opts[:'comments_for_audit_log'].nil?
  form_params['permission_type'] = opts[:'permission_type'] if !opts[:'permission_type'].nil?
  form_params['content'] = opts[:'content'] if !opts[:'content'].nil?
  form_params['platform'] = @api_client.build_collection_param(opts[:'platform'], :csv) if !opts[:'platform'].nil?

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

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

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

  new_options = opts.merge(
    :operation => :"RealTimeResponseAdmin.r_tr_update_scripts",
    :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: RealTimeResponseAdmin#r_tr_update_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end