Class: Falcon::HostGroupApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ HostGroupApi

Returns a new instance of HostGroupApi.



36
37
38
# File 'lib/crimson-falcon/api/host_group_api.rb', line 36

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



34
35
36
# File 'lib/crimson-falcon/api/host_group_api.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#create_host_groups(body, opts = {}) ⇒ HostGroupsRespV1

Create Host Groups by specifying details about the group to create

Parameters:

Returns:



43
44
45
46
# File 'lib/crimson-falcon/api/host_group_api.rb', line 43

def create_host_groups(body, opts = {})
  data, _status_code, _headers = create_host_groups_with_http_info(body, opts)
  data
end

#create_host_groups_with_http_info(body, opts = {}) ⇒ Array<(HostGroupsRespV1, Integer, Hash)>

Create Host Groups by specifying details about the group to create

Parameters:

Returns:

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

    HostGroupsRespV1 data, response status code and response headers



52
53
54
55
56
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
# File 'lib/crimson-falcon/api/host_group_api.rb', line 52

def create_host_groups_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: HostGroupApi.create_host_groups ...'
  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 HostGroupApi.create_host_groups"
  end
  # resource path
  local_var_path = '/devices/entities/host-groups/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] || 'HostGroupsRespV1'

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

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

#delete_host_groups(ids, opts = {}) ⇒ MsaQueryResponse

Delete a set of Host Groups by specifying their IDs

Parameters:

  • ids (Array<String>)

    The IDs of the Host Groups to delete

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

    the optional parameters

Returns:



109
110
111
112
# File 'lib/crimson-falcon/api/host_group_api.rb', line 109

def delete_host_groups(ids, opts = {})
  data, _status_code, _headers = delete_host_groups_with_http_info(ids, opts)
  data
end

#delete_host_groups_with_http_info(ids, opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Delete a set of Host Groups by specifying their IDs

Parameters:

  • ids (Array<String>)

    The IDs of the Host Groups to delete

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

    the optional parameters

Returns:

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

    MsaQueryResponse data, response status code and response headers



118
119
120
121
122
123
124
125
126
127
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
# File 'lib/crimson-falcon/api/host_group_api.rb', line 118

def delete_host_groups_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: HostGroupApi.delete_host_groups ...'
  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 HostGroupApi.delete_host_groups"
  end
  # resource path
  local_var_path = '/devices/entities/host-groups/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] || 'MsaQueryResponse'

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

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

#get_host_groups(ids, opts = {}) ⇒ HostGroupsRespV1

Retrieve a set of Host Groups by specifying their IDs

Parameters:

  • ids (Array<String>)

    The IDs of the Host Groups to return

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

    the optional parameters

Returns:



171
172
173
174
# File 'lib/crimson-falcon/api/host_group_api.rb', line 171

def get_host_groups(ids, opts = {})
  data, _status_code, _headers = get_host_groups_with_http_info(ids, opts)
  data
end

#get_host_groups_with_http_info(ids, opts = {}) ⇒ Array<(HostGroupsRespV1, Integer, Hash)>

Retrieve a set of Host Groups by specifying their IDs

Parameters:

  • ids (Array<String>)

    The IDs of the Host Groups to return

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

    the optional parameters

Returns:

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

    HostGroupsRespV1 data, response status code and response headers



180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
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
# File 'lib/crimson-falcon/api/host_group_api.rb', line 180

def get_host_groups_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: HostGroupApi.get_host_groups ...'
  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 HostGroupApi.get_host_groups"
  end
  # resource path
  local_var_path = '/devices/entities/host-groups/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] || 'HostGroupsRespV1'

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

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

#perform_group_action(action_name, body, opts = {}) ⇒ HostGroupsRespV1

Perform the specified action on the Host Groups specified in the request

Parameters:

  • action_name (String)

    The action to perform

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

    the optional parameters

Options Hash (opts):

  • :disable_hostname_check (Boolean)

    Bool to disable hostname check on add-member (default to false)

Returns:



235
236
237
238
# File 'lib/crimson-falcon/api/host_group_api.rb', line 235

def perform_group_action(action_name, body, opts = {})
  data, _status_code, _headers = perform_group_action_with_http_info(action_name, body, opts)
  data
end

#perform_group_action_with_http_info(action_name, body, opts = {}) ⇒ Array<(HostGroupsRespV1, Integer, Hash)>

Perform the specified action on the Host Groups specified in the request

Parameters:

  • action_name (String)

    The action to perform

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

    the optional parameters

Options Hash (opts):

  • :disable_hostname_check (Boolean)

    Bool to disable hostname check on add-member (default to false)

Returns:

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

    HostGroupsRespV1 data, response status code and response headers



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
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
# File 'lib/crimson-falcon/api/host_group_api.rb', line 246

