module Elasticsearch::API::Cat::Actions

Public Instance Methods

aliases(arguments = {}) click to toggle source

Shows information about currently configured aliases to indices including filter and routing infos.

@option arguments [List] :name A comma-separated list of alias names to return @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-alias.html

# File lib/elasticsearch/api/actions/cat/aliases.rb, line 39
def aliases(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.aliases' }

  defined_params = [:name].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_GET
  path   = if _name
             "_cat/aliases/#{Utils.__listify(_name)}"
           else
             '_cat/aliases'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
allocation(arguments = {}) click to toggle source

Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using.

@option arguments [List] :node_id A comma-separated list of node IDs or names to limit the returned information @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-allocation.html

# File lib/elasticsearch/api/actions/cat/allocation.rb, line 40
def allocation(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.allocation' }

  defined_params = [:node_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _node_id = arguments.delete(:node_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _node_id
             "_cat/allocation/#{Utils.__listify(_node_id)}"
           else
             '_cat/allocation'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
component_templates(arguments = {}) click to toggle source

Returns information about existing component_templates templates.

@option arguments [String] :name A pattern that returned component template names must match @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-component-templates.html

# File lib/elasticsearch/api/actions/cat/component_templates.rb, line 39
def component_templates(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.component_templates' }

  defined_params = [:name].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_GET
  path   = if _name
             "_cat/component_templates/#{Utils.__listify(_name)}"
           else
             '_cat/component_templates'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
count(arguments = {}) click to toggle source

Provides quick access to the document count of the entire cluster, or individual indices.

@option arguments [List] :index A comma-separated list of index names to limit the returned information @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-count.html

# File lib/elasticsearch/api/actions/cat/count.rb, line 37
def count(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.count' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/count/#{Utils.__listify(_index)}"
           else
             '_cat/count'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
fielddata(arguments = {}) click to toggle source

Shows how much heap memory is currently being used by fielddata on every data node in the cluster.

@option arguments [List] :fields A comma-separated list of fields to return the fielddata size @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-fielddata.html

# File lib/elasticsearch/api/actions/cat/fielddata.rb, line 38
def fielddata(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.fielddata' }

  defined_params = [:fields].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _fields = arguments.delete(:fields)

  method = Elasticsearch::API::HTTP_GET
  path   = if _fields
             "_cat/fielddata/#{Utils.__listify(_fields)}"
           else
             '_cat/fielddata'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
health(arguments = {}) click to toggle source

Returns a concise representation of the cluster health.

@option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :ts Set to false to disable timestamping @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-health.html

# File lib/elasticsearch/api/actions/cat/health.rb, line 38
def health(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.health' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/health'
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
help(arguments = {}) click to toggle source

Returns help for the Cat APIs.

@option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat.html

# File lib/elasticsearch/api/actions/cat/help.rb, line 33
def help(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.help' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
indices(arguments = {}) click to toggle source

Returns information about indices: number of primaries and replicas, document counts, disk size, …

@option arguments [List] :index A comma-separated list of index names to limit the returned information @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [String] :health A health status (“green”, “yellow”, or “red” to filter only indices matching the specified health status (options: green, yellow, red) @option arguments [Boolean] :help Return help information @option arguments [Boolean] :pri Set to true to return stats only for primary shards @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-indices.html

# File lib/elasticsearch/api/actions/cat/indices.rb, line 44
def indices(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.indices' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/indices/#{Utils.__listify(_index)}"
           else
             '_cat/indices'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
master(arguments = {}) click to toggle source

Returns information about the master node.

@option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-master.html

# File lib/elasticsearch/api/actions/cat/master.rb, line 38
def master(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.master' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/master'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
ml_data_frame_analytics(arguments = {}) click to toggle source

Gets configuration and usage information about data frame analytics jobs.

@option arguments [String] :id The ID of the data frame analytics to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no configs. (This includes ‘_all` string or when no configs have been specified) @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-dfanalytics.html

# File lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb, line 40
def ml_data_frame_analytics(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_data_frame_analytics' }

  defined_params = [:id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _id = arguments.delete(:id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _id
             "_cat/ml/data_frame/analytics/#{Utils.__listify(_id)}"
           else
             '_cat/ml/data_frame/analytics'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
ml_datafeeds(arguments = {}) click to toggle source

Gets configuration and usage information about datafeeds.

@option arguments [String] :datafeed_id The ID of the datafeeds stats to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no datafeeds. (This includes ‘_all` string or when no datafeeds have been specified) @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-datafeeds.html

# File lib/elasticsearch/api/actions/cat/ml_datafeeds.rb, line 39
def ml_datafeeds(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_datafeeds' }

  defined_params = [:datafeed_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _datafeed_id = arguments.delete(:datafeed_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _datafeed_id
             "_cat/ml/datafeeds/#{Utils.__listify(_datafeed_id)}"
           else
             '_cat/ml/datafeeds'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
ml_jobs(arguments = {}) click to toggle source

Gets configuration and usage information about anomaly detection jobs.

@option arguments [String] :job_id The ID of the jobs stats to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no jobs. (This includes ‘_all` string or when no jobs have been specified) @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-anomaly-detectors.html

# File lib/elasticsearch/api/actions/cat/ml_jobs.rb, line 40
def ml_jobs(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_jobs' }

  defined_params = [:job_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _job_id = arguments.delete(:job_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _job_id
             "_cat/ml/anomaly_detectors/#{Utils.__listify(_job_id)}"
           else
             '_cat/ml/anomaly_detectors'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
ml_trained_models(arguments = {}) click to toggle source

Gets configuration and usage information about inference trained models.

@option arguments [String] :model_id The ID of the trained models stats to fetch @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no trained models. (This includes ‘_all` string or when no trained models have been specified) @option arguments [Integer] :from skips a number of trained models @option arguments [Integer] :size specifies a max number of trained models to get @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-trained-model.html

# File lib/elasticsearch/api/actions/cat/ml_trained_models.rb, line 42
def ml_trained_models(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_trained_models' }

  defined_params = [:model_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _model_id = arguments.delete(:model_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _model_id
             "_cat/ml/trained_models/#{Utils.__listify(_model_id)}"
           else
             '_cat/ml/trained_models'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
nodeattrs(arguments = {}) click to toggle source

Returns information about custom node attributes.

@option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-nodeattrs.html

# File lib/elasticsearch/api/actions/cat/nodeattrs.rb, line 38
def nodeattrs(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.nodeattrs' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/nodeattrs'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
nodes(arguments = {}) click to toggle source

Returns basic statistics about performance of cluster nodes.

@option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :full_id Return the full node ID instead of the shortened version (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Boolean] :include_unloaded_segments If set to true segment stats will include stats for segments that are not currently loaded into memory @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-nodes.html

# File lib/elasticsearch/api/actions/cat/nodes.rb, line 41
def nodes(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.nodes' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/nodes'
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h], escape: false) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
pending_tasks(arguments = {}) click to toggle source

Returns a concise representation of the cluster pending tasks.

@option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-pending-tasks.html

# File lib/elasticsearch/api/actions/cat/pending_tasks.rb, line 39
def pending_tasks(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.pending_tasks' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/pending_tasks'
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
plugins(arguments = {}) click to toggle source

Returns information about installed plugins across nodes node.

@option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [Boolean] :include_bootstrap Include bootstrap plugins in the response @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-plugins.html

# File lib/elasticsearch/api/actions/cat/plugins.rb, line 39
def plugins(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.plugins' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/plugins'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
recovery(arguments = {}) click to toggle source

Returns information about index shard recoveries, both on-going completed.

@option arguments [List] :index Comma-separated list or wildcard expression of index names to limit the returned information @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :active_only If ‘true`, the response only includes ongoing shard recoveries @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-recovery.html

# File lib/elasticsearch/api/actions/cat/recovery.rb, line 41
def recovery(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.recovery' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/recovery/#{Utils.__listify(_index)}"
           else
             '_cat/recovery'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
repositories(arguments = {}) click to toggle source

Returns information about snapshot repositories registered in the cluster.

@option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :local Return local information, do not retrieve the state from master node @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-repositories.html

# File lib/elasticsearch/api/actions/cat/repositories.rb, line 38
def repositories(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.repositories' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/repositories'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
segments(arguments = {}) click to toggle source

Provides low-level information about the segments in the shards of an index.

@option arguments [List] :index A comma-separated list of index names to limit the returned information @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-segments.html

# File lib/elasticsearch/api/actions/cat/segments.rb, line 38
def segments(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.segments' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/segments/#{Utils.__listify(_index)}"
           else
             '_cat/segments'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
shards(arguments = {}) click to toggle source

Provides a detailed view of shard allocation on nodes.

@option arguments [List] :index A comma-separated list of index names to limit the returned information @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [String] :bytes The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-shards.html

# File lib/elasticsearch/api/actions/cat/shards.rb, line 40
def shards(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.shards' }

  defined_params = [:index].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  _index = arguments.delete(:index)

  method = Elasticsearch::API::HTTP_GET
  path   = if _index
             "_cat/shards/#{Utils.__listify(_index)}"
           else
             '_cat/shards'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
snapshots(arguments = {}) click to toggle source

Returns all snapshots in a specific repository.

@option arguments [List] :repository Name of repository from which to fetch the snapshot information @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :ignore_unavailable Set to true to ignore unavailable snapshots @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-snapshots.html

# File lib/elasticsearch/api/actions/cat/snapshots.rb, line 40
def snapshots(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.snapshots' }

  defined_params = [:repository].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _repository = arguments.delete(:repository)

  method = Elasticsearch::API::HTTP_GET
  path   = if _repository
             "_cat/snapshots/#{Utils.__listify(_repository)}"
           else
             '_cat/snapshots'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
tasks(arguments = {}) click to toggle source

Returns information about the tasks currently executing on one or more nodes in the cluster. This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

@option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [List] :nodes A comma-separated list of node IDs or names to limit the returned information; use ‘_local` to return information from the node you’re connecting to, leave empty to get information from all nodes @option arguments [List] :actions A comma-separated list of actions that should be returned. Leave empty to return all. @option arguments [Boolean] :detailed Return detailed task information (default: false) @option arguments [String] :parent_task_id Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/tasks.html

# File lib/elasticsearch/api/actions/cat/tasks.rb, line 45
def tasks(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.tasks' }

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body   = nil

  method = Elasticsearch::API::HTTP_GET
  path   = '_cat/tasks'
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
templates(arguments = {}) click to toggle source

Returns information about existing templates.

@option arguments [String] :name A pattern that returned template names must match @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-templates.html

# File lib/elasticsearch/api/actions/cat/templates.rb, line 39
def templates(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.templates' }

  defined_params = [:name].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _name = arguments.delete(:name)

  method = Elasticsearch::API::HTTP_GET
  path   = if _name
             "_cat/templates/#{Utils.__listify(_name)}"
           else
             '_cat/templates'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
thread_pool(arguments = {}) click to toggle source

Returns cluster-wide thread pool statistics per node. By default the active, queue and rejected statistics are returned for all thread pools.

@option arguments [List] :thread_pool_patterns A comma-separated list of regular-expressions to filter the thread pools in the output @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :local Return local information, do not retrieve the state from master node (default: false) @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-thread-pool.html

# File lib/elasticsearch/api/actions/cat/thread_pool.rb, line 41
def thread_pool(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.thread_pool' }

  defined_params = [:thread_pool_patterns].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _thread_pool_patterns = arguments.delete(:thread_pool_patterns)

  method = Elasticsearch::API::HTTP_GET
  path   = if _thread_pool_patterns
             "_cat/thread_pool/#{Utils.__listify(_thread_pool_patterns)}"
           else
             '_cat/thread_pool'
           end
  params = Utils.process_params(arguments)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end
transforms(arguments = {}) click to toggle source

Gets configuration and usage information about transforms.

@option arguments [String] :transform_id The id of the transform for which to get stats. ‘_all’ or ‘*’ implies all transforms @option arguments [Integer] :from skips a number of transform configs, defaults to 0 @option arguments [Integer] :size specifies a max number of transforms to get, defaults to 100 @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no transforms. (This includes ‘_all` string or when no transforms have been specified) @option arguments [String] :format a short version of the Accept header, e.g. json, yaml @option arguments [List] :h Comma-separated list of column names to display @option arguments [Boolean] :help Return help information @option arguments [List] :s Comma-separated list of column names or column aliases to sort by @option arguments [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos) @option arguments [Boolean] :v Verbose mode. Display column headers @option arguments [Hash] :headers Custom HTTP headers

@see www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-transforms.html

# File lib/elasticsearch/api/actions/cat/transforms.rb, line 41
def transforms(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.transforms' }

  defined_params = [:transform_id].each_with_object({}) do |variable, set_variables|
    set_variables[variable] = arguments[variable] if arguments.key?(variable)
  end
  request_opts[:defined_params] = defined_params unless defined_params.empty?

  arguments = arguments.clone
  headers = arguments.delete(:headers) || {}

  body = nil

  _transform_id = arguments.delete(:transform_id)

  method = Elasticsearch::API::HTTP_GET
  path   = if _transform_id
             "_cat/transforms/#{Utils.__listify(_transform_id)}"
           else
             '_cat/transforms'
           end
  params = Utils.process_params(arguments)

  Elasticsearch::API::Response.new(
    perform_request(method, path, params, body, headers, request_opts)
  )
end