Class: Algolia::MonitoringClient

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config = nil) ⇒ MonitoringClient

Returns a new instance of MonitoringClient.



7
8
9
10
11
12
13
# File 'lib/algolia/api/monitoring_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/monitoring_client.rb', line 5

def api_client
  @api_client
end

Class Method Details

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



15
16
17
18
19
20
21
# File 'lib/algolia/api/monitoring_client.rb', line 15

def self.create(app_id, api_key, opts = {})
  hosts = []
  hosts << Transport::StatefulHost.new("status.algolia.com", accept: CallType::READ | CallType::WRITE)

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

.create_with_config(config) ⇒ Object



23
24
25
# File 'lib/algolia/api/monitoring_client.rb', line 23

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

Instance Method Details

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

Parameters:

  • path (String)

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

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

    Query parameters to apply to the current query.

  • request_options:

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

Returns:

  • (Object)


73
74
75
76
# File 'lib/algolia/api/monitoring_client.rb', line 73

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

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

Returns the response.

Parameters:

  • path (String)

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

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

    Query parameters to apply to the current query.

  • request_options:

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

Returns:



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/algolia/api/monitoring_client.rb', line 41

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

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

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

Parameters:

  • path (String)

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

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

    Query parameters to apply to the current query.

  • request_options:

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

Returns:

  • (Object)


116
117
118
119
# File 'lib/algolia/api/monitoring_client.rb', line 116

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

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

Returns the response.

Parameters:

  • path (String)

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

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

    Query parameters to apply to the current query.

  • request_options:

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

Returns:



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/algolia/api/monitoring_client.rb', line 84

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

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

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

Parameters:

  • path (String)

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

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

    Query parameters to apply to the current query.

  • body (Object) (defaults to: nil)

    Parameters to send with the custom request.

  • request_options:

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

Returns:

  • (Object)


161
162
163
164
# File 'lib/algolia/api/monitoring_client.rb', line 161

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

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

Returns the response.

Parameters:

  • path (String)

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

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

    Query parameters to apply to the current query.

  • body (Object) (defaults to: nil)

    Parameters to send with the custom request.

  • request_options:

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

Returns:



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/algolia/api/monitoring_client.rb', line 128

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

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

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

Parameters:

  • path (String)

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

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

    Query parameters to apply to the current query.

  • body (Object) (defaults to: nil)

    Parameters to send with the custom request.

  • request_options:

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

Returns:

  • (Object)


206
207
208
209
# File 'lib/algolia/api/monitoring_client.rb', line 206

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

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

Returns the response.

Parameters:

  • path (String)

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

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

    Query parameters to apply to the current query.

  • body (Object) (defaults to: nil)

    Parameters to send with the custom request.

  • request_options:

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

Returns:



173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/algolia/api/monitoring_client.rb', line 173

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 => :"MonitoringClient.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

#get_cluster_incidents(clusters, request_options = {}) ⇒ IncidentsResponse

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:

  • (IncidentsResponse)


246
247
248
249
# File 'lib/algolia/api/monitoring_client.rb', line 246

def get_cluster_incidents(clusters, request_options = {})
  response = get_cluster_incidents_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::IncidentsResponse")
end

#get_cluster_incidents_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:



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

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

  path = "/1/incidents/{clusters}".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.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 => :"MonitoringClient.get_cluster_incidents",
    :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_cluster_status(clusters, request_options = {}) ⇒ StatusResponse

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:

  • (StatusResponse)


286
287
288
289
# File 'lib/algolia/api/monitoring_client.rb', line 286

def get_cluster_status(clusters, request_options = {})
  response = get_cluster_status_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::StatusResponse")
end

#get_cluster_status_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:



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

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

  path = "/1/status/{clusters}".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.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 => :"MonitoringClient.get_cluster_status",
    :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_incidents(request_options = {}) ⇒ IncidentsResponse

Parameters:

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

  • (IncidentsResponse)


319
320
321
322
# File 'lib/algolia/api/monitoring_client.rb', line 319

