Class: Algolia::IngestionClient

Inherits:
Object
  • Object
show all
Defined in:
lib/algolia/api/ingestion_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config = nil) ⇒ IngestionClient

Returns a new instance of IngestionClient.



7
8
9
10
11
12
13
# File 'lib/algolia/api/ingestion_client.rb', line 7

def initialize(config = nil)
  raise '`config` is missing.' if config.nil?
  raise '`app_id` is missing.' if config.app_id.nil? || config.app_id == ''
  raise '`api_key` is missing.' if config.api_key.nil? || config.api_key == ''

  @api_client = Algolia::ApiClient.new(config)
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



5
6
7
# File 'lib/algolia/api/ingestion_client.rb', line 5

def api_client
  @api_client
end

Class Method Details

.create(app_id, api_key, region = nil, opts = {}) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/algolia/api/ingestion_client.rb', line 15

def self.create(app_id, api_key, region = nil, opts = {})
  hosts = []
  regions = ['eu', 'us']

  if region.is_a?(Hash) && (opts.nil? || opts.empty?)
    opts = region
    region = nil
  end

  raise "`region` is required and must be one of the following: #{regions.join(', ')}" if region.nil? || !region.is_a?(String) || !regions.include?(region)

  hosts << Transport::StatefulHost.new('data.{region}.algolia.com'.sub!('{region}', region), accept: CallType::READ | CallType::WRITE)

  config = Algolia::Configuration.new(app_id, api_key, hosts, 'Ingestion', opts)
  create_with_config(config)
end

.create_with_config(config) ⇒ Object



32
33
34
# File 'lib/algolia/api/ingestion_client.rb', line 32

def self.create_with_config(config)
  new(config)
end

Instance Method Details

#create_authentication(authentication_create, request_options = {}) ⇒ AuthenticationCreateResponse

