Class: Falcon::DownloadsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DownloadsApi

Returns a new instance of DownloadsApi.



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

def api_client
  @api_client
end

Instance Method Details

#enumerate_file(opts = {}) ⇒ ModelsEntitiesResponse

Enumerates a list of files available for CID

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :file_name (String)

    Apply filtering on file name

  • :file_version (String)

    Apply filtering on file version

  • :platform (String)

    Apply filtering on file platform

  • :os (String)

    Apply filtering on operating system

  • :arch (String)

    Apply filtering on architecture

  • :category (String)

    Apply filtering on file category

Returns:



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

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

#enumerate_file_with_http_info(opts = {}) ⇒ Array<(ModelsEntitiesResponse, Integer, Hash)>

Enumerates a list of files available for CID

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :file_name (String)

    Apply filtering on file name

  • :file_version (String)

    Apply filtering on file version

  • :platform (String)

    Apply filtering on file platform

  • :os (String)

    Apply filtering on operating system

  • :arch (String)

    Apply filtering on architecture

  • :category (String)

    Apply filtering on file category

Returns:

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

    ModelsEntitiesResponse data, response status code and response headers



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

def enumerate_file_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DownloadsApi.enumerate_file ...'
  end
  # resource path
  local_var_path = '/csdownloads/entities/files/enumerate/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'file_name'] = opts[:'file_name'] if !opts[:'file_name'].nil?
  query_params[:'file_version'] = opts[:'file_version'] if !opts[:'file_version'].nil?
  query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
  query_params[:'os'] = opts[:'os'] if !opts[:'os'].nil?
  query_params[:'arch'] = opts[:'arch'] if !opts[:'arch'].nil?
  query_params[:'category'] = opts[:'category'] if !opts[:'category'].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] || 'ModelsEntitiesResponse'

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

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

#fetch_files_download_info(opts = {}) ⇒ ModelsEntitiesResponse

Get files info and pre-signed download URLs

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Search files using various filters using query in Falcon Query Language (FQL). Supported filters: arch,category,file_name,file_version,os

  • :sort (String)

    The fields to sort records on. Supported columns: - &#x60;arch&#x60; - &#x60;category&#x60; - &#x60;file_name&#x60; - &#x60;file_version&#x60; - &#x60;os&#x60;

Returns:



116
117
118
119
# File 'lib/crimson-falcon/api/downloads_api.rb', line 116

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

#fetch_files_download_info_v2(opts = {}) ⇒ ModelsCombinedFilesDownloadResponse

Get cloud security tools info and pre-signed download URLs

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Search files using various filters. Supported filters: arch,category,file_name,file_version,os

  • :sort (String)

    The fields to sort records on. Supported columns: - &#x60;arch&#x60; - &#x60;category&#x60; - &#x60;file_name&#x60; - &#x60;file_version&#x60; - &#x60;os&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. Maximum limit: 100. (default to 100)

  • :offset (Integer)

    The offset from where to begin. Maximum offset &#x3D; 1000 - limit.

Returns:



179
180
181
182
# File 'lib/crimson-falcon/api/downloads_api.rb', line 179

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

#fetch_files_download_info_v2_with_http_info(opts = {}) ⇒ Array<(ModelsCombinedFilesDownloadResponse, Integer, Hash)>

Get cloud security tools info and pre-signed download URLs

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Search files using various filters. Supported filters: arch,category,file_name,file_version,os

  • :sort (String)

    The fields to sort records on. Supported columns: - &#x60;arch&#x60; - &#x60;category&#x60; - &#x60;file_name&#x60; - &#x60;file_version&#x60; - &#x60;os&#x60;

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. Maximum limit: 100. (default to 100)

  • :offset (Integer)

    The offset from where to begin. Maximum offset &#x3D; 1000 - limit.

Returns:



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
228
229
230
231
232
233
234
235
236
237
# File 'lib/crimson-falcon/api/downloads_api.rb', line 191

def fetch_files_download_info_v2_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DownloadsApi.fetch_files_download_info_v2 ...'
  end
  # resource path
  local_var_path = '/csdownloads/combined/files-download/v2'

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

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

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

#fetch_files_download_info_with_http_info(opts = {}) ⇒ Array<(ModelsEntitiesResponse, Integer, Hash)>

Get files info and pre-signed download URLs

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Search files using various filters using query in Falcon Query Language (FQL). Supported filters: arch,category,file_name,file_version,os

  • :sort (String)

    The fields to sort records on. Supported columns: - &#x60;arch&#x60; - &#x60;category&#x60; - &#x60;file_name&#x60; - &#x60;file_version&#x60; - &#x60;os&#x60;

Returns:

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

    ModelsEntitiesResponse data, response status code and response headers



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
166
167
168
169
170
# File 'lib/crimson-falcon/api/downloads_api.rb', line 126

def fetch_files_download_info_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DownloadsApi.fetch_files_download_info ...'
  end
  # resource path
  local_var_path = '/csdownloads/combined/files-download/v1'

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

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

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