def get_incidents(request_options = {})
  response = get_incidents_with_http_info(request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::IncidentsResponse")
end

#get_incidents_with_http_info(request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

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



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

def get_incidents_with_http_info(request_options = {})
  path = "/1/incidents"
  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 => :"MonitoringClient.get_incidents",
    :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_indexing_time(clusters, request_options = {}) ⇒ IndexingTimeResponse

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:

  • (IndexingTimeResponse)


359
360
361
362
# File 'lib/algolia/api/monitoring_client.rb', line 359

def get_indexing_time(clusters, request_options = {})
  response = get_indexing_time_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::IndexingTimeResponse")
end

#get_indexing_time_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:



329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/algolia/api/monitoring_client.rb', line 329

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

  path = "/1/indexing/{clusters}".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.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 => :"MonitoringClient.get_indexing_time",
    :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_latency(clusters, request_options = {}) ⇒ LatencyResponse

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:

  • (LatencyResponse)


399
400
401
402
# File 'lib/algolia/api/monitoring_client.rb', line 399

def get_latency(clusters, request_options = {})
  response = get_latency_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::LatencyResponse")
end

#get_latency_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/algolia/api/monitoring_client.rb', line 369

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

  path = "/1/latency/{clusters}".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.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 => :"MonitoringClient.get_latency",
    :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_metrics(metric, period, request_options = {}) ⇒ InfrastructureResponse

Parameters:

  • metric (Metric)

    Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use &#x60;*&#x60;. (required)

  • period (Period)

    Period over which to aggregate the metrics: - &#x60;minute&#x60;. Aggregate the last minute. 1 data point per 10 seconds. - &#x60;hour&#x60;. Aggregate the last hour. 1 data point per minute. - &#x60;day&#x60;. Aggregate the last day. 1 data point per 10 minutes. - &#x60;week&#x60;. Aggregate the last week. 1 data point per hour. - &#x60;month&#x60;. Aggregate the last month. 1 data point per day. (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:

  • (InfrastructureResponse)


447
448
449
450
451
452
453
# File 'lib/algolia/api/monitoring_client.rb', line 447

def get_metrics(metric, period, request_options = {})
  response = get_metrics_with_http_info(metric, period, request_options)
  @api_client.deserialize(
    response.body,
    request_options[:debug_return_type] || "Monitoring::InfrastructureResponse"
  )
end

#get_metrics_with_http_info(metric, period, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • metric (Metric)

    Metric to report. For more information about the individual metrics, see the description of the API response. To include all metrics, use &#x60;*&#x60;. (required)

  • period (Period)

    Period over which to aggregate the metrics: - &#x60;minute&#x60;. Aggregate the last minute. 1 data point per 10 seconds. - &#x60;hour&#x60;. Aggregate the last hour. 1 data point per minute. - &#x60;day&#x60;. Aggregate the last day. 1 data point per 10 minutes. - &#x60;week&#x60;. Aggregate the last week. 1 data point per hour. - &#x60;month&#x60;. Aggregate the last month. 1 data point per day. (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:



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/algolia/api/monitoring_client.rb', line 410

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

  path = "/1/infrastructure/{metric}/period/{period}"
    .sub("{" + "metric" + "}", Transport.encode_uri(metric.to_s))
    .sub("{" + "period" + "}", Transport.encode_uri(period.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 => :"MonitoringClient.get_metrics",
    :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_reachability(clusters, request_options = {}) ⇒ Hash<String, Hash>

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:

  • (Hash<String, Hash>)


490
491
492
493
# File 'lib/algolia/api/monitoring_client.rb', line 490

def get_reachability(clusters, request_options = {})
  response = get_reachability_with_http_info(clusters, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::Hash<String, Hash>")
end

#get_reachability_with_http_info(clusters, request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

  • clusters (String)

    Subset of clusters, separated by comma. (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:



460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
# File 'lib/algolia/api/monitoring_client.rb', line 460

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

  path = "/1/reachability/{clusters}/probes".sub("{" + "clusters" + "}", Transport.encode_uri(clusters.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 => :"MonitoringClient.get_reachability",
    :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_servers(request_options = {}) ⇒ InventoryResponse

Parameters:

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

  • (InventoryResponse)


523
524
525
526
# File 'lib/algolia/api/monitoring_client.rb', line 523

def get_servers(request_options = {})
  response = get_servers_with_http_info(request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::InventoryResponse")
end

#get_servers_with_http_info(request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

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



499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# File 'lib/algolia/api/monitoring_client.rb', line 499

def get_servers_with_http_info(request_options = {})
  path = "/1/inventory/servers"
  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 => :"MonitoringClient.get_servers",
    :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_status(request_options = {}) ⇒ StatusResponse

Parameters:

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

  • (StatusResponse)


556
557
558
559
# File 'lib/algolia/api/monitoring_client.rb', line 556

def get_status(request_options = {})
  response = get_status_with_http_info(request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Monitoring::StatusResponse")
end

#get_status_with_http_info(request_options = {}) ⇒ Http::Response

Returns the response.

Parameters:

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



532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
# File 'lib/algolia/api/monitoring_client.rb', line 532

def get_status_with_http_info(request_options = {})
  path = "/1/status"
  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 => :"MonitoringClient.get_status",
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :use_read_transporter => false
  )

  @api_client.call_api(:GET, 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.



31
32
33
# File 'lib/algolia/api/monitoring_client.rb', line 31

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