def perform_group_action_with_http_info(action_name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: HostGroupApi.perform_group_action ...'
  end
  # verify the required parameter 'action_name' is set
  if @api_client.config.client_side_validation && action_name.nil?
    fail ArgumentError, "Missing the required parameter 'action_name' when calling HostGroupApi.perform_group_action"
  end
  # verify enum value
  allowable_values = ["add-hosts", "remove-hosts"]
  if @api_client.config.client_side_validation && !allowable_values.include?(action_name)
    fail ArgumentError, "invalid value for \"action_name\", must be one of #{allowable_values}"
  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 HostGroupApi.perform_group_action"
  end
  # resource path
  local_var_path = '/devices/entities/host-group-actions/v1'

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

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

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

#query_combined_group_members(opts = {}) ⇒ HostGroupsMembersRespV1

Search for members of a Host Group in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    The ID of the Host Group to search for members of

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:



318
319
320
321
# File 'lib/crimson-falcon/api/host_group_api.rb', line 318

def query_combined_group_members(opts = {})
  data, _status_code, _headers = query_combined_group_members_with_http_info(opts)
  data
end

#query_combined_group_members_with_http_info(opts = {}) ⇒ Array<(HostGroupsMembersRespV1, Integer, Hash)>

Search for members of a Host Group in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    The ID of the Host Group to search for members of

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:

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

    HostGroupsMembersRespV1 data, response status code and response headers



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

def query_combined_group_members_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: HostGroupApi.query_combined_group_members ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling HostGroupApi.query_combined_group_members, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling HostGroupApi.query_combined_group_members, must be smaller than or equal to 5000.'
  end

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

  # resource path
  local_var_path = '/devices/combined/host-group-members/v1'

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

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

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

#query_combined_host_groups(opts = {}) ⇒ HostGroupsRespV1

Search for Host Groups in your environment by providing an FQL filter and paging details. Returns a set of Host Groups which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:



399
400
401
402
# File 'lib/crimson-falcon/api/host_group_api.rb', line 399

def query_combined_host_groups(opts = {})
  data, _status_code, _headers = query_combined_host_groups_with_http_info(opts)
  data
end

#query_combined_host_groups_with_http_info(opts = {}) ⇒ Array<(HostGroupsRespV1, Integer, Hash)>

Search for Host Groups in your environment by providing an FQL filter and paging details. Returns a set of Host Groups which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:

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

    HostGroupsRespV1 data, response status code and response headers



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
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/crimson-falcon/api/host_group_api.rb', line 411

def query_combined_host_groups_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: HostGroupApi.query_combined_host_groups ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling HostGroupApi.query_combined_host_groups, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling HostGroupApi.query_combined_host_groups, must be smaller than or equal to 5000.'
  end

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

  allowable_values = ["created_by.asc", "created_by.desc", "created_timestamp.asc", "created_timestamp.desc", "group_type.asc", "group_type.desc", "modified_by.asc", "modified_by.desc", "modified_timestamp.asc", "modified_timestamp.desc", "name.asc", "name.desc"]
  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 = '/devices/combined/host-groups/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] || 'HostGroupsRespV1'

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

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

#query_group_members(opts = {}) ⇒ MsaQueryResponse

Search for members of a Host Group in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    The ID of the Host Group to search for members of

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:



483
484
485
486
# File 'lib/crimson-falcon/api/host_group_api.rb', line 483

def query_group_members(opts = {})
  data, _status_code, _headers = query_group_members_with_http_info(opts)
  data
end

#query_group_members_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Search for members of a Host Group in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    The ID of the Host Group to search for members of

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:

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

    MsaQueryResponse data, response status code and response headers



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
551
552
553
554
555
# File 'lib/crimson-falcon/api/host_group_api.rb', line 496

def query_group_members_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: HostGroupApi.query_group_members ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling HostGroupApi.query_group_members, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling HostGroupApi.query_group_members, must be smaller than or equal to 5000.'
  end

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

  # resource path
  local_var_path = '/devices/queries/host-group-members/v1'

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

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

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

#query_host_groups(opts = {}) ⇒ MsaQueryResponse

Search for Host Groups in your environment by providing an FQL filter and paging details. Returns a set of Host Group IDs which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:



564
565
566
567
# File 'lib/crimson-falcon/api/host_group_api.rb', line 564

def query_host_groups(opts = {})
  data, _status_code, _headers = query_host_groups_with_http_info(opts)
  data
end

#query_host_groups_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Search for Host Groups in your environment by providing an FQL filter and paging details. Returns a set of Host Group IDs which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:

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

    MsaQueryResponse data, response status code and response headers



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
613
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
# File 'lib/crimson-falcon/api/host_group_api.rb', line 576

def query_host_groups_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: HostGroupApi.query_host_groups ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling HostGroupApi.query_host_groups, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling HostGroupApi.query_host_groups, must be smaller than or equal to 5000.'
  end

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

  allowable_values = ["created_by.asc", "created_by.desc", "created_timestamp.asc", "created_timestamp.desc", "group_type.asc", "group_type.desc", "modified_by.asc", "modified_by.desc", "modified_timestamp.asc", "modified_timestamp.desc", "name.asc", "name.desc"]
  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 = '/devices/queries/host-groups/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] || 'MsaQueryResponse'

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

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

#update_host_groups(body, opts = {}) ⇒ HostGroupsRespV1

Update Host Groups by specifying the ID of the group and details to update

Parameters:

Returns:



644
645
646
647
# File 'lib/crimson-falcon/api/host_group_api.rb', line 644

def update_host_groups(body, opts = {})
  data, _status_code, _headers = update_host_groups_with_http_info(body, opts)
  data
end

#update_host_groups_with_http_info(body, opts = {}) ⇒ Array<(HostGroupsRespV1, Integer, Hash)>

Update Host Groups by specifying the ID of the group and details to update

Parameters:

Returns:

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

    HostGroupsRespV1 data, response status code and response headers



653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
# File 'lib/crimson-falcon/api/host_group_api.rb', line 653

def update_host_groups_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: HostGroupApi.update_host_groups ...'
  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 HostGroupApi.update_host_groups"
  end
  # resource path
  local_var_path = '/devices/entities/host-groups/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] || 'HostGroupsRespV1'

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

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