Class: Falcon::Hosts

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ Hosts

Returns a new instance of Hosts.



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

def api_client
  @api_client
end

Instance Method Details

#combined_devices_by_filter(opts = {}) ⇒ DeviceapiDeviceCombinedResponseSwagger

Search for hosts in your environment by platform, hostname, IP, and other criteria. Returns full device records.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :offset (String)

    The offset to page from, provided from the previous call as the "next" value, for the next result set. For the first call, do not supply an offset.

  • :limit (Integer)

    The maximum records to return. [1-10000] (default to 100)

  • :sort (String)

    The property to sort by (e.g. status.desc or hostname.asc). If not specified, the default sort will be device_id.asc. This should be supplied for each consecutive call.

  • :filter (String)

    The filter expression that should be used to limit the results. This should be supplied for each consecutive call.

  • :fields (String)

    The fields to return, comma delimited if specifying more than one field. For example: fields=hostname,device_id would return device records only containing the hostname and device_id

Returns:



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

def combined_devices_by_filter(opts = {})
  data, _status_code, _headers = combined_devices_by_filter_with_http_info(opts)
  data
end

#combined_devices_by_filter_with_http_info(opts = {}) ⇒ Array<(DeviceapiDeviceCombinedResponseSwagger, Integer, Hash)>

Search for hosts in your environment by platform, hostname, IP, and other criteria. Returns full device records.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :offset (String)

    The offset to page from, provided from the previous call as the &quot;next&quot; value, for the next result set. For the first call, do not supply an offset.

  • :limit (Integer)

    The maximum records to return. [1-10000] (default to 100)

  • :sort (String)

    The property to sort by (e.g. status.desc or hostname.asc). If not specified, the default sort will be device_id.asc. This should be supplied for each consecutive call.

  • :filter (String)

    The filter expression that should be used to limit the results. This should be supplied for each consecutive call.

  • :fields (String)

    The fields to return, comma delimited if specifying more than one field. For example: fields&#x3D;hostname,device_id would return device records only containing the hostname and device_id

Returns:



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/crimson-falcon/api/hosts.rb', line 59

