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
31
32
33
34
35
36
# 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

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

  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



38
39
40
# File 'lib/algolia/api/ingestion_client.rb', line 38

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

Instance Method Details

#add_user_agent_segment(segment, version = nil) ⇒ Object



52
53
54
55
56
# File 'lib/algolia/api/ingestion_client.rb', line 52

def add_user_agent_segment(segment, version = nil)
  @api_client.config.add_user_agent_segment(segment, version)

  self
end

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

Creates a new authentication resource.

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)


101
102
103
104
105
106
107
# File 'lib/algolia/api/ingestion_client.rb', line 101

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

Creates a new authentication resource.

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:



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/algolia/api/ingestion_client.rb', line 67

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

Creates a new 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)


152
153
154
155
156
157
158
# File 'lib/algolia/api/ingestion_client.rb', line 152

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

Creates a new 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:



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/algolia/api/ingestion_client.rb', line 118

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

Creates a new 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)


203
204
205
206
# File 'lib/algolia/api/ingestion_client.rb', line 203

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

Creates a new 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:



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/algolia/api/ingestion_client.rb', line 169

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)

    Request body for creating a task. (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)


243
244
245
246
# File 'lib/algolia/api/ingestion_client.rb', line 243

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_v1(task_create, request_options = {}) ⇒ TaskCreateResponse

Parameters:

  • task_create (TaskCreateV1)

    Request body for creating a task. (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)


283
284
285
286
# File 'lib/algolia/api/ingestion_client.rb', line 283