Create a authentication.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_create (AuthenticationCreate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (AuthenticationCreateResponse)


79
80
81
82
# File 'lib/algolia/api/ingestion_client.rb', line 79

def create_authentication(authentication_create, request_options = {})
  response = create_authentication_with_http_info(authentication_create, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::AuthenticationCreateResponse')
end

#create_authentication_with_http_info(authentication_create, request_options = {}) ⇒ Http::Response

Create a authentication.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_create (AuthenticationCreate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/algolia/api/ingestion_client.rb', line 45

def create_authentication_with_http_info(authentication_create, request_options = {})
  # verify the required parameter 'authentication_create' is set
  if @api_client.config.client_side_validation && authentication_create.nil?
    raise ArgumentError, "Parameter `authentication_create` is required when calling `create_authentication`."
  end

  path = '/1/authentications'
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(authentication_create)

  new_options = request_options.merge(
    :operation => :'IngestionClient.create_authentication',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#create_destination(destination_create, request_options = {}) ⇒ DestinationCreateResponse

Create a destination.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_create (DestinationCreate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (DestinationCreateResponse)


127
128
129
130
# File 'lib/algolia/api/ingestion_client.rb', line 127

def create_destination(destination_create, request_options = {})
  response = create_destination_with_http_info(destination_create, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DestinationCreateResponse')
end

#create_destination_with_http_info(destination_create, request_options = {}) ⇒ Http::Response

Create a destination.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_create (DestinationCreate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/algolia/api/ingestion_client.rb', line 93

def create_destination_with_http_info(destination_create, request_options = {})
  # verify the required parameter 'destination_create' is set
  if @api_client.config.client_side_validation && destination_create.nil?
    raise ArgumentError, "Parameter `destination_create` is required when calling `create_destination`."
  end

  path = '/1/destinations'
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(destination_create)

  new_options = request_options.merge(
    :operation => :'IngestionClient.create_destination',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#create_source(source_create, request_options = {}) ⇒ SourceCreateResponse

Create a source.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_create (SourceCreate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (SourceCreateResponse)


175
176
177
178
# File 'lib/algolia/api/ingestion_client.rb', line 175

def create_source(source_create, request_options = {})
  response = create_source_with_http_info(source_create, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::SourceCreateResponse')
end

#create_source_with_http_info(source_create, request_options = {}) ⇒ Http::Response

Create a source.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_create (SourceCreate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/algolia/api/ingestion_client.rb', line 141

def create_source_with_http_info(source_create, request_options = {})
  # verify the required parameter 'source_create' is set
  if @api_client.config.client_side_validation && source_create.nil?
    raise ArgumentError, "Parameter `source_create` is required when calling `create_source`."
  end

  path = '/1/sources'
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(source_create)

  new_options = request_options.merge(
    :operation => :'IngestionClient.create_source',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#create_task(task_create, request_options = {}) ⇒ TaskCreateResponse

Parameters:

  • task_create (TaskCreate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (TaskCreateResponse)


215
216
217
218
# File 'lib/algolia/api/ingestion_client.rb', line 215

def create_task(task_create, request_options = {})
  response = create_task_with_http_info(task_create, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::TaskCreateResponse')
end

#create_task_with_http_info(task_create, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • task_create (TaskCreate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/algolia/api/ingestion_client.rb', line 185

def create_task_with_http_info(task_create, request_options = {})
  # verify the required parameter 'task_create' is set
  if @api_client.config.client_side_validation && task_create.nil?
    raise ArgumentError, "Parameter `task_create` is required when calling `create_task`."
  end

  path = '/1/tasks'
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_create)

  new_options = request_options.merge(
    :operation => :'IngestionClient.create_task',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#custom_delete(path, parameters = nil, request_options = {}) ⇒ Object

Parameters:

  • path (String)

    Path of the endpoint, anything after &quot;/1&quot; must be specified. (required)

  • parameters (Hash<String, Object>) (defaults to: nil)

    Query parameters to apply to the current query.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Object)


258
259
260
261
# File 'lib/algolia/api/ingestion_client.rb', line 258

def custom_delete(path, parameters = nil, request_options = {})
  response = custom_delete_with_http_info(path, parameters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end

#custom_delete_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • path (String)

    Path of the endpoint, anything after &quot;/1&quot; must be specified. (required)

  • parameters (Hash<String, Object>) (defaults to: nil)

    Query parameters to apply to the current query.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



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
# File 'lib/algolia/api/ingestion_client.rb', line 226

def custom_delete_with_http_info(path, parameters = nil, request_options = {})
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    raise ArgumentError, "Parameter `path` is required when calling `custom_delete`."
  end

  path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
  query_params = {}
  query_params = query_params.merge(parameters) unless parameters.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.custom_delete',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:DELETE, path, new_options)
end

#custom_get(path, parameters = nil, request_options = {}) ⇒ Object

Parameters:

  • path (String)

    Path of the endpoint, anything after &quot;/1&quot; must be specified. (required)

  • parameters (Hash<String, Object>) (defaults to: nil)

    Query parameters to apply to the current query.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Object)


301
302
303
304
# File 'lib/algolia/api/ingestion_client.rb', line 301

def custom_get(path, parameters = nil, request_options = {})
  response = custom_get_with_http_info(path, parameters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end

#custom_get_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • path (String)

    Path of the endpoint, anything after &quot;/1&quot; must be specified. (required)

  • parameters (Hash<String, Object>) (defaults to: nil)

    Query parameters to apply to the current query.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



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
# File 'lib/algolia/api/ingestion_client.rb', line 269

def custom_get_with_http_info(path, parameters = nil, request_options = {})
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    raise ArgumentError, "Parameter `path` is required when calling `custom_get`."
  end

  path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
  query_params = {}
  query_params = query_params.merge(parameters) unless parameters.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.custom_get',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#custom_post(path, parameters = nil, body = nil, request_options = {}) ⇒ Object

Parameters:

  • path (String)

    Path of the endpoint, anything after &quot;/1&quot; must be specified. (required)

  • parameters (Hash<String, Object>) (defaults to: nil)

    Query parameters to apply to the current query.

  • body (Object) (defaults to: nil)

    Parameters to send with the custom request.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Object)


346
347
348
349
# File 'lib/algolia/api/ingestion_client.rb', line 346

def custom_post(path, parameters = nil, body = nil, request_options = {})
  response = custom_post_with_http_info(path, parameters, body, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end

#custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • path (String)

    Path of the endpoint, anything after &quot;/1&quot; must be specified. (required)

  • parameters (Hash<String, Object>) (defaults to: nil)

    Query parameters to apply to the current query.

  • body (Object) (defaults to: nil)

    Parameters to send with the custom request.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



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
# File 'lib/algolia/api/ingestion_client.rb', line 313

def custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {})
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    raise ArgumentError, "Parameter `path` is required when calling `custom_post`."
  end

  path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
  query_params = {}
  query_params = query_params.merge(parameters) unless parameters.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)

  new_options = request_options.merge(
    :operation => :'IngestionClient.custom_post',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#custom_put(path, parameters = nil, body = nil, request_options = {}) ⇒ Object

Parameters:

  • path (String)

    Path of the endpoint, anything after &quot;/1&quot; must be specified. (required)

  • parameters (Hash<String, Object>) (defaults to: nil)

    Query parameters to apply to the current query.

  • body (Object) (defaults to: nil)

    Parameters to send with the custom request.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Object)


391
392
393
394
# File 'lib/algolia/api/ingestion_client.rb', line 391

def custom_put(path, parameters = nil, body = nil, request_options = {})
  response = custom_put_with_http_info(path, parameters, body, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Object')
end

#custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • path (String)

    Path of the endpoint, anything after &quot;/1&quot; must be specified. (required)

  • parameters (Hash<String, Object>) (defaults to: nil)

    Query parameters to apply to the current query.

  • body (Object) (defaults to: nil)

    Parameters to send with the custom request.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



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
# File 'lib/algolia/api/ingestion_client.rb', line 358

def custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {})
  # verify the required parameter 'path' is set
  if @api_client.config.client_side_validation && path.nil?
    raise ArgumentError, "Parameter `path` is required when calling `custom_put`."
  end

  path = '/1{path}'.sub('{' + 'path' + '}', path.to_s)
  query_params = {}
  query_params = query_params.merge(parameters) unless parameters.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(body)

  new_options = request_options.merge(
    :operation => :'IngestionClient.custom_put',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:PUT, path, new_options)
end

#delete_authentication(authentication_id, request_options = {}) ⇒ DeleteResponse

Soft delete the authentication of the given authenticationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    The authentication UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (DeleteResponse)


439
440
441
442
# File 'lib/algolia/api/ingestion_client.rb', line 439

def delete_authentication(authentication_id, request_options = {})
  response = delete_authentication_with_http_info(authentication_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DeleteResponse')
end

#delete_authentication_with_http_info(authentication_id, request_options = {}) ⇒ Http::Response

Soft delete the authentication of the given authenticationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    The authentication UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/algolia/api/ingestion_client.rb', line 405

def delete_authentication_with_http_info(authentication_id, request_options = {})
  # verify the required parameter 'authentication_id' is set
  if @api_client.config.client_side_validation && authentication_id.nil?
    raise ArgumentError, "Parameter `authentication_id` is required when calling `delete_authentication`."
  end

  path = '/1/authentications/{authenticationID}'.sub('{' + 'authenticationID' + '}', Transport.encode_uri(authentication_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.delete_authentication',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:DELETE, path, new_options)
end

#delete_destination(destination_id, request_options = {}) ⇒ DeleteResponse

Soft delete the destination of the given destinationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    The destination UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (DeleteResponse)


487
488
489
490
# File 'lib/algolia/api/ingestion_client.rb', line 487

def delete_destination(destination_id, request_options = {})
  response = delete_destination_with_http_info(destination_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DeleteResponse')
end

#delete_destination_with_http_info(destination_id, request_options = {}) ⇒ Http::Response

Soft delete the destination of the given destinationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    The destination UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# File 'lib/algolia/api/ingestion_client.rb', line 453

def delete_destination_with_http_info(destination_id, request_options = {})
  # verify the required parameter 'destination_id' is set
  if @api_client.config.client_side_validation && destination_id.nil?
    raise ArgumentError, "Parameter `destination_id` is required when calling `delete_destination`."
  end

  path = '/1/destinations/{destinationID}'.sub('{' + 'destinationID' + '}', Transport.encode_uri(destination_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.delete_destination',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:DELETE, path, new_options)
end

#delete_source(source_id, request_options = {}) ⇒ DeleteResponse

Soft delete the source of the given sourceID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (DeleteResponse)


535
536
537
538
# File 'lib/algolia/api/ingestion_client.rb', line 535

def delete_source(source_id, request_options = {})
  response = delete_source_with_http_info(source_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DeleteResponse')
end

#delete_source_with_http_info(source_id, request_options = {}) ⇒ Http::Response

Soft delete the source of the given sourceID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
# File 'lib/algolia/api/ingestion_client.rb', line 501

def delete_source_with_http_info(source_id, request_options = {})
  # verify the required parameter 'source_id' is set
  if @api_client.config.client_side_validation && source_id.nil?
    raise ArgumentError, "Parameter `source_id` is required when calling `delete_source`."
  end

  path = '/1/sources/{sourceID}'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.delete_source',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:DELETE, path, new_options)
end

#delete_task(task_id, request_options = {}) ⇒ DeleteResponse

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (DeleteResponse)


575
576
577
578
# File 'lib/algolia/api/ingestion_client.rb', line 575

def delete_task(task_id, request_options = {})
  response = delete_task_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DeleteResponse')
end

#delete_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
# File 'lib/algolia/api/ingestion_client.rb', line 545

def delete_task_with_http_info(task_id, request_options = {})
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    raise ArgumentError, "Parameter `task_id` is required when calling `delete_task`."
  end

  path = '/1/tasks/{taskID}'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.delete_task',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:DELETE, path, new_options)
end

#disable_task(task_id, request_options = {}) ⇒ TaskUpdateResponse

Disable the task of the given taskID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (TaskUpdateResponse)


623
624
625
626
# File 'lib/algolia/api/ingestion_client.rb', line 623

def disable_task(task_id, request_options = {})
  response = disable_task_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::TaskUpdateResponse')
end

#disable_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response

Disable the task of the given taskID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'lib/algolia/api/ingestion_client.rb', line 589

def disable_task_with_http_info(task_id, request_options = {})
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    raise ArgumentError, "Parameter `task_id` is required when calling `disable_task`."
  end

  path = '/1/tasks/{taskID}/disable'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.disable_task',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:PUT, path, new_options)
end

#enable_task(task_id, request_options = {}) ⇒ TaskUpdateResponse

Enable the task of the given taskID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (TaskUpdateResponse)


671
672
673
674
# File 'lib/algolia/api/ingestion_client.rb', line 671

def enable_task(task_id, request_options = {})
  response = enable_task_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::TaskUpdateResponse')
end

#enable_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response

Enable the task of the given taskID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
# File 'lib/algolia/api/ingestion_client.rb', line 637

def enable_task_with_http_info(task_id, request_options = {})
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    raise ArgumentError, "Parameter `task_id` is required when calling `enable_task`."
  end

  path = '/1/tasks/{taskID}/enable'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.enable_task',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:PUT, path, new_options)
end

#get_authentication(authentication_id, request_options = {}) ⇒ Authentication

Get the authentication of the given authenticationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    The authentication UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Authentication)


719
720
721
722
# File 'lib/algolia/api/ingestion_client.rb', line 719

def get_authentication(authentication_id, request_options = {})
  response = get_authentication_with_http_info(authentication_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Authentication')
end

#get_authentication_with_http_info(authentication_id, request_options = {}) ⇒ Http::Response

Get the authentication of the given authenticationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    The authentication UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
# File 'lib/algolia/api/ingestion_client.rb', line 685

def get_authentication_with_http_info(authentication_id, request_options = {})
  # verify the required parameter 'authentication_id' is set
  if @api_client.config.client_side_validation && authentication_id.nil?
    raise ArgumentError, "Parameter `authentication_id` is required when calling `get_authentication`."
  end

  path = '/1/authentications/{authenticationID}'.sub('{' + 'authenticationID' + '}', Transport.encode_uri(authentication_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_authentication',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_authentications(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {}) ⇒ ListAuthenticationsResponse

Get a list of authentications for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • type (Array<AuthenticationType>) (defaults to: nil)

    The type of the authentications to retrieve.

  • platform (Array<PlatformWithNone>) (defaults to: nil)

    The platform of the authentications to retrieve.

  • sort (AuthenticationSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (ListAuthenticationsResponse)


778
779
780
781
# File 'lib/algolia/api/ingestion_client.rb', line 778

def get_authentications(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {})
  response = get_authentications_with_http_info(items_per_page, page, type, platform, sort, order, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListAuthenticationsResponse')
end

#get_authentications_with_http_info(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response

Get a list of authentications for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • type (Array<AuthenticationType>) (defaults to: nil)

    The type of the authentications to retrieve.

  • platform (Array<PlatformWithNone>) (defaults to: nil)

    The platform of the authentications to retrieve.

  • sort (AuthenticationSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
# File 'lib/algolia/api/ingestion_client.rb', line 738

def get_authentications_with_http_info(items_per_page = nil, page = nil, type = nil, platform = nil, sort = nil, order = nil, request_options = {})
  path = '/1/authentications'
  query_params = {}
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
  query_params[:page] = page unless page.nil?
  query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil?
  query_params[:platform] = @api_client.build_collection_param(platform, :csv) unless platform.nil?
  query_params[:sort] = sort unless sort.nil?
  query_params[:order] = order unless order.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_authentications',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_destination(destination_id, request_options = {}) ⇒ Destination

Get the destination of the given destinationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    The destination UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Destination)


826
827
828
829
# File 'lib/algolia/api/ingestion_client.rb', line 826

def get_destination(destination_id, request_options = {})
  response = get_destination_with_http_info(destination_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Destination')
end

#get_destination_with_http_info(destination_id, request_options = {}) ⇒ Http::Response

Get the destination of the given destinationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    The destination UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
# File 'lib/algolia/api/ingestion_client.rb', line 792

def get_destination_with_http_info(destination_id, request_options = {})
  # verify the required parameter 'destination_id' is set
  if @api_client.config.client_side_validation && destination_id.nil?
    raise ArgumentError, "Parameter `destination_id` is required when calling `get_destination`."
  end

  path = '/1/destinations/{destinationID}'.sub('{' + 'destinationID' + '}', Transport.encode_uri(destination_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_destination',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_destinations(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ ListDestinationsResponse

Get a list of destinations for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • type (Array<DestinationType>) (defaults to: nil)

    The type of the destinations to retrive.

  • authentication_id (Array<String>) (defaults to: nil)

    The authenticationIDs of the destinations to retrive.

  • sort (DestinationSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (ListDestinationsResponse)


885
886
887
888
# File 'lib/algolia/api/ingestion_client.rb', line 885

def get_destinations(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {})
  response = get_destinations_with_http_info(items_per_page, page, type, authentication_id, sort, order, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListDestinationsResponse')
end

#get_destinations_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response

Get a list of destinations for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • type (Array<DestinationType>) (defaults to: nil)

    The type of the destinations to retrive.

  • authentication_id (Array<String>) (defaults to: nil)

    The authenticationIDs of the destinations to retrive.

  • sort (DestinationSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



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
# File 'lib/algolia/api/ingestion_client.rb', line 845

def get_destinations_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {})
  path = '/1/destinations'
  query_params = {}
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
  query_params[:page] = page unless page.nil?
  query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil?
  query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv) unless authentication_id.nil?
  query_params[:sort] = sort unless sort.nil?
  query_params[:order] = order unless order.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_destinations',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_docker_source_streams(source_id, request_options = {}) ⇒ DockerSourceStreams

Retrieve a stream listing for a given Singer specification compatible docker type source ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (DockerSourceStreams)


933
934
935
936
# File 'lib/algolia/api/ingestion_client.rb', line 933

def get_docker_source_streams(source_id, request_options = {})
  response = get_docker_source_streams_with_http_info(source_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DockerSourceStreams')
end

#get_docker_source_streams_with_http_info(source_id, request_options = {}) ⇒ Http::Response

Retrieve a stream listing for a given Singer specification compatible docker type source ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
# File 'lib/algolia/api/ingestion_client.rb', line 899

def get_docker_source_streams_with_http_info(source_id, request_options = {})
  # verify the required parameter 'source_id' is set
  if @api_client.config.client_side_validation && source_id.nil?
    raise ArgumentError, "Parameter `source_id` is required when calling `get_docker_source_streams`."
  end

  path = '/1/sources/{sourceID}/discover'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_docker_source_streams',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_event(run_id, event_id, request_options = {}) ⇒ Event

Get a single event for a specific runID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    The run UUID. (required)

  • event_id (String)

    The event UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Event)


987
988
989
990
# File 'lib/algolia/api/ingestion_client.rb', line 987

def get_event(run_id, event_id, request_options = {})
  response = get_event_with_http_info(run_id, event_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Event')
end

#get_event_with_http_info(run_id, event_id, request_options = {}) ⇒ Http::Response

Get a single event for a specific runID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    The run UUID. (required)

  • event_id (String)

    The event UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
# File 'lib/algolia/api/ingestion_client.rb', line 948

def get_event_with_http_info(run_id, event_id, request_options = {})
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    raise ArgumentError, "Parameter `run_id` is required when calling `get_event`."
  end
  # verify the required parameter 'event_id' is set
  if @api_client.config.client_side_validation && event_id.nil?
    raise ArgumentError, "Parameter `event_id` is required when calling `get_event`."
  end

  path = '/1/runs/{runID}/events/{eventID}'.sub('{' + 'runID' + '}', Transport.encode_uri(run_id.to_s)).sub('{' + 'eventID' + '}', Transport.encode_uri(event_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_event',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_events(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ ListEventsResponse

Get a list of events associated to the given runID, for the given query parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    The run UUID. (required)

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • status (Array<EventStatus>) (defaults to: nil)

    Filter the status of the events.

  • type (Array<EventType>) (defaults to: nil)

    Filter the type of the events.

  • sort (EventSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • start_date (String) (defaults to: nil)

    The start date (in RFC3339 format) of the events fetching window. Defaults to &#39;now&#39;-3 hours if omitted.

  • end_date (String) (defaults to: nil)

    The end date (in RFC3339 format) of the events fetching window. Defaults to &#39;now&#39; days if omitted.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (ListEventsResponse)


1060
1061
1062
1063
# File 'lib/algolia/api/ingestion_client.rb', line 1060

def get_events(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {})
  response = get_events_with_http_info(run_id, items_per_page, page, status, type, sort, order, start_date, end_date, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListEventsResponse')
end

#get_events_with_http_info(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ Http::Response

Get a list of events associated to the given runID, for the given query parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    The run UUID. (required)

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • status (Array<EventStatus>) (defaults to: nil)

    Filter the status of the events.

  • type (Array<EventType>) (defaults to: nil)

    Filter the type of the events.

  • sort (EventSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • start_date (String) (defaults to: nil)

    The start date (in RFC3339 format) of the events fetching window. Defaults to &#39;now&#39;-3 hours if omitted.

  • end_date (String) (defaults to: nil)

    The end date (in RFC3339 format) of the events fetching window. Defaults to &#39;now&#39; days if omitted.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
# File 'lib/algolia/api/ingestion_client.rb', line 1009

def get_events_with_http_info(run_id, items_per_page = nil, page = nil, status = nil, type = nil, sort = nil, order = nil, start_date = nil, end_date = nil,
                              request_options = {})
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    raise ArgumentError, "Parameter `run_id` is required when calling `get_events`."
  end

  path = '/1/runs/{runID}/events'.sub('{' + 'runID' + '}', Transport.encode_uri(run_id.to_s))
  query_params = {}
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
  query_params[:page] = page unless page.nil?
  query_params[:status] = @api_client.build_collection_param(status, :multi) unless status.nil?
  query_params[:type] = @api_client.build_collection_param(type, :multi) unless type.nil?
  query_params[:sort] = sort unless sort.nil?
  query_params[:order] = order unless order.nil?
  query_params[:startDate] = start_date unless start_date.nil?
  query_params[:endDate] = end_date unless end_date.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_events',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_run(run_id, request_options = {}) ⇒ Run

Get a single run for the given ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    The run UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Run)


1108
1109
1110
1111
# File 'lib/algolia/api/ingestion_client.rb', line 1108

def get_run(run_id, request_options = {})
  response = get_run_with_http_info(run_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Run')
end

#get_run_with_http_info(run_id, request_options = {}) ⇒ Http::Response

Get a single run for the given ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    The run UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
# File 'lib/algolia/api/ingestion_client.rb', line 1074

def get_run_with_http_info(run_id, request_options = {})
  # verify the required parameter 'run_id' is set
  if @api_client.config.client_side_validation && run_id.nil?
    raise ArgumentError, "Parameter `run_id` is required when calling `get_run`."
  end

  path = '/1/runs/{runID}'.sub('{' + 'runID' + '}', Transport.encode_uri(run_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_run',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_runs(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ RunListResponse

Get a list of runs for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • status (Array<RunStatus>) (defaults to: nil)

    Filter the status of the runs.

  • task_id (String) (defaults to: nil)

    Filter by taskID.

  • sort (RunSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • start_date (String) (defaults to: nil)

    The start date (in RFC3339 format) of the runs fetching window. Defaults to &#39;now&#39;-7 days if omitted.

  • end_date (String) (defaults to: nil)

    The end date (in RFC3339 format) of the runs fetching window. Defaults to &#39;now&#39; days if omitted.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (RunListResponse)


1173
1174
1175
1176
# File 'lib/algolia/api/ingestion_client.rb', line 1173

def get_runs(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {})
  response = get_runs_with_http_info(items_per_page, page, status, task_id, sort, order, start_date, end_date, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::RunListResponse')
end

#get_runs_with_http_info(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {}) ⇒ Http::Response

Get a list of runs for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • status (Array<RunStatus>) (defaults to: nil)

    Filter the status of the runs.

  • task_id (String) (defaults to: nil)

    Filter by taskID.

  • sort (RunSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • start_date (String) (defaults to: nil)

    The start date (in RFC3339 format) of the runs fetching window. Defaults to &#39;now&#39;-7 days if omitted.

  • end_date (String) (defaults to: nil)

    The end date (in RFC3339 format) of the runs fetching window. Defaults to &#39;now&#39; days if omitted.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
# File 'lib/algolia/api/ingestion_client.rb', line 1129

def get_runs_with_http_info(items_per_page = nil, page = nil, status = nil, task_id = nil, sort = nil, order = nil, start_date = nil, end_date = nil, request_options = {})
  path = '/1/runs'
  query_params = {}
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
  query_params[:page] = page unless page.nil?
  query_params[:status] = @api_client.build_collection_param(status, :multi) unless status.nil?
  query_params[:taskID] = task_id unless task_id.nil?
  query_params[:sort] = sort unless sort.nil?
  query_params[:order] = order unless order.nil?
  query_params[:startDate] = start_date unless start_date.nil?
  query_params[:endDate] = end_date unless end_date.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_runs',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_source(source_id, request_options = {}) ⇒ Source

Get the source of the given sourceID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Source)


1221
1222
1223
1224
# File 'lib/algolia/api/ingestion_client.rb', line 1221

def get_source(source_id, request_options = {})
  response = get_source_with_http_info(source_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Source')
end

#get_source_with_http_info(source_id, request_options = {}) ⇒ Http::Response

Get the source of the given sourceID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
# File 'lib/algolia/api/ingestion_client.rb', line 1187

def get_source_with_http_info(source_id, request_options = {})
  # verify the required parameter 'source_id' is set
  if @api_client.config.client_side_validation && source_id.nil?
    raise ArgumentError, "Parameter `source_id` is required when calling `get_source`."
  end

  path = '/1/sources/{sourceID}'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_source',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_sources(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ ListSourcesResponse

Get a list of sources for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • type (Array<SourceType>) (defaults to: nil)

    The type of the sources to retrieve.

  • authentication_id (Array<String>) (defaults to: nil)

    The authenticationIDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication.

  • sort (SourceSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (ListSourcesResponse)


1280
1281
1282
1283
# File 'lib/algolia/api/ingestion_client.rb', line 1280

def get_sources(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {})
  response = get_sources_with_http_info(items_per_page, page, type, authentication_id, sort, order, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListSourcesResponse')
end

#get_sources_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response

Get a list of sources for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • type (Array<SourceType>) (defaults to: nil)

    The type of the sources to retrieve.

  • authentication_id (Array<String>) (defaults to: nil)

    The authenticationIDs of the sources to retrieve. &#39;none&#39; returns sources that doesn&#39;t have an authentication.

  • sort (SourceSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'lib/algolia/api/ingestion_client.rb', line 1240

def get_sources_with_http_info(items_per_page = nil, page = nil, type = nil, authentication_id = nil, sort = nil, order = nil, request_options = {})
  path = '/1/sources'
  query_params = {}
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
  query_params[:page] = page unless page.nil?
  query_params[:type] = @api_client.build_collection_param(type, :csv) unless type.nil?
  query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv) unless authentication_id.nil?
  query_params[:sort] = sort unless sort.nil?
  query_params[:order] = order unless order.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_sources',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_task(task_id, request_options = {}) ⇒ Task

Get the task of the given taskID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Task)


1328
1329
1330
1331
# File 'lib/algolia/api/ingestion_client.rb', line 1328

def get_task(task_id, request_options = {})
  response = get_task_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::Task')
end

#get_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response

Get the task of the given taskID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
# File 'lib/algolia/api/ingestion_client.rb', line 1294

def get_task_with_http_info(task_id, request_options = {})
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    raise ArgumentError, "Parameter `task_id` is required when calling `get_task`."
  end

  path = '/1/tasks/{taskID}'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_task',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#get_tasks(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, request_options = {}) ⇒ ListTasksResponse

Get a list of tasks for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • action (Array<ActionType>) (defaults to: nil)

    The action of the tasks to retrieve.

  • enabled (Boolean) (defaults to: nil)

    Whether the task is enabled or not.

  • source_id (Array<String>) (defaults to: nil)

    The sourceIDs of the tasks to retrive.

  • destination_id (Array<String>) (defaults to: nil)

    The destinationIDs of the tasks to retrive.

  • trigger_type (Array<TriggerType>) (defaults to: nil)

    The trigger type of the task.

  • sort (TaskSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (ListTasksResponse)


1397
1398
1399
1400
1401
# File 'lib/algolia/api/ingestion_client.rb', line 1397

def get_tasks(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil,
              request_options = {})
  response = get_tasks_with_http_info(items_per_page, page, action, enabled, source_id, destination_id, trigger_type, sort, order, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::ListTasksResponse')
end

#get_tasks_with_http_info(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil, request_options = {}) ⇒ Http::Response

Get a list of tasks for the given query parameters, with pagination details.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    The number of items per page to return.

  • page (Integer) (defaults to: nil)

    The page number to fetch, starting at 1.

  • action (Array<ActionType>) (defaults to: nil)

    The action of the tasks to retrieve.

  • enabled (Boolean) (defaults to: nil)

    Whether the task is enabled or not.

  • source_id (Array<String>) (defaults to: nil)

    The sourceIDs of the tasks to retrive.

  • destination_id (Array<String>) (defaults to: nil)

    The destinationIDs of the tasks to retrive.

  • trigger_type (Array<TriggerType>) (defaults to: nil)

    The trigger type of the task.

  • sort (TaskSortKeys) (defaults to: nil)

    The key by which the list should be sorted.

  • order (OrderKeys) (defaults to: nil)

    The order of the returned list.

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
# File 'lib/algolia/api/ingestion_client.rb', line 1350

def get_tasks_with_http_info(items_per_page = nil, page = nil, action = nil, enabled = nil, source_id = nil, destination_id = nil, trigger_type = nil, sort = nil, order = nil,
                             request_options = {})
  path = '/1/tasks'
  query_params = {}
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
  query_params[:page] = page unless page.nil?
  query_params[:action] = @api_client.build_collection_param(action, :csv) unless action.nil?
  query_params[:enabled] = enabled unless enabled.nil?
  query_params[:sourceID] = @api_client.build_collection_param(source_id, :csv) unless source_id.nil?
  query_params[:destinationID] = @api_client.build_collection_param(destination_id, :csv) unless destination_id.nil?
  query_params[:triggerType] = @api_client.build_collection_param(trigger_type, :csv) unless trigger_type.nil?
  query_params[:sort] = sort unless sort.nil?
  query_params[:order] = order unless order.nil?
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.get_tasks',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, path, new_options)
end

#run_task(task_id, request_options = {}) ⇒ RunResponse

Run the task of the given taskID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (RunResponse)


1446
1447
1448
1449
# File 'lib/algolia/api/ingestion_client.rb', line 1446

def run_task(task_id, request_options = {})
  response = run_task_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::RunResponse')
end

#run_task_with_http_info(task_id, request_options = {}) ⇒ Http::Response

Run the task of the given taskID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    The task UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
# File 'lib/algolia/api/ingestion_client.rb', line 1412

def run_task_with_http_info(task_id, request_options = {})
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    raise ArgumentError, "Parameter `task_id` is required when calling `run_task`."
  end

  path = '/1/tasks/{taskID}/run'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.run_task',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#search_authentications(authentication_search, request_options = {}) ⇒ Array<Authentication>

Search among authentications with a defined set of parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_search (AuthenticationSearch)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Array<Authentication>)


1494
1495
1496
1497
# File 'lib/algolia/api/ingestion_client.rb', line 1494

def search_authentications(authentication_search, request_options = {})
  response = search_authentications_with_http_info(authentication_search, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array<Ingestion::Authentication>')
end

#search_authentications_with_http_info(authentication_search, request_options = {}) ⇒ Http::Response

Search among authentications with a defined set of parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_search (AuthenticationSearch)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
# File 'lib/algolia/api/ingestion_client.rb', line 1460

def search_authentications_with_http_info(authentication_search, request_options = {})
  # verify the required parameter 'authentication_search' is set
  if @api_client.config.client_side_validation && authentication_search.nil?
    raise ArgumentError, "Parameter `authentication_search` is required when calling `search_authentications`."
  end

  path = '/1/authentications/search'
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(authentication_search)

  new_options = request_options.merge(
    :operation => :'IngestionClient.search_authentications',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#search_destinations(destination_search, request_options = {}) ⇒ Array<Destination>

Search among destinations with a defined set of parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_search (DestinationSearch)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Array<Destination>)


1542
1543
1544
1545
# File 'lib/algolia/api/ingestion_client.rb', line 1542

def search_destinations(destination_search, request_options = {})
  response = search_destinations_with_http_info(destination_search, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array<Ingestion::Destination>')
end

#search_destinations_with_http_info(destination_search, request_options = {}) ⇒ Http::Response

Search among destinations with a defined set of parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_search (DestinationSearch)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
# File 'lib/algolia/api/ingestion_client.rb', line 1508

def search_destinations_with_http_info(destination_search, request_options = {})
  # verify the required parameter 'destination_search' is set
  if @api_client.config.client_side_validation && destination_search.nil?
    raise ArgumentError, "Parameter `destination_search` is required when calling `search_destinations`."
  end

  path = '/1/destinations/search'
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(destination_search)

  new_options = request_options.merge(
    :operation => :'IngestionClient.search_destinations',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#search_sources(source_search, request_options = {}) ⇒ Array<Source>

Search among sources with a defined set of parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_search (SourceSearch)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Array<Source>)


1590
1591
1592
1593
# File 'lib/algolia/api/ingestion_client.rb', line 1590

def search_sources(source_search, request_options = {})
  response = search_sources_with_http_info(source_search, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array<Ingestion::Source>')
end

#search_sources_with_http_info(source_search, request_options = {}) ⇒ Http::Response

Search among sources with a defined set of parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_search (SourceSearch)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
# File 'lib/algolia/api/ingestion_client.rb', line 1556

def search_sources_with_http_info(source_search, request_options = {})
  # verify the required parameter 'source_search' is set
  if @api_client.config.client_side_validation && source_search.nil?
    raise ArgumentError, "Parameter `source_search` is required when calling `search_sources`."
  end

  path = '/1/sources/search'
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(source_search)

  new_options = request_options.merge(
    :operation => :'IngestionClient.search_sources',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#search_tasks(task_search, request_options = {}) ⇒ Array<Task>

Search among tasks with a defined set of parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_search (TaskSearch)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Array<Task>)


1638
1639
1640
1641
# File 'lib/algolia/api/ingestion_client.rb', line 1638

def search_tasks(task_search, request_options = {})
  response = search_tasks_with_http_info(task_search, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Array<Ingestion::Task>')
end

#search_tasks_with_http_info(task_search, request_options = {}) ⇒ Http::Response

Search among tasks with a defined set of parameters.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_search (TaskSearch)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
# File 'lib/algolia/api/ingestion_client.rb', line 1604

def search_tasks_with_http_info(task_search, request_options = {})
  # verify the required parameter 'task_search' is set
  if @api_client.config.client_side_validation && task_search.nil?
    raise ArgumentError, "Parameter `task_search` is required when calling `search_tasks`."
  end

  path = '/1/tasks/search'
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_search)

  new_options = request_options.merge(
    :operation => :'IngestionClient.search_tasks',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#trigger_docker_source_discover(source_id, request_options = {}) ⇒ DockerSourceDiscover

Trigger a stream listing request for a Singer specification compatible docker type source.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (DockerSourceDiscover)


1686
1687
1688
1689
# File 'lib/algolia/api/ingestion_client.rb', line 1686

def trigger_docker_source_discover(source_id, request_options = {})
  response = trigger_docker_source_discover_with_http_info(source_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DockerSourceDiscover')
end

#trigger_docker_source_discover_with_http_info(source_id, request_options = {}) ⇒ Http::Response

Trigger a stream listing request for a Singer specification compatible docker type source.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
# File 'lib/algolia/api/ingestion_client.rb', line 1652

def trigger_docker_source_discover_with_http_info(source_id, request_options = {})
  # verify the required parameter 'source_id' is set
  if @api_client.config.client_side_validation && source_id.nil?
    raise ArgumentError, "Parameter `source_id` is required when calling `trigger_docker_source_discover`."
  end

  path = '/1/sources/{sourceID}/discover'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body]

  new_options = request_options.merge(
    :operation => :'IngestionClient.trigger_docker_source_discover',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:POST, path, new_options)
end

#update_authentication(authentication_id, authentication_update, request_options = {}) ⇒ AuthenticationUpdateResponse

Update the authentication of the given authenticationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    The authentication UUID. (required)

  • authentication_update (AuthenticationUpdate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (AuthenticationUpdateResponse)


1740
1741
1742
1743
# File 'lib/algolia/api/ingestion_client.rb', line 1740

def update_authentication(authentication_id, authentication_update, request_options = {})
  response = update_authentication_with_http_info(authentication_id, authentication_update, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::AuthenticationUpdateResponse')
end

#update_authentication_with_http_info(authentication_id, authentication_update, request_options = {}) ⇒ Http::Response

Update the authentication of the given authenticationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    The authentication UUID. (required)

  • authentication_update (AuthenticationUpdate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
# File 'lib/algolia/api/ingestion_client.rb', line 1701

def update_authentication_with_http_info(authentication_id, authentication_update, request_options = {})
  # verify the required parameter 'authentication_id' is set
  if @api_client.config.client_side_validation && authentication_id.nil?
    raise ArgumentError, "Parameter `authentication_id` is required when calling `update_authentication`."
  end
  # verify the required parameter 'authentication_update' is set
  if @api_client.config.client_side_validation && authentication_update.nil?
    raise ArgumentError, "Parameter `authentication_update` is required when calling `update_authentication`."
  end

  path = '/1/authentications/{authenticationID}'.sub('{' + 'authenticationID' + '}', Transport.encode_uri(authentication_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(authentication_update)

  new_options = request_options.merge(
    :operation => :'IngestionClient.update_authentication',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:PATCH, path, new_options)
end

#update_destination(destination_id, destination_update, request_options = {}) ⇒ DestinationUpdateResponse

Update the destination of the given destinationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    The destination UUID. (required)

  • destination_update (DestinationUpdate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (DestinationUpdateResponse)


1794
1795
1796
1797
# File 'lib/algolia/api/ingestion_client.rb', line 1794

def update_destination(destination_id, destination_update, request_options = {})
  response = update_destination_with_http_info(destination_id, destination_update, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::DestinationUpdateResponse')
end

#update_destination_with_http_info(destination_id, destination_update, request_options = {}) ⇒ Http::Response

Update the destination of the given destinationID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    The destination UUID. (required)

  • destination_update (DestinationUpdate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
# File 'lib/algolia/api/ingestion_client.rb', line 1755

def update_destination_with_http_info(destination_id, destination_update, request_options = {})
  # verify the required parameter 'destination_id' is set
  if @api_client.config.client_side_validation && destination_id.nil?
    raise ArgumentError, "Parameter `destination_id` is required when calling `update_destination`."
  end
  # verify the required parameter 'destination_update' is set
  if @api_client.config.client_side_validation && destination_update.nil?
    raise ArgumentError, "Parameter `destination_update` is required when calling `update_destination`."
  end

  path = '/1/destinations/{destinationID}'.sub('{' + 'destinationID' + '}', Transport.encode_uri(destination_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(destination_update)

  new_options = request_options.merge(
    :operation => :'IngestionClient.update_destination',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:PATCH, path, new_options)
end

#update_source(source_id, source_update, request_options = {}) ⇒ SourceUpdateResponse

Update the source of the given sourceID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • source_update (SourceUpdate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (SourceUpdateResponse)


1848
1849
1850
1851
# File 'lib/algolia/api/ingestion_client.rb', line 1848

def update_source(source_id, source_update, request_options = {})
  response = update_source_with_http_info(source_id, source_update, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::SourceUpdateResponse')
end

#update_source_with_http_info(source_id, source_update, request_options = {}) ⇒ Http::Response

Update the source of the given sourceID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    The source UUID. (required)

  • source_update (SourceUpdate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
# File 'lib/algolia/api/ingestion_client.rb', line 1809

def update_source_with_http_info(source_id, source_update, request_options = {})
  # verify the required parameter 'source_id' is set
  if @api_client.config.client_side_validation && source_id.nil?
    raise ArgumentError, "Parameter `source_id` is required when calling `update_source`."
  end
  # verify the required parameter 'source_update' is set
  if @api_client.config.client_side_validation && source_update.nil?
    raise ArgumentError, "Parameter `source_update` is required when calling `update_source`."
  end

  path = '/1/sources/{sourceID}'.sub('{' + 'sourceID' + '}', Transport.encode_uri(source_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(source_update)

  new_options = request_options.merge(
    :operation => :'IngestionClient.update_source',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:PATCH, path, new_options)
end

#update_task(task_id, task_update, request_options = {}) ⇒ TaskUpdateResponse

Parameters:

  • task_id (String)

    The task UUID. (required)

  • task_update (TaskUpdate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (TaskUpdateResponse)


1894
1895
1896
1897
# File 'lib/algolia/api/ingestion_client.rb', line 1894

def update_task(task_id, task_update, request_options = {})
  response = update_task_with_http_info(task_id, task_update, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || 'Ingestion::TaskUpdateResponse')
end

#update_task_with_http_info(task_id, task_update, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • task_id (String)

    The task UUID. (required)

  • task_update (TaskUpdate)

    (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:



1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
# File 'lib/algolia/api/ingestion_client.rb', line 1859

def update_task_with_http_info(task_id, task_update, request_options = {})
  # verify the required parameter 'task_id' is set
  if @api_client.config.client_side_validation && task_id.nil?
    raise ArgumentError, "Parameter `task_id` is required when calling `update_task`."
  end
  # verify the required parameter 'task_update' is set
  if @api_client.config.client_side_validation && task_update.nil?
    raise ArgumentError, "Parameter `task_update` is required when calling `update_task`."
  end

  path = '/1/tasks/{taskID}'.sub('{' + 'taskID' + '}', Transport.encode_uri(task_id.to_s))
  query_params = {}
  query_params = query_params.merge(request_options[:query_params]) unless request_options[:query_params].nil?
  header_params = {}
  header_params = header_params.merge(request_options[:header_params]) unless request_options[:header_params].nil?

  post_body = request_options[:debug_body] || @api_client.object_to_http_body(task_update)

  new_options = request_options.merge(
    :operation => :'IngestionClient.update_task',
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:PATCH, path, new_options)
end