def combined_devices_by_filter_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.combined_devices_by_filter ...'
  end
  allowable_values = ["device_policies.network-scan-content.applied", "device_policies.exposure-management.applied", "device_policies.logscale-collector.policy_type", "last_login_timestamp", "system_manufacturer", "modified_timestamp", "device_policies.host-retention.policy_id", "service_provider_account_id", "managed_apps.identity-protection.version", "device_policies.remote_response.applied", "linux_sensor_mode", "device_policies.kubernetes-admission-control.policy_type", "device_policies.system-tray.policy_id", "device_policies.system-tray.applied", "device_policies.aws-verified-access.applied", "device_policies.firewall.rule_set_id", "pod_id", "default_gateway_ip", "device_policies.fem-browser-extension-control.applied", "site_name", "device_policies.identity-endpoint.policy_id", "device_policies.jumpcloud.policy_type", "device_policies.mobile.applied", "tags", "pod_labels", "device_policies.aidr.policy_id", "device_policies.content-update.policy_id", "device_policies.data-protection.policy_id", "serial_number", "device_policies.exposure-management.policy_id", "device_id", "device_policies.data-protection.applied", "_all", "kernel_version", "pod_ip6", "license_activation_state", "last_reboot", "bios_manufacturer", "release_group", "device_policies.sensor_update.policy_id", "device_policies.airlock.applied", "device_policies.identity-protection.policy_id", "device_policies.identity-endpoint.policy_type", "device_policies.firewall.policy_id", "managed_apps.jumpcloud.version", "config_id_platform", "external_ip", "ou", "platform_name", "device_policies.netskope.policy_id", "device_policies.consumer-subscription.policy_type", "device_policies.host-retention.applied", "pod_namespace", "policies.policy_type", "device_policies.identity-endpoint.applied", "device_policies.firewall.policy_type", "email", "criticality", "minor_version", "product_type", "device_policies.sensor_update.uninstall_protection", "device_policies.it-automation.policy_id", "managed_apps.aws-verified-access.version", "pod_ip4", "connection_mac_address", "policy_id", "policies.policy_id", "device_policies.cloud-ml.policy_type", "device_policies.data-protection-cloud.applied", "mac_address", "k8s_cluster_git_version", "device_policies.exposure-management.policy_type", "device_policies.logscale-collector.policy_id", "machine_domain", "group_hash", "connection_ip", "device_policies.aidr.policy_type", "last_seen", "device_policies.sensor_update.policy_type", "device_policies.automox.policy_type", "device_policies.browser-extension.applied", "device_policies.fem-browser-extension-control.policy_id", "device_policies.application-abuse-prevention.policy_id", "device_policies.aidr.applied", "last_login_user_sid", "device_policies.cloud-ml.applied", "device_policies.it-automation.policy_type", "pointer_size", "device_policies.network-scan-content.policy_id", "agent_version", "device_policies.sensor_update.applied", "device_policies.mobile.policy_type", "device_policies.mobile.policy_id", "cpu_signature", "config_id_build", "device_policies.jumpcloud.policy_id", "device_policies.aws-verified-access.policy_type", "managed_apps.netskope.version", "device_policies.application-abuse-prevention.applied", "product_type_desc", "device_policies.automox.applied", "device_policies.data-protection-cloud.policy_type", "device_policies.firewall.applied", "reduced_functionality_mode", "pod_hostname", "device_policies.network-scan-content.policy_type", "config_id_base", "safe_mode", "device_policies.ztl.policy_id", "service_provider", "groups", "major_version", "device_policies.automox.policy_id", "device_policies.vulnerability-management.policy_type", "device_policies.sca.applied", "device_policies.remote_response.policy_type", "pod_annotations", "device_policies.logscale-collector.applied", "device_policies.prevention.applied", "device_policies.identity-protection.applied", "device_policies.sca.policy_id", "device_policies.aws-verified-access.policy_id", "deployment_type", "cid", "first_seen", "os_build", "device_policies.vulnerability-management.applied", "pod_name", "device_policies.fem-browser-extension-control.policy_type", "device_policies.fim.applied", "device_policies.it-automation.applied", "pod_service_account_name", "migration_completed_time", "device_policies.application-abuse-prevention.policy_type", "device_policies.device_control.policy_type", "device_policies.device_control.applied", "device_policies.netskope.policy_type", "device_policies.content-update.policy_type", "device_policies.airlock.policy_type", "device_policies.airlock.policy_id", "device_policies.sca.policy_type", "instance_id", "managed_apps.automox.version", "status", "device_policies.ztl.policy_type", "device_policies.kubernetes-admission-control.policy_id", "device_policies.consumer-subscription.policy_id", "device_policies.content-update.applied", "device_policies.host-retention.policy_type", "k8s_cluster_version", "agent_load_flags", "bios_version", "hostname", "last_login_uid", "local_ip", "os_version", "device_policies.data-protection-cloud.policy_id", "managed_apps.airlock.version", "platform_id", "system_product_name", "device_policies.ztl.applied", "device_policies.fim.policy_type", "device_policies.vulnerability-management.policy_id", "rtr_state", "detection_suppression_status", "device_policies.browser-extension.policy_id", "first_login_timestamp", "device_policies.netskope.applied", "device_policies.consumer-subscription.applied", "device_policies.data-protection.policy_type", "chassis_type_desc", "first_login_user", "last_login_user", "device_policies.prevention.policy_id", "device_policies.device_control.policy_id", "device_policies.identity-protection.policy_type", "device_policies.jumpcloud.applied", "device_policies.fim.policy_id", "cpu_vendor", "device_policies.kubernetes-admission-control.applied", "device_policies.remote_response.policy_id", "pod_host_ip6", "k8s_cluster_id", "host_utc_offset", "filesystem_containment_status", "device_policies.browser-extension.policy_type", "policies.applied", "device_policies.prevention.policy_type", "device_policies.system-tray.policy_type", "device_policies.cloud-ml.policy_id", "local_ip.raw", "zone_group", "os_product_name", "chassis_type", "pod_host_ip4", "internet_exposure"]
  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/devices/v1'

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

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

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

#combined_hidden_devices_by_filter(opts = {}) ⇒ DeviceapiDeviceCombinedResponseSwagger