def create_task_v1(task_create, request_options = {})
  response = create_task_v1_with_http_info(task_create, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskCreateResponse")
end

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

Returns the response.

Parameters:

  • task_create (TaskCreateV1)

    Request body for creating a task. (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:



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/algolia/api/ingestion_client.rb', line 253

def create_task_v1_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_v1`."
  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_v1",
    :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_with_http_info(task_create, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • task_create (TaskCreate)

    Request body for creating a task. (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:



213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/algolia/api/ingestion_client.rb', line 213

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 = "/2/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

#create_transformation(transformation_create, request_options = {}) ⇒ TransformationCreateResponse

Parameters:

  • transformation_create (TransformationCreate)

    Request body for creating a transformation. (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:

  • (TransformationCreateResponse)


323
324
325
326
327
328
329
# File 'lib/algolia/api/ingestion_client.rb', line 323

def create_transformation(transformation_create, request_options = {})
  response = create_transformation_with_http_info(transformation_create, request_options)
  @api_client.deserialize(
    response.body,
    request_options[:debug_return_type] || "Ingestion::TransformationCreateResponse"
  )
end

#create_transformation_with_http_info(transformation_create, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • transformation_create (TransformationCreate)

    Request body for creating a transformation. (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:



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/algolia/api/ingestion_client.rb', line 293

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

  path = "/1/transformations"
  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(transformation_create)

  new_options = request_options.merge(
    :operation => :"IngestionClient.create_transformation",
    :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 "/1" 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)


369
370
371
372
# File 'lib/algolia/api/ingestion_client.rb', line 369

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 "/1" 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:



337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/algolia/api/ingestion_client.rb', line 337

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 = "/{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 "/1" 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)


412
413
414
415
# File 'lib/algolia/api/ingestion_client.rb', line 412

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 "/1" 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:



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
# File 'lib/algolia/api/ingestion_client.rb', line 380

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 = "/{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 "/1" 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)


457
458
459
460
# File 'lib/algolia/api/ingestion_client.rb', line 457

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 "/1" 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:



424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/algolia/api/ingestion_client.rb', line 424

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 = "/{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 "/1" 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)


502
503
504
505
# File 'lib/algolia/api/ingestion_client.rb', line 502

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 "/1" 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:



469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# File 'lib/algolia/api/ingestion_client.rb', line 469

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 = "/{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

Deletes an authentication resource. You can’t delete authentication resources that are used by a source or a destination.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    Unique identifier of an authentication resource. (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)


553
554
555
556
# File 'lib/algolia/api/ingestion_client.rb', line 553

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

Deletes an authentication resource. You can’t delete authentication resources that are used by a source or a destination.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    Unique identifier of an authentication resource. (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:



516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
# File 'lib/algolia/api/ingestion_client.rb', line 516

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

Deletes a destination by its ID. You can’t delete destinations that are referenced in tasks.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    Unique identifier of a destination. (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)


604
605
606
607
# File 'lib/algolia/api/ingestion_client.rb', line 604

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

Deletes a destination by its ID. You can’t delete destinations that are referenced in tasks.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    Unique identifier of a destination. (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:



567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
# File 'lib/algolia/api/ingestion_client.rb', line 567

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

Deletes a source by its ID. You can’t delete sources that are referenced in tasks.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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)


652
653
654
655
# File 'lib/algolia/api/ingestion_client.rb', line 652

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

Deletes a source by its ID. You can’t delete sources that are referenced in tasks.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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:



618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
# File 'lib/algolia/api/ingestion_client.rb', line 618

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)

    Unique identifier of a task. (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)


692
693
694
695
# File 'lib/algolia/api/ingestion_client.rb', line 692

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_v1(task_id, request_options = {}) ⇒ DeleteResponse

Parameters:

  • task_id (String)

    Unique identifier of a task. (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)


732
733
734
735
# File 'lib/algolia/api/ingestion_client.rb', line 732

def delete_task_v1(task_id, request_options = {})
  response = delete_task_v1_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
end

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

Returns the response.

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# File 'lib/algolia/api/ingestion_client.rb', line 702

def delete_task_v1_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_v1`."
  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_v1",
    :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_with_http_info(task_id, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
# File 'lib/algolia/api/ingestion_client.rb', line 662

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 = "/2/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

#delete_transformation(transformation_id, request_options = {}) ⇒ DeleteResponse

Parameters:

  • transformation_id (String)

    Unique identifier of a transformation. (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)


775
776
777
778
# File 'lib/algolia/api/ingestion_client.rb', line 775

def delete_transformation(transformation_id, request_options = {})
  response = delete_transformation_with_http_info(transformation_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::DeleteResponse")
end

#delete_transformation_with_http_info(transformation_id, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • transformation_id (String)

    Unique identifier of a transformation. (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:



742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
# File 'lib/algolia/api/ingestion_client.rb', line 742

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

  path = "/1/transformations/{transformationID}".sub(
    "{" + "transformationID" + "}",
    Transport.encode_uri(transformation_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_transformation",
    :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

Disables a task.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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)


823
824
825
826
# File 'lib/algolia/api/ingestion_client.rb', line 823

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_v1(task_id, request_options = {}) ⇒ TaskUpdateResponse

Disables a task using the v1 endpoint, please use ‘disableTask` instead.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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)


871
872
873
874
# File 'lib/algolia/api/ingestion_client.rb', line 871

def disable_task_v1(task_id, request_options = {})
  response = disable_task_v1_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
end

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

Disables a task using the v1 endpoint, please use ‘disableTask` instead.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
# File 'lib/algolia/api/ingestion_client.rb', line 837

def disable_task_v1_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_v1`."
  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_v1",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

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

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

Disables a task.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



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

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 = "/2/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

Enables a task.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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)


919
920
921
922
# File 'lib/algolia/api/ingestion_client.rb', line 919

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_v1(task_id, request_options = {}) ⇒ TaskUpdateResponse

Enables a task using the v1 endpoint, please use ‘enableTask` instead.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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)


967
968
969
970
# File 'lib/algolia/api/ingestion_client.rb', line 967

def enable_task_v1(task_id, request_options = {})
  response = enable_task_v1_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskUpdateResponse")
end

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

Enables a task using the v1 endpoint, please use ‘enableTask` instead.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
# File 'lib/algolia/api/ingestion_client.rb', line 933

def enable_task_v1_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_v1`."
  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_v1",
    :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_with_http_info(task_id, request_options = {}) ⇒ Http::Response

Enables a task.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
# File 'lib/algolia/api/ingestion_client.rb', line 885

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 = "/2/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

Retrieves an authentication resource by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    Unique identifier of an authentication resource. (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)


1018
1019
1020
1021
# File 'lib/algolia/api/ingestion_client.rb', line 1018

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

Retrieves an authentication resource by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    Unique identifier of an authentication resource. (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:



981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
# File 'lib/algolia/api/ingestion_client.rb', line 981

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_destination(destination_id, request_options = {}) ⇒ Destination

Retrieves a destination by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    Unique identifier of a destination. (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)


1069
1070
1071
1072
# File 'lib/algolia/api/ingestion_client.rb', line 1069

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

Retrieves a destination by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    Unique identifier of a destination. (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:



1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
# File 'lib/algolia/api/ingestion_client.rb', line 1032

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_event(run_id, event_id, request_options = {}) ⇒ Event

Retrieves a single task run event by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    Unique identifier of a task run. (required)

  • event_id (String)

    Unique identifier of an event. (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)


1126
1127
1128
1129
# File 'lib/algolia/api/ingestion_client.rb', line 1126

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

Retrieves a single task run event by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    Unique identifier of a task run. (required)

  • event_id (String)

    Unique identifier of an event. (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:



1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
# File 'lib/algolia/api/ingestion_client.rb', line 1084

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_run(run_id, request_options = {}) ⇒ Run

Retrieve a single task run by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    Unique identifier of a task run. (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)


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

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

Retrieve a single task run by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    Unique identifier of a task run. (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:



1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
# File 'lib/algolia/api/ingestion_client.rb', line 1140

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_source(source_id, request_options = {}) ⇒ Source

Retrieve a source by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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)


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

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

Retrieve a source by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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:



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

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_task(task_id, request_options = {}) ⇒ Task

Retrieves a task by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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)


1270
1271
1272
1273
# File 'lib/algolia/api/ingestion_client.rb', line 1270

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_v1(task_id, request_options = {}) ⇒ TaskV1

Retrieves a task by its ID using the v1 endpoint, please use ‘getTask` instead.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:

  • (TaskV1)


1318
1319
1320
1321
# File 'lib/algolia/api/ingestion_client.rb', line 1318

def get_task_v1(task_id, request_options = {})
  response = get_task_v1_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::TaskV1")
end

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

Retrieves a task by its ID using the v1 endpoint, please use ‘getTask` instead.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
# File 'lib/algolia/api/ingestion_client.rb', line 1284

def get_task_v1_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_v1`."
  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_v1",
    :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_with_http_info(task_id, request_options = {}) ⇒ Http::Response

Retrieves a task by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
# File 'lib/algolia/api/ingestion_client.rb', line 1236

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 = "/2/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_transformation(transformation_id, request_options = {}) ⇒ Transformation

Retrieves a transformation by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • transformation_id (String)

    Unique identifier of a transformation. (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:

  • (Transformation)


1369
1370
1371
1372
# File 'lib/algolia/api/ingestion_client.rb', line 1369

def get_transformation(transformation_id, request_options = {})
  response = get_transformation_with_http_info(transformation_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::Transformation")
end

#get_transformation_with_http_info(transformation_id, request_options = {}) ⇒ Http::Response

Retrieves a transformation by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • transformation_id (String)

    Unique identifier of a transformation. (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:



1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
# File 'lib/algolia/api/ingestion_client.rb', line 1332

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

  path = "/1/transformations/{transformationID}".sub(
    "{" + "transformationID" + "}",
    Transport.encode_uri(transformation_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_transformation",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

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

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

Retrieves a list of all authentication resources.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Type of authentication resource to retrieve.

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

    Ecommerce platform for which to retrieve authentications.

  • sort (AuthenticationSortKeys) (defaults to: nil)

    Property by which to sort the list of authentications. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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)


1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
# File 'lib/algolia/api/ingestion_client.rb', line 1436

def list_authentications(
  items_per_page = nil,
  page = nil,
  type = nil,
  platform = nil,
  sort = nil,
  order = nil,
  request_options = {}
)
  response = list_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

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

Retrieves a list of all authentication resources.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Type of authentication resource to retrieve.

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

    Ecommerce platform for which to retrieve authentications.

  • sort (AuthenticationSortKeys) (defaults to: nil)

    Property by which to sort the list of authentications. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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:



1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
# File 'lib/algolia/api/ingestion_client.rb', line 1388

def list_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.list_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

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

Retrieves a list of destinations.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Destination type.

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

    Authentication ID used by destinations.

  • transformation_id (String) (defaults to: nil)

    Get the list of destinations used by a transformation.

  • sort (DestinationSortKeys) (defaults to: nil)

    Property by which to sort the destinations. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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)


1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
# File 'lib/algolia/api/ingestion_client.rb', line 1521

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

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

Retrieves a list of destinations.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Destination type.

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

    Authentication ID used by destinations.

  • transformation_id (String) (defaults to: nil)

    Get the list of destinations used by a transformation.

  • sort (DestinationSortKeys) (defaults to: nil)

    Property by which to sort the destinations. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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:



1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
# File 'lib/algolia/api/ingestion_client.rb', line 1467

def list_destinations_with_http_info(
  items_per_page = nil,
  page = nil,
  type = nil,
  authentication_id = nil,
  transformation_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?
  unless authentication_id.nil?
    query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv)
  end

  query_params[:transformationID] = transformation_id unless transformation_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.list_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

#list_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

Retrieves a list of events for a task run, identified by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    Unique identifier of a task run. (required)

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Event status for filtering the list of task runs.

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

    Event type for filtering the list of task runs.

  • sort (EventSortKeys) (defaults to: nil)

    Property by which to sort the list of task run events.

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • start_date (String) (defaults to: nil)

    Date and time in RFC 3339 format for the earliest events to retrieve. By default, the current time minus three hours is used.

  • end_date (String) (defaults to: nil)

    Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.

  • 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)


1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'lib/algolia/api/ingestion_client.rb', line 1625

def list_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 = list_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

#list_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

Retrieves a list of events for a task run, identified by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • run_id (String)

    Unique identifier of a task run. (required)

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Event status for filtering the list of task runs.

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

    Event type for filtering the list of task runs.

  • sort (EventSortKeys) (defaults to: nil)

    Property by which to sort the list of task run events.

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • start_date (String) (defaults to: nil)

    Date and time in RFC 3339 format for the earliest events to retrieve. By default, the current time minus three hours is used.

  • end_date (String) (defaults to: nil)

    Date and time in RFC 3339 format for the latest events to retrieve. By default, the current time is used.

  • 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:



1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
# File 'lib/algolia/api/ingestion_client.rb', line 1564

def list_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 `list_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.list_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

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

Retrieve a list of task runs.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Run status for filtering the list of task runs.

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

    Run type for filtering the list of task runs.

  • task_id (String) (defaults to: nil)

    Task ID for filtering the list of task runs.

  • sort (RunSortKeys) (defaults to: nil)

    Property by which to sort the list of task runs. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • start_date (String) (defaults to: nil)

    Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.

  • end_date (String) (defaults to: nil)

    Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.

  • 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)


1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
# File 'lib/algolia/api/ingestion_client.rb', line 1726

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

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

Retrieve a list of task runs.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Run status for filtering the list of task runs.

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

    Run type for filtering the list of task runs.

  • task_id (String) (defaults to: nil)

    Task ID for filtering the list of task runs.

  • sort (RunSortKeys) (defaults to: nil)

    Property by which to sort the list of task runs. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • start_date (String) (defaults to: nil)

    Date in RFC 3339 format for the earliest run to retrieve. By default, the current day minus seven days is used.

  • end_date (String) (defaults to: nil)

    Date in RFC 3339 format for the latest run to retrieve. By default, the current day is used.

  • 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:



1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
# File 'lib/algolia/api/ingestion_client.rb', line 1669

def list_runs_with_http_info(
  items_per_page = nil,
  page = nil,
  status = nil,
  type = 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[:type] = @api_client.build_collection_param(type, :multi) unless type.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.list_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

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

Retrieves a list of sources.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Source type. Some sources require authentication.

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

    Authentication IDs of the sources to retrieve. ‘none’ returns sources that doesn’t have an authentication.

  • sort (SourceSortKeys) (defaults to: nil)

    Property by which to sort the list of sources. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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)


1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
# File 'lib/algolia/api/ingestion_client.rb', line 1818

def list_sources(
  items_per_page = nil,
  page = nil,
  type = nil,
  authentication_id = nil,
  sort = nil,
  order = nil,
  request_options = {}
)
  response = list_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

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

Retrieves a list of sources.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Source type. Some sources require authentication.

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

    Authentication IDs of the sources to retrieve. ‘none’ returns sources that doesn’t have an authentication.

  • sort (SourceSortKeys) (defaults to: nil)

    Property by which to sort the list of sources. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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:



1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
# File 'lib/algolia/api/ingestion_client.rb', line 1767

def list_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?
  unless authentication_id.nil?
    query_params[:authenticationID] = @api_client.build_collection_param(authentication_id, :csv)
  end

  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.list_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

#list_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

Retrieves a list of tasks.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Actions for filtering the list of tasks.

  • enabled (Boolean) (defaults to: nil)

    Whether to filter the list of tasks by the ‘enabled` status.

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

    Source IDs for filtering the list of tasks.

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

    Destination IDs for filtering the list of tasks.

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

    Type of task trigger for filtering the list of tasks.

  • sort (TaskSortKeys) (defaults to: nil)

    Property by which to sort the list of tasks. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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)


1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
# File 'lib/algolia/api/ingestion_client.rb', line 1916

def list_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 = list_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

#list_tasks_v1(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 = {}) ⇒ ListTasksResponseV1

Retrieves a list of tasks using the v1 endpoint, please use ‘getTasks` instead.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Actions for filtering the list of tasks.

  • enabled (Boolean) (defaults to: nil)

    Whether to filter the list of tasks by the ‘enabled` status.

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

    Source IDs for filtering the list of tasks.

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

    Destination IDs for filtering the list of tasks.

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

    Type of task trigger for filtering the list of tasks.

  • sort (TaskSortKeys) (defaults to: nil)

    Property by which to sort the list of tasks. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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:

  • (ListTasksResponseV1)


2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
# File 'lib/algolia/api/ingestion_client.rb', line 2020

def list_tasks_v1(
  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 = list_tasks_v1_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::ListTasksResponseV1")
end

#list_tasks_v1_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

Retrieves a list of tasks using the v1 endpoint, please use ‘getTasks` instead.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Actions for filtering the list of tasks.

  • enabled (Boolean) (defaults to: nil)

    Whether to filter the list of tasks by the ‘enabled` status.

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

    Source IDs for filtering the list of tasks.

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

    Destination IDs for filtering the list of tasks.

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

    Type of task trigger for filtering the list of tasks.

  • sort (TaskSortKeys) (defaults to: nil)

    Property by which to sort the list of tasks. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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:



1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
# File 'lib/algolia/api/ingestion_client.rb', line 1960

def list_tasks_v1_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?
  unless destination_id.nil?
    query_params[:destinationID] = @api_client.build_collection_param(destination_id, :csv)
  end

  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.list_tasks_v1",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

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

#list_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

Retrieves a list of tasks.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

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

    Actions for filtering the list of tasks.

  • enabled (Boolean) (defaults to: nil)

    Whether to filter the list of tasks by the ‘enabled` status.

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

    Source IDs for filtering the list of tasks.

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

    Destination IDs for filtering the list of tasks.

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

    Type of task trigger for filtering the list of tasks.

  • sort (TaskSortKeys) (defaults to: nil)

    Property by which to sort the list of tasks. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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:



1856
1857
1858
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
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
# File 'lib/algolia/api/ingestion_client.rb', line 1856

def list_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 = "/2/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?
  unless destination_id.nil?
    query_params[:destinationID] = @api_client.build_collection_param(destination_id, :csv)
  end

  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.list_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

#list_transformations(items_per_page = nil, page = nil, sort = nil, order = nil, request_options = {}) ⇒ ListTransformationsResponse

Retrieves a list of transformations.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

  • sort (TransformationSortKeys) (defaults to: nil)

    Property by which to sort the list of transformations. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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:

  • (ListTransformationsResponse)


2101
2102
2103
2104
2105
2106
2107
# File 'lib/algolia/api/ingestion_client.rb', line 2101

def list_transformations(items_per_page = nil, page = nil, sort = nil, order = nil, request_options = {})
  response = list_transformations_with_http_info(items_per_page, page, sort, order, request_options)
  @api_client.deserialize(
    response.body,
    request_options[:debug_return_type] || "Ingestion::ListTransformationsResponse"
  )
end

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

Retrieves a list of transformations.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • items_per_page (Integer) (defaults to: nil)

    Number of items per page. (default to 10)

  • page (Integer) (defaults to: nil)

    Page number of the paginated API response.

  • sort (TransformationSortKeys) (defaults to: nil)

    Property by which to sort the list of transformations. (default to ‘createdAt’)

  • order (OrderKeys) (defaults to: nil)

    Sort order of the response, ascending or descending. (default to ‘desc’)

  • 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:



2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
# File 'lib/algolia/api/ingestion_client.rb', line 2059

def list_transformations_with_http_info(
  items_per_page = nil,
  page = nil,
  sort = nil,
  order = nil,
  request_options = {}
)
  path = "/1/transformations"
  query_params = {}
  query_params[:itemsPerPage] = items_per_page unless items_per_page.nil?
  query_params[:page] = page unless page.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.list_transformations",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

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

#push_task(task_id, push_task_payload, request_options = {}) ⇒ RunResponse

Push a ‘batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (required)

  • push_task_payload (PushTaskPayload)

    Request body of a Search API ‘batch` request that will be pushed in the Connectors pipeline. (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)


2158
2159
2160
2161
# File 'lib/algolia/api/ingestion_client.rb', line 2158

def push_task(task_id, push_task_payload, request_options = {})
  response = push_task_with_http_info(task_id, push_task_payload, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunResponse")
end

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

Push a ‘batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (required)

  • push_task_payload (PushTaskPayload)

    Request body of a Search API ‘batch` request that will be pushed in the Connectors pipeline. (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:



2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
# File 'lib/algolia/api/ingestion_client.rb', line 2119

def push_task_with_http_info(task_id, push_task_payload, 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 `push_task`."
  end
  # verify the required parameter 'push_task_payload' is set
  if @api_client.config.client_side_validation && push_task_payload.nil?
    raise ArgumentError, "Parameter `push_task_payload` is required when calling `push_task`."
  end

  path = "/2/tasks/{taskID}/push".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(push_task_payload)

  new_options = request_options.merge(
    :operation => :"IngestionClient.push_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

#run_source(source_id, run_source_payload = nil, request_options = {}) ⇒ RunSourceResponse

Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (required)

  • run_source_payload (RunSourcePayload) (defaults to: nil)
  • 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:

  • (RunSourceResponse)


2208
2209
2210
2211
# File 'lib/algolia/api/ingestion_client.rb', line 2208

def run_source(source_id, run_source_payload = nil, request_options = {})
  response = run_source_with_http_info(source_id, run_source_payload, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunSourceResponse")
end

#run_source_with_http_info(source_id, run_source_payload = nil, request_options = {}) ⇒ Http::Response

Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (required)

  • run_source_payload (RunSourcePayload) (defaults to: nil)
  • 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:



2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
# File 'lib/algolia/api/ingestion_client.rb', line 2173

def run_source_with_http_info(source_id, run_source_payload = nil, 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 `run_source`."
  end

  path = "/1/sources/{sourceID}/run".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(run_source_payload)

  new_options = request_options.merge(
    :operation => :"IngestionClient.run_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

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

Runs a task. You can check the status of task runs with the observability endpoints.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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)


2256
2257
2258
2259
# File 'lib/algolia/api/ingestion_client.rb', line 2256

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_v1(task_id, request_options = {}) ⇒ RunResponse

Runs a task using the v1 endpoint, please use ‘runTask` instead. You can check the status of task runs with the observability endpoints.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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)


2304
2305
2306
2307
# File 'lib/algolia/api/ingestion_client.rb', line 2304

def run_task_v1(task_id, request_options = {})
  response = run_task_v1_with_http_info(task_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::RunResponse")
end

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

Runs a task using the v1 endpoint, please use ‘runTask` instead. You can check the status of task runs with the observability endpoints.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
# File 'lib/algolia/api/ingestion_client.rb', line 2270

def run_task_v1_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_v1`."
  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_v1",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

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

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

Runs a task. You can check the status of task runs with the observability endpoints.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
# File 'lib/algolia/api/ingestion_client.rb', line 2222

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 = "/2/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>

Searches for authentication resources.

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>)


2352
2353
2354
2355
# File 'lib/algolia/api/ingestion_client.rb', line 2352

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

Searches for authentication resources.

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:



2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
# File 'lib/algolia/api/ingestion_client.rb', line 2318

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>

Searches for destinations.

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>)


2400
2401
2402
2403
# File 'lib/algolia/api/ingestion_client.rb', line 2400

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

Searches for destinations.

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:



2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
# File 'lib/algolia/api/ingestion_client.rb', line 2366

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>

Searches for sources.

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>)


2448
2449
2450
2451
# File 'lib/algolia/api/ingestion_client.rb', line 2448

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

Searches for sources.

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:



2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
# File 'lib/algolia/api/ingestion_client.rb', line 2414

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>

Searches for tasks.

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>)


2496
2497
2498
2499
# File 'lib/algolia/api/ingestion_client.rb', line 2496

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_v1(task_search, request_options = {}) ⇒ Array<TaskV1>

Searches for tasks using the v1 endpoint, please use ‘searchTasks` instead.

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<TaskV1>)


2544
2545
2546
2547
# File 'lib/algolia/api/ingestion_client.rb', line 2544

def search_tasks_v1(task_search, request_options = {})
  response = search_tasks_v1_with_http_info(task_search, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Ingestion::TaskV1>")
end

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

Searches for tasks using the v1 endpoint, please use ‘searchTasks` instead.

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:



2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
# File 'lib/algolia/api/ingestion_client.rb', line 2510

def search_tasks_v1_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_v1`."
  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_v1",
    :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_with_http_info(task_search, request_options = {}) ⇒ Http::Response

Searches for tasks.

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:



2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
# File 'lib/algolia/api/ingestion_client.rb', line 2462

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 = "/2/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

#search_transformations(transformation_search, request_options = {}) ⇒ Array<Transformation>

Searches for transformations.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • transformation_search (TransformationSearch)

    (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<Transformation>)


2592
2593
2594
2595
# File 'lib/algolia/api/ingestion_client.rb', line 2592

def search_transformations(transformation_search, request_options = {})
  response = search_transformations_with_http_info(transformation_search, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Array<Ingestion::Transformation>")
end

#search_transformations_with_http_info(transformation_search, request_options = {}) ⇒ Http::Response

Searches for transformations.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • transformation_search (TransformationSearch)

    (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:



2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
# File 'lib/algolia/api/ingestion_client.rb', line 2558

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

  path = "/1/transformations/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(transformation_search)

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

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

#set_client_api_key(api_key) ⇒ void

This method returns an undefined value.

Helper method to switch the API key used to authenticate the requests.

Parameters:

  • api_key (String)

    the new API key to use.



46
47
48
49
50
# File 'lib/algolia/api/ingestion_client.rb', line 46

def set_client_api_key(api_key)
  @api_client.set_client_api_key(api_key)

  self
end

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

Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with ‘type: docker` and `imageType: singer`.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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:

  • (SourceWatchResponse)


2640
2641
2642
2643
# File 'lib/algolia/api/ingestion_client.rb', line 2640

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::SourceWatchResponse")
end

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

Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with ‘type: docker` and `imageType: singer`.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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:



2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
# File 'lib/algolia/api/ingestion_client.rb', line 2606

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

#try_transformation(transformation_try, request_options = {}) ⇒ TransformationTryResponse

Try a transformation before creating it.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • transformation_try (TransformationTry)

    (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:

  • (TransformationTryResponse)


2688
2689
2690
2691
2692
2693
2694
# File 'lib/algolia/api/ingestion_client.rb', line 2688

def try_transformation(transformation_try, request_options = {})
  response = try_transformation_with_http_info(transformation_try, request_options)
  @api_client.deserialize(
    response.body,
    request_options[:debug_return_type] || "Ingestion::TransformationTryResponse"
  )
end

#try_transformation_before_update(transformation_id, transformation_try, request_options = {}) ⇒ TransformationTryResponse

Try a transformation before updating it.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • transformation_id (String)

    Unique identifier of a transformation. (required)

  • transformation_try (TransformationTry)

    (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:

  • (TransformationTryResponse)


2754
2755
2756
2757
2758
2759
2760
# File 'lib/algolia/api/ingestion_client.rb', line 2754

def try_transformation_before_update(transformation_id, transformation_try, request_options = {})
  response = try_transformation_before_update_with_http_info(transformation_id, transformation_try, request_options)
  @api_client.deserialize(
    response.body,
    request_options[:debug_return_type] || "Ingestion::TransformationTryResponse"
  )
end

#try_transformation_before_update_with_http_info(transformation_id, transformation_try, request_options = {}) ⇒ Http::Response

Try a transformation before updating it.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • transformation_id (String)

    Unique identifier of a transformation. (required)

  • transformation_try (TransformationTry)

    (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:



2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
# File 'lib/algolia/api/ingestion_client.rb', line 2706

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

  path = "/1/transformations/{transformationID}/try".sub(
    "{" + "transformationID" + "}",
    Transport.encode_uri(transformation_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(transformation_try)

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

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

#try_transformation_with_http_info(transformation_try, request_options = {}) ⇒ Http::Response

Try a transformation before creating it.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • transformation_try (TransformationTry)

    (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:



2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
# File 'lib/algolia/api/ingestion_client.rb', line 2654

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

  path = "/1/transformations/try"
  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(transformation_try)

  new_options = request_options.merge(
    :operation => :"IngestionClient.try_transformation",
    :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

Updates an authentication resource.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    Unique identifier of an authentication resource. (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)


2814
2815
2816
2817
2818
2819
2820
# File 'lib/algolia/api/ingestion_client.rb', line 2814

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

Updates an authentication resource.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • authentication_id (String)

    Unique identifier of an authentication resource. (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:



2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
# File 'lib/algolia/api/ingestion_client.rb', line 2772

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

Updates the destination by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    Unique identifier of a destination. (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)


2874
2875
2876
2877
2878
2879
2880
# File 'lib/algolia/api/ingestion_client.rb', line 2874

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

Updates the destination by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • destination_id (String)

    Unique identifier of a destination. (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:



2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
# File 'lib/algolia/api/ingestion_client.rb', line 2832

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

Updates a source by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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)


2931
2932
2933
2934
# File 'lib/algolia/api/ingestion_client.rb', line 2931

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

Updates a source by its ID.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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:



2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
# File 'lib/algolia/api/ingestion_client.rb', line 2892

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)

    Unique identifier of a task. (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)


2977
2978
2979
2980
# File 'lib/algolia/api/ingestion_client.rb', line 2977

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_v1(task_id, task_update, request_options = {}) ⇒ TaskUpdateResponse

Parameters:

  • task_id (String)

    Unique identifier of a task. (required)

  • task_update (TaskUpdateV1)

    (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)


3023
3024
3025
3026
# File 'lib/algolia/api/ingestion_client.rb', line 3023

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

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

Returns the response.

Parameters:

  • task_id (String)

    Unique identifier of a task. (required)

  • task_update (TaskUpdateV1)

    (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:



2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
# File 'lib/algolia/api/ingestion_client.rb', line 2988

def update_task_v1_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_v1`."
  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_v1`."
  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_v1",
    :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_with_http_info(task_id, task_update, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • task_id (String)

    Unique identifier of a task. (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:



2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
# File 'lib/algolia/api/ingestion_client.rb', line 2942

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 = "/2/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

#update_transformation(transformation_id, transformation_create, request_options = {}) ⇒ TransformationUpdateResponse

Parameters:

  • transformation_id (String)

    Unique identifier of a transformation. (required)

  • transformation_create (TransformationCreate)

    (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:

  • (TransformationUpdateResponse)


3072
3073
3074
3075
3076
3077
3078
# File 'lib/algolia/api/ingestion_client.rb', line 3072

def update_transformation(transformation_id, transformation_create, request_options = {})
  response = update_transformation_with_http_info(transformation_id, transformation_create, request_options)
  @api_client.deserialize(
    response.body,
    request_options[:debug_return_type] || "Ingestion::TransformationUpdateResponse"
  )
end

#update_transformation_with_http_info(transformation_id, transformation_create, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • transformation_id (String)

    Unique identifier of a transformation. (required)

  • transformation_create (TransformationCreate)

    (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:



3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
# File 'lib/algolia/api/ingestion_client.rb', line 3034

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

  path = "/1/transformations/{transformationID}".sub(
    "{" + "transformationID" + "}",
    Transport.encode_uri(transformation_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(transformation_create)

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

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

#validate_source(source_create = nil, request_options = {}) ⇒ SourceWatchResponse

Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_create (SourceCreate) (defaults to: nil)
  • 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:

  • (SourceWatchResponse)


3118
3119
3120
3121
# File 'lib/algolia/api/ingestion_client.rb', line 3118

def validate_source(source_create = nil, request_options = {})
  response = validate_source_with_http_info(source_create, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::SourceWatchResponse")
end

#validate_source_before_update(source_id, source_update, request_options = {}) ⇒ SourceWatchResponse

Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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:

  • (SourceWatchResponse)


3172
3173
3174
3175
# File 'lib/algolia/api/ingestion_client.rb', line 3172

def validate_source_before_update(source_id, source_update, request_options = {})
  response = validate_source_before_update_with_http_info(source_id, source_update, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Ingestion::SourceWatchResponse")
end

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

Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_id (String)

    Unique identifier of a source. (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:



3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
# File 'lib/algolia/api/ingestion_client.rb', line 3133

def validate_source_before_update_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 `validate_source_before_update`."
  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 `validate_source_before_update`."
  end

  path = "/1/sources/{sourceID}/validate".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.validate_source_before_update",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

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

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

Validates a source payload to ensure it can be created and that the data source can be reached by Algolia.

Required API Key ACLs:

- addObject
- deleteIndex
- editSettings

Parameters:

  • source_create (SourceCreate) (defaults to: nil)
  • 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:



3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
# File 'lib/algolia/api/ingestion_client.rb', line 3089

def validate_source_with_http_info(source_create = nil, request_options = {})
  path = "/1/sources/validate"
  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.validate_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