Search for hidden hosts in your environment by platform, hostname, IP, and other criteria. Returns full device records.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :offset (String)

    The offset to page from, provided from the previous call as the &quot;next&quot; value, for the next result set. For the first call, do not supply an offset.

  • :limit (Integer)

    The maximum records to return. [1-10000] (default to 100)

  • :sort (String)

    The property to sort by (e.g. status.desc or hostname.asc). If not specified, the default sort will be device_id.asc. This should be supplied for each consecutive call.

  • :filter (String)

    The filter expression that should be used to limit the results. This should be supplied for each consecutive call.

  • :fields (String)

    The fields to return, comma delimited if specifying more than one field. For example: fields&#x3D;hostname,device_id would return device records only containing the hostname and device_id

Returns:



120
121
122
123
# File 'lib/crimson-falcon/api/hosts.rb', line 120

def combined_hidden_devices_by_filter(opts = {})
  data, _status_code, _headers = combined_hidden_devices_by_filter_with_http_info(opts)
  data
end

#combined_hidden_devices_by_filter_with_http_info(opts = {}) ⇒ Array<(DeviceapiDeviceCombinedResponseSwagger, Integer, Hash)>

Search for hidden hosts in your environment by platform, hostname, IP, and other criteria. Returns full device records.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :offset (String)

    The offset to page from, provided from the previous call as the &quot;next&quot; value, for the next result set. For the first call, do not supply an offset.

  • :limit (Integer)

    The maximum records to return. [1-10000] (default to 100)

  • :sort (String)

    The property to sort by (e.g. status.desc or hostname.asc). If not specified, the default sort will be device_id.asc. This should be supplied for each consecutive call.

  • :filter (String)

    The filter expression that should be used to limit the results. This should be supplied for each consecutive call.

  • :fields (String)

    The fields to return, comma delimited if specifying more than one field. For example: fields&#x3D;hostname,device_id would return device records only containing the hostname and device_id

Returns:



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
181
182
183
184
# File 'lib/crimson-falcon/api/hosts.rb', line 133

def combined_hidden_devices_by_filter_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.combined_hidden_devices_by_filter ...'
  end
  allowable_values = ["device_policies.network-scan-content.applied", "device_policies.exposure-management.applied", "device_policies.logscale-collector.policy_type", "last_login_timestamp", "system_manufacturer", "modified_timestamp", "device_policies.host-retention.policy_id", "service_provider_account_id", "managed_apps.identity-protection.version", "device_policies.remote_response.applied", "linux_sensor_mode", "device_policies.kubernetes-admission-control.policy_type", "device_policies.system-tray.policy_id", "device_policies.system-tray.applied", "device_policies.aws-verified-access.applied", "device_policies.firewall.rule_set_id", "pod_id", "default_gateway_ip", "device_policies.fem-browser-extension-control.applied", "site_name", "device_policies.identity-endpoint.policy_id", "device_policies.jumpcloud.policy_type", "device_policies.mobile.applied", "tags", "pod_labels", "device_policies.aidr.policy_id", "device_policies.content-update.policy_id", "device_policies.data-protection.policy_id", "serial_number", "device_policies.exposure-management.policy_id", "device_id", "device_policies.data-protection.applied", "_all", "kernel_version", "pod_ip6", "license_activation_state", "last_reboot", "bios_manufacturer", "release_group", "device_policies.sensor_update.policy_id", "device_policies.airlock.applied", "device_policies.identity-protection.policy_id", "device_policies.identity-endpoint.policy_type", "device_policies.firewall.policy_id", "managed_apps.jumpcloud.version", "config_id_platform", "external_ip", "ou", "platform_name", "device_policies.netskope.policy_id", "device_policies.consumer-subscription.policy_type", "device_policies.host-retention.applied", "pod_namespace", "policies.policy_type", "device_policies.identity-endpoint.applied", "device_policies.firewall.policy_type", "email", "criticality", "minor_version", "product_type", "device_policies.sensor_update.uninstall_protection", "device_policies.it-automation.policy_id", "managed_apps.aws-verified-access.version", "pod_ip4", "connection_mac_address", "policy_id", "policies.policy_id", "device_policies.cloud-ml.policy_type", "device_policies.data-protection-cloud.applied", "mac_address", "k8s_cluster_git_version", "device_policies.exposure-management.policy_type", "device_policies.logscale-collector.policy_id", "machine_domain", "group_hash", "connection_ip", "device_policies.aidr.policy_type", "last_seen", "device_policies.sensor_update.policy_type", "device_policies.automox.policy_type", "device_policies.browser-extension.applied", "device_policies.fem-browser-extension-control.policy_id", "device_policies.application-abuse-prevention.policy_id", "device_policies.aidr.applied", "last_login_user_sid", "device_policies.cloud-ml.applied", "device_policies.it-automation.policy_type", "pointer_size", "device_policies.network-scan-content.policy_id", "agent_version", "device_policies.sensor_update.applied", "device_policies.mobile.policy_type", "device_policies.mobile.policy_id", "cpu_signature", "config_id_build", "device_policies.jumpcloud.policy_id", "device_policies.aws-verified-access.policy_type", "managed_apps.netskope.version", "device_policies.application-abuse-prevention.applied", "product_type_desc", "device_policies.automox.applied", "device_policies.data-protection-cloud.policy_type", "device_policies.firewall.applied", "reduced_functionality_mode", "pod_hostname", "device_policies.network-scan-content.policy_type", "config_id_base", "safe_mode", "device_policies.ztl.policy_id", "service_provider", "groups", "major_version", "device_policies.automox.policy_id", "device_policies.vulnerability-management.policy_type", "device_policies.sca.applied", "device_policies.remote_response.policy_type", "pod_annotations", "device_policies.logscale-collector.applied", "device_policies.prevention.applied", "device_policies.identity-protection.applied", "device_policies.sca.policy_id", "device_policies.aws-verified-access.policy_id", "deployment_type", "cid", "first_seen", "os_build", "device_policies.vulnerability-management.applied", "pod_name", "device_policies.fem-browser-extension-control.policy_type", "device_policies.fim.applied", "device_policies.it-automation.applied", "pod_service_account_name", "migration_completed_time", "device_policies.application-abuse-prevention.policy_type", "device_policies.device_control.policy_type", "device_policies.device_control.applied", "device_policies.netskope.policy_type", "device_policies.content-update.policy_type", "device_policies.airlock.policy_type", "device_policies.airlock.policy_id", "device_policies.sca.policy_type", "instance_id", "managed_apps.automox.version", "status", "device_policies.ztl.policy_type", "device_policies.kubernetes-admission-control.policy_id", "device_policies.consumer-subscription.policy_id", "device_policies.content-update.applied", "device_policies.host-retention.policy_type", "k8s_cluster_version", "agent_load_flags", "bios_version", "hostname", "last_login_uid", "local_ip", "os_version", "device_policies.data-protection-cloud.policy_id", "managed_apps.airlock.version", "platform_id", "system_product_name", "device_policies.ztl.applied", "device_policies.fim.policy_type", "device_policies.vulnerability-management.policy_id", "rtr_state", "detection_suppression_status", "device_policies.browser-extension.policy_id", "first_login_timestamp", "device_policies.netskope.applied", "device_policies.consumer-subscription.applied", "device_policies.data-protection.policy_type", "chassis_type_desc", "first_login_user", "last_login_user", "device_policies.prevention.policy_id", "device_policies.device_control.policy_id", "device_policies.identity-protection.policy_type", "device_policies.jumpcloud.applied", "device_policies.fim.policy_id", "cpu_vendor", "device_policies.kubernetes-admission-control.applied", "device_policies.remote_response.policy_id", "pod_host_ip6", "k8s_cluster_id", "host_utc_offset", "filesystem_containment_status", "device_policies.browser-extension.policy_type", "policies.applied", "device_policies.prevention.policy_type", "device_policies.system-tray.policy_type", "device_policies.cloud-ml.policy_id", "local_ip.raw", "zone_group", "os_product_name", "chassis_type", "pod_host_ip4", "internet_exposure"]
  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/devices-hidden/v1'

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

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

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

#entities_perform_action(ids, action_name, body, opts = {}) ⇒ DeviceapiGroupsResponseV1

Performs the specified action on the provided group IDs.

Parameters:

  • ids (Array<String>)

    The group ids to act on

  • action_name (String)

    The action to perform.

  • body (MsaEntityActionRequest)
  • 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:



193
194
195
196
# File 'lib/crimson-falcon/api/hosts.rb', line 193

def entities_perform_action(ids, action_name, body, opts = {})
  data, _status_code, _headers = entities_perform_action_with_http_info(ids, action_name, body, opts)
  data
end

#entities_perform_action_with_http_info(ids, action_name, body, opts = {}) ⇒ Array<(DeviceapiGroupsResponseV1, Integer, Hash)>

Performs the specified action on the provided group IDs.

Parameters:

  • ids (Array<String>)

    The group ids to act on

  • action_name (String)

    The action to perform.

  • body (MsaEntityActionRequest)
  • 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<(DeviceapiGroupsResponseV1, Integer, Hash)>)

    DeviceapiGroupsResponseV1 data, response status code and response headers



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
269
270
271
272
# File 'lib/crimson-falcon/api/hosts.rb', line 205

def entities_perform_action_with_http_info(ids, action_name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.entities_perform_action ...'
  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 Hosts.entities_perform_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 Hosts.entities_perform_action"
  end
  # verify enum value
  allowable_values = ["add_group_member", "remove_all", "remove_group_member"]
  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 Hosts.entities_perform_action"
  end
  # resource path
  local_var_path = '/devices/entities/group-actions/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)
  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] || 'DeviceapiGroupsResponseV1'

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

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

#get_device_details_v2(ids, opts = {}) ⇒ DeviceapiDeviceDetailsResponseSwagger

Get details on one or more hosts by providing host IDs as a query parameter. Supports up to a maximum 100 IDs.

Parameters:

  • ids (Array<String>)

    The host agentIDs used to get details on

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

    the optional parameters

Returns:



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

def get_device_details_v2(ids, opts = {})
  data, _status_code, _headers = get_device_details_v2_with_http_info(ids, opts)
  data
end

#get_device_details_v2_with_http_info(ids, opts = {}) ⇒ Array<(DeviceapiDeviceDetailsResponseSwagger, Integer, Hash)>

Get details on one or more hosts by providing host IDs as a query parameter. Supports up to a maximum 100 IDs.

Parameters:

  • ids (Array<String>)

    The host agentIDs used to get details on

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

    the optional parameters

Returns:



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# File 'lib/crimson-falcon/api/hosts.rb', line 287

def get_device_details_v2_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.get_device_details_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 Hosts.get_device_details_v2"
  end
  if @api_client.config.client_side_validation && ids.length > 100
    fail ArgumentError, 'invalid value for "ids" when calling Hosts.get_device_details_v2, number of items must be less than or equal to 100.'
  end

  # resource path
  local_var_path = '/devices/entities/devices/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] || 'DeviceapiDeviceDetailsResponseSwagger'

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

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

#get_online_state_v1(ids, opts = {}) ⇒ StateOnlineStateRespV1

Get the online status for one or more hosts by specifying each host’s unique ID. Successful requests return an HTTP 200 response and the status for each host identified by a ‘state` of `online`, `offline`, or `unknown` for each host, identified by host `id`. Make a `GET` request to `/devices/queries/devices/v1` to get a list of host IDs.

Parameters:

  • ids (Array<String>)

    The unique ID of the host to get the online status of.

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

    the optional parameters

Returns:



344
345
346
347
# File 'lib/crimson-falcon/api/hosts.rb', line 344

def get_online_state_v1(ids, opts = {})
  data, _status_code, _headers = get_online_state_v1_with_http_info(ids, opts)
  data
end

#get_online_state_v1_with_http_info(ids, opts = {}) ⇒ Array<(StateOnlineStateRespV1, Integer, Hash)>

Get the online status for one or more hosts by specifying each host’s unique ID. Successful requests return an HTTP 200 response and the status for each host identified by a &#x60;state&#x60; of &#x60;online&#x60;, &#x60;offline&#x60;, or &#x60;unknown&#x60; for each host, identified by host &#x60;id&#x60;. Make a &#x60;GET&#x60; request to &#x60;/devices/queries/devices/v1&#x60; to get a list of host IDs.

Parameters:

  • ids (Array<String>)

    The unique ID of the host to get the online status of.

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

    the optional parameters

Returns:

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

    StateOnlineStateRespV1 data, response status code and response headers



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

def get_online_state_v1_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.get_online_state_v1 ...'
  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 Hosts.get_online_state_v1"
  end
  # resource path
  local_var_path = '/devices/entities/online-state/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] || 'StateOnlineStateRespV1'

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

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

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

#perform_action_v2(action_name, body, opts = {}) ⇒ MsaReplyAffectedEntities

Take various actions on the hosts in your environment. Contain or lift containment on a host. Delete or restore a host.

Parameters:

  • action_name (String)

    Specify one of these actions: - &#x60;contain&#x60; - This action contains the host, which stops any network communications to locations other than the CrowdStrike cloud and IPs specified in your [containment policy](falcon.crowdstrike.com/support/documentation/11/getting-started-guide#containmentpolicy) - &#x60;lift_containment&#x60;: This action lifts containment on the host, which returns its network communications to normal - &#x60;hide_host&#x60;: This action will delete a host. After the host is deleted, no new detections for that host will be reported via UI or APIs - &#x60;unhide_host&#x60;: This action will restore a host. Detection reporting will resume after the host is restored

  • body (MsaEntityActionRequestV2)

    The host agent ID (AID) of the host you want to contain. Get an agent ID from a detection, the Falcon console, or the Streaming API. Provide the ID in JSON format with the key &#x60;ids&#x60; and the value in square brackets, such as: &#x60;&quot;ids&quot;: [&quot;123456789&quot;]&#x60;

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

    the optional parameters

Returns:



407
408
409
410
# File 'lib/crimson-falcon/api/hosts.rb', line 407

def perform_action_v2(action_name, body, opts = {})
  data, _status_code, _headers = perform_action_v2_with_http_info(action_name, body, opts)
  data
end

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

Take various actions on the hosts in your environment. Contain or lift containment on a host. Delete or restore a host.

Parameters:

  • action_name (String)

    Specify one of these actions: - &#x60;contain&#x60; - This action contains the host, which stops any network communications to locations other than the CrowdStrike cloud and IPs specified in your [containment policy](falcon.crowdstrike.com/support/documentation/11/getting-started-guide#containmentpolicy) - &#x60;lift_containment&#x60;: This action lifts containment on the host, which returns its network communications to normal - &#x60;hide_host&#x60;: This action will delete a host. After the host is deleted, no new detections for that host will be reported via UI or APIs - &#x60;unhide_host&#x60;: This action will restore a host. Detection reporting will resume after the host is restored

  • body (MsaEntityActionRequestV2)

    The host agent ID (AID) of the host you want to contain. Get an agent ID from a detection, the Falcon console, or the Streaming API. Provide the ID in JSON format with the key &#x60;ids&#x60; and the value in square brackets, such as: &#x60;&quot;ids&quot;: [&quot;123456789&quot;]&#x60;

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

    the optional parameters

Returns:

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

    MsaReplyAffectedEntities data, response status code and response headers



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/hosts.rb', line 417

def perform_action_v2_with_http_info(action_name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.perform_action_v2 ...'
  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 Hosts.perform_action_v2"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Hosts.perform_action_v2"
  end
  # resource path
  local_var_path = '/devices/entities/devices-actions/v2'

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

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

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

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

#post_device_details_v2(body, opts = {}) ⇒ DeviceapiDeviceDetailsResponseSwagger

Get details on one or more hosts by providing host IDs in a POST body. Supports up to a maximum 5000 IDs.

Parameters:

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

    the optional parameters

Returns:



479
480
481
482
# File 'lib/crimson-falcon/api/hosts.rb', line 479

def post_device_details_v2(body, opts = {})
  data, _status_code, _headers = post_device_details_v2_with_http_info(body, opts)
  data
end

#post_device_details_v2_with_http_info(body, opts = {}) ⇒ Array<(DeviceapiDeviceDetailsResponseSwagger, Integer, Hash)>

Get details on one or more hosts by providing host IDs in a POST body. Supports up to a maximum 5000 IDs.

Parameters:

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

    the optional parameters

Returns:



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

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

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

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

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

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

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

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

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

#query_device_login_history(body, opts = {}) ⇒ DeviceapiLoginHistoryResponseV1

Retrieve details about recent login sessions for a set of devices.

Parameters:

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

    the optional parameters

Returns:



545
546
547
548
# File 'lib/crimson-falcon/api/hosts.rb', line 545

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

#query_device_login_history_v2(body, opts = {}) ⇒ DeviceapiLoginHistoryResponseV1

Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of results to return [1-100]. (default to 10)

  • :from (String)

    The inclusive beginning of the time window to search. (default to ‘now-7d’)

  • :to (String)

    The inclusive end of the time window to search. (default to ‘now’)

Returns:



614
615
616
617
# File 'lib/crimson-falcon/api/hosts.rb', line 614

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

#query_device_login_history_v2_with_http_info(body, opts = {}) ⇒ Array<(DeviceapiLoginHistoryResponseV1, Integer, Hash)>

Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum number of results to return [1-100]. (default to 10)

  • :from (String)

    The inclusive beginning of the time window to search. (default to ‘now-7d’)

  • :to (String)

    The inclusive end of the time window to search. (default to ‘now’)

Returns:



626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/crimson-falcon/api/hosts.rb', line 626

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.query_device_login_history_v2 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Hosts.query_device_login_history_v2"
  end
  # resource path
  local_var_path = '/devices/combined/devices/login-history/v2'

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

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

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

#query_device_login_history_with_http_info(body, opts = {}) ⇒ Array<(DeviceapiLoginHistoryResponseV1, Integer, Hash)>

Retrieve details about recent login sessions for a set of devices.

Parameters:

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

    the optional parameters

Returns:



554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
# File 'lib/crimson-falcon/api/hosts.rb', line 554

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.query_device_login_history ...'
  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 Hosts.query_device_login_history"
  end
  # resource path
  local_var_path = '/devices/combined/devices/login-history/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] || 'DeviceapiLoginHistoryResponseV1'

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

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

#query_devices_by_filter(opts = {}) ⇒ MsaQueryResponse

Search for hosts in your environment by platform, hostname, IP, and other criteria.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g. status.desc or hostname.asc)

  • :filter (String)

    The filter expression that should be used to limit the results

Returns:



689
690
691
692
# File 'lib/crimson-falcon/api/hosts.rb', line 689

def query_devices_by_filter(opts = {})
  data, _status_code, _headers = query_devices_by_filter_with_http_info(opts)
  data
end

#query_devices_by_filter_scroll(opts = {}) ⇒ DeviceapiDeviceResponse

Search for hosts in your environment by platform, hostname, IP, and other criteria with continuous pagination capability (based on offset pointer which expires after 2 minutes with no maximum limit)

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :offset (String)

    The offset to page from, provided from the previous scroll call, for the next result set. For the first call, do not supply an offset.

  • :limit (Integer)

    The maximum records to return. [1-10000]

  • :sort (String)

    The property to sort by (e.g. status.desc or hostname.asc)

  • :filter (String)

    The filter expression that should be used to limit the results

Returns:



756
757
758
759
# File 'lib/crimson-falcon/api/hosts.rb', line 756

def query_devices_by_filter_scroll(opts = {})
  data, _status_code, _headers = query_devices_by_filter_scroll_with_http_info(opts)
  data
end

#query_devices_by_filter_scroll_with_http_info(opts = {}) ⇒ Array<(DeviceapiDeviceResponse, Integer, Hash)>

Search for hosts in your environment by platform, hostname, IP, and other criteria with continuous pagination capability (based on offset pointer which expires after 2 minutes with no maximum limit)

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :offset (String)

    The offset to page from, provided from the previous scroll call, for the next result set. For the first call, do not supply an offset.

  • :limit (Integer)

    The maximum records to return. [1-10000]

  • :sort (String)

    The property to sort by (e.g. status.desc or hostname.asc)

  • :filter (String)

    The filter expression that should be used to limit the results

Returns:

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

    DeviceapiDeviceResponse data, response status code and response headers



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
803
804
805
806
807
808
809
810
811
812
813
814
# File 'lib/crimson-falcon/api/hosts.rb', line 768

def query_devices_by_filter_scroll_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.query_devices_by_filter_scroll ...'
  end
  # resource path
  local_var_path = '/devices/queries/devices-scroll/v1'

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

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

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

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

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

Search for hosts in your environment by platform, hostname, IP, and other criteria.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g. status.desc or hostname.asc)

  • :filter (String)

    The filter expression that should be used to limit the results

Returns:

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

    MsaQueryResponse data, response status code and response headers



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
741
742
743
744
745
746
747
# File 'lib/crimson-falcon/api/hosts.rb', line 701

def query_devices_by_filter_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.query_devices_by_filter ...'
  end
  # resource path
  local_var_path = '/devices/queries/devices/v1'

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

  # 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 => :"Hosts.query_devices_by_filter",
    :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: Hosts#query_devices_by_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#query_get_network_address_history_v1(body, opts = {}) ⇒ DeviceapiNetworkAddressHistoryResponseV1

Retrieve history of IP and MAC addresses of devices.

Parameters:

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

    the optional parameters

Returns:



820
821
822
823
# File 'lib/crimson-falcon/api/hosts.rb', line 820

def query_get_network_address_history_v1(body, opts = {})
  data, _status_code, _headers = query_get_network_address_history_v1_with_http_info(body, opts)
  data
end

#query_get_network_address_history_v1_with_http_info(body, opts = {}) ⇒ Array<(DeviceapiNetworkAddressHistoryResponseV1, Integer, Hash)>

Retrieve history of IP and MAC addresses of devices.

Parameters:

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

    the optional parameters

Returns:



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
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
# File 'lib/crimson-falcon/api/hosts.rb', line 829

def query_get_network_address_history_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.query_get_network_address_history_v1 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling Hosts.query_get_network_address_history_v1"
  end
  # resource path
  local_var_path = '/devices/combined/devices/network-address-history/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] || 'DeviceapiNetworkAddressHistoryResponseV1'

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

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

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

#query_hidden_devices(opts = {}) ⇒ MsaQueryResponse

Retrieve hidden hosts that match the provided filter criteria.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g. status.desc or hostname.asc)

  • :filter (String)

    The filter expression that should be used to limit the results

Returns:



889
890
891
892
# File 'lib/crimson-falcon/api/hosts.rb', line 889

def query_hidden_devices(opts = {})
  data, _status_code, _headers = query_hidden_devices_with_http_info(opts)
  data
end

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

Retrieve hidden hosts that match the provided filter criteria.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :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 (e.g. status.desc or hostname.asc)

  • :filter (String)

    The filter expression that should be used to limit the results

Returns:

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

    MsaQueryResponse data, response status code and response headers



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
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
# File 'lib/crimson-falcon/api/hosts.rb', line 901

def query_hidden_devices_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.query_hidden_devices ...'
  end
  # resource path
  local_var_path = '/devices/queries/devices-hidden/v1'

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

  # 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 => :"Hosts.query_hidden_devices",
    :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: Hosts#query_hidden_devices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_device_tags(body, opts = {}) ⇒ DeviceapiUpdateDeviceTagsSwaggerV1

Append or remove one or more Falcon Grouping Tags on one or more hosts. Tags must be of the form FalconGroupingTags/

Parameters:

Returns:



953
954
955
956
# File 'lib/crimson-falcon/api/hosts.rb', line 953

def update_device_tags(body, opts = {})
  data, _status_code, _headers = update_device_tags_with_http_info(body, opts)
  data
end

#update_device_tags_with_http_info(body, opts = {}) ⇒ Array<(DeviceapiUpdateDeviceTagsSwaggerV1, Integer, Hash)>

Append or remove one or more Falcon Grouping Tags on one or more hosts. Tags must be of the form FalconGroupingTags/

Parameters:

Returns:



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
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
# File 'lib/crimson-falcon/api/hosts.rb', line 962

def update_device_tags_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: Hosts.update_device_tags ...'
  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 Hosts.update_device_tags"
  end
  # resource path
  local_var_path = '/devices/entities/devices/tags/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] || 'DeviceapiUpdateDeviceTagsSwaggerV1'

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

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