Module: Elasticsearch::API::Cat::Actions

Defined in:
lib/elasticsearch/api/actions/cat/help.rb,
lib/elasticsearch/api/actions/cat/count.rb,
lib/elasticsearch/api/actions/cat/nodes.rb,
lib/elasticsearch/api/actions/cat/tasks.rb,
lib/elasticsearch/api/actions/cat/health.rb,
lib/elasticsearch/api/actions/cat/master.rb,
lib/elasticsearch/api/actions/cat/shards.rb,
lib/elasticsearch/api/actions/cat/aliases.rb,
lib/elasticsearch/api/actions/cat/indices.rb,
lib/elasticsearch/api/actions/cat/ml_jobs.rb,
lib/elasticsearch/api/actions/cat/plugins.rb,
lib/elasticsearch/api/actions/cat/recovery.rb,
lib/elasticsearch/api/actions/cat/segments.rb,
lib/elasticsearch/api/actions/cat/fielddata.rb,
lib/elasticsearch/api/actions/cat/nodeattrs.rb,
lib/elasticsearch/api/actions/cat/snapshots.rb,
lib/elasticsearch/api/actions/cat/templates.rb,
lib/elasticsearch/api/actions/cat/allocation.rb,
lib/elasticsearch/api/actions/cat/transforms.rb,
lib/elasticsearch/api/actions/cat/thread_pool.rb,
lib/elasticsearch/api/actions/cat/ml_datafeeds.rb,
lib/elasticsearch/api/actions/cat/repositories.rb,
lib/elasticsearch/api/actions/cat/pending_tasks.rb,
lib/elasticsearch/api/actions/cat/circuit_breaker.rb,
lib/elasticsearch/api/actions/cat/ml_trained_models.rb,
lib/elasticsearch/api/actions/cat/component_templates.rb,
lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb

Instance Method Summary collapse

Instance Method Details

#aliases(arguments = {}) ⇒ Object

Get aliases. Get the cluster’s index aliases, including filter and routing information. This API does not return data stream aliases. IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.

Options Hash (arguments):

  • :name (String, Array<String>)

    A comma-separated list of aliases to retrieve. Supports wildcards (‘*`). To retrieve all aliases, omit this parameter or use `*` or _all.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :expand_wildcards (String, Array<String>)

    The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. It supports comma-separated values, such as ‘open,hidden`. Server default: all.

  • :master_timeout (Time)

    The period to wait for a connection to the master node. If the master node is not available before the timeout expires, the request fails and returns an error. To indicated that the request should never timeout, you can set it to -1. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/elasticsearch/api/actions/cat/aliases.rb', line 70

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 = {}) ⇒ Object

Get shard allocation information. Get a snapshot of the number of shards allocated to each data node and their disk space. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.

Options Hash (arguments):

  • :node_id (String, Array)

    A comma-separated list of node identifiers or names used to limit the returned information.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/elasticsearch/api/actions/cat/allocation.rb', line 68

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

#circuit_breaker(arguments = {}) ⇒ Object

Get circuit breakers statistics.IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.

Options Hash (arguments):

  • :circuit_breaker_patterns (String, Array<String>)

    A comma-separated list of regular-expressions to filter the circuit breakers in the output

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/elasticsearch/api/actions/cat/circuit_breaker.rb', line 66

def circuit_breaker(arguments = {})
  request_opts = { endpoint: arguments[:endpoint] || 'cat.circuit_breaker' }

  defined_params = [:circuit_breaker_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

  _circuit_breaker_patterns = arguments.delete(:circuit_breaker_patterns)

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

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

#component_templates(arguments = {}) ⇒ Object

Get component templates. Get information about component templates in a cluster. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get component template API.

Options Hash (arguments):

  • :name (String)

    The name of the component template. It accepts wildcard expressions. If it is omitted, all component templates are returned.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    The period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/elasticsearch/api/actions/cat/component_templates.rb', line 72

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 = {}) ⇒ Object

Get a document count. Get quick access to a document count for a data stream, an index, or an entire cluster. The document count only includes live documents, not deleted documents which have not yet been removed by the merge process. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the count API.

Options Hash (arguments):

  • :index (String, Array)

    A comma-separated list of data streams, indices, and aliases used to limit the request. It supports wildcards (‘*`). To target all data streams and indices, omit this parameter or use `*` or _all.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

  • :body (Hash)

    request body

See Also:



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/elasticsearch/api/actions/cat/count.rb', line 68

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 = arguments.delete(:body)

  _index = arguments.delete(:index)

  method = if body
             Elasticsearch::API::HTTP_POST
           else
             Elasticsearch::API::HTTP_GET
           end

  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 = {}) ⇒ Object

Get field data cache information. Get the amount of heap memory currently used by the field data cache on every data node in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes stats API.

Options Hash (arguments):

  • :fields (String, Array<String>)

    Comma-separated list of fields used to limit returned information. To retrieve all fields, omit this parameter.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/elasticsearch/api/actions/cat/fielddata.rb', line 65

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 = {}) ⇒ Object

Get the cluster health status. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the cluster health API. This API is often used to check malfunctioning clusters. To help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats: HH:MM:SS, which is human-readable but includes no date information; ‘Unix epoch time`, which is machine-sortable and includes date information. The latter format is useful for cluster recoveries that take multiple days. You can use the cat health API to verify cluster health across multiple nodes. You also can use the API to track the recovery of a large cluster over a longer period of time.

Options Hash (arguments):

  • :ts (Boolean)

    If true, returns HH:MM:SS and Unix epoch timestamps. Server default: true.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/elasticsearch/api/actions/cat/health.rb', line 70

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 = {}) ⇒ Object

Get CAT help. Get help for the CAT APIs.

Options Hash (arguments):

  • :headers (Hash)

    Custom HTTP headers

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/elasticsearch/api/actions/cat/help.rb', line 32

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 = {}

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

#indices(arguments = {}) ⇒ Object

Get index information. Get high-level information about indices in a cluster, including backing indices for data streams. Use this request to get the following information for each index in a cluster:

  • shard count

  • document count

  • deleted document count

  • primary store size

  • total store size of all shards, including shard replicas

These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents. To get an accurate count of Elasticsearch documents, use the cat count or count APIs. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use an index endpoint.

Options Hash (arguments):

  • :index (String, Array)

    Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (‘*`). To target all data streams and indices, omit this parameter or use `*` or _all.

  • :expand_wildcards (String, Array<String>)

    The type of index that wildcard patterns can match. Server default: all.

  • :health (String)

    The health status used to limit returned indices. By default, the response includes indices of any health status.

  • :include_unloaded_segments (Boolean)

    If true, the response includes information from segments that are not loaded into memory.

  • :pri (Boolean)

    If true, the response only includes information from primary shards.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/elasticsearch/api/actions/cat/indices.rb', line 78

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 = {}) ⇒ Object

Get master node information. Get information about the master node, including the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.

Options Hash (arguments):

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/elasticsearch/api/actions/cat/master.rb', line 67

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 = {}) ⇒ Object

Get data frame analytics jobs. Get configuration and usage information about data frame analytics jobs. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get data frame analytics jobs statistics API.

Options Hash (arguments):

  • :id (String)

    The ID of the data frame analytics to fetch

  • :allow_no_match (Boolean)

    Whether to ignore if a wildcard expression matches no configs. (This includes _all string or when no configs have been specified.)

  • :h (String, Array<String>)

    Comma-separated list of column names to display. Server default: create_time,id,state,type.

  • :s (String, Array<String>)

    Comma-separated list of column names or column aliases used to sort the response.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb', line 66

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 = {}) ⇒ Object

Get datafeeds. Get configuration and usage information about datafeeds. This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features are enabled, you must have monitor_ml, monitor, manage_ml, or manage cluster privileges to use this API. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get datafeed statistics API.

Options Hash (arguments):

  • :datafeed_id (String)

    A numerical character string that uniquely identifies the datafeed.

  • :allow_no_match (Boolean)

    Specifies what to do when the request:

    • Contains wildcard expressions and there are no datafeeds that match.

    • Contains the _all string or no identifiers and there are no matches.

    • Contains wildcard expressions and there are only partial matches.

    If true, the API returns an empty datafeeds array when there are no matches and the subset of results when there are partial matches. If false, the API returns a 404 status code when there are no matches or only partial matches. Server default: true.

  • :h (String, Array<String>)

    Comma-separated list of column names to display. Server default: [‘bc’, ‘id’, ‘sc’, ‘s’].

  • :s (String, Array<String>)

    Comma-separated list of column names or column aliases used to sort the response.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/elasticsearch/api/actions/cat/ml_datafeeds.rb', line 73

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 = {}) ⇒ Object

Get anomaly detection jobs. Get configuration and usage information for anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch security features are enabled, you must have monitor_ml, monitor, manage_ml, or manage cluster privileges to use this API. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get anomaly detection job statistics API.

Options Hash (arguments):

  • :job_id (String)

    Identifier for the anomaly detection job.

  • :allow_no_match (Boolean)

    Specifies what to do when the request:

    • Contains wildcard expressions and there are no jobs that match.

    • Contains the _all string or no identifiers and there are no matches.

    • Contains wildcard expressions and there are only partial matches.

    If true, the API returns an empty jobs array when there are no matches and the subset of results when there are partial matches. If false, the API returns a 404 status code when there are no matches or only partial matches. Server default: true.

  • :h (String, Array<String>)

    Comma-separated list of column names to display. Server default: buckets.count,data.processed_records,forecasts.total,id,model.bytes,model.memory_status,state.

  • :s (String, Array<String>)

    Comma-separated list of column names or column aliases used to sort the response.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/elasticsearch/api/actions/cat/ml_jobs.rb', line 73

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 = {}) ⇒ Object

Get trained models. Get configuration and usage information about inference trained models. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get trained models statistics API.

Options Hash (arguments):

  • :model_id (String)

    A unique identifier for the trained model.

  • :allow_no_match (Boolean)

    Specifies what to do when the request: contains wildcard expressions and there are no models that match; contains the _all string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches. If true, the API returns an empty array when there are no matches and the subset of results when there are partial matches. If false, the API returns a 404 status code when there are no matches or only partial matches. Server default: true.

  • :h (String, Array<String>)

    A comma-separated list of column names to display.

  • :s (String, Array<String>)

    A comma-separated list of column names or aliases used to sort the response.

  • :from (Integer)

    Skips the specified number of transforms. Server default: 0.

  • :size (Integer)

    The maximum number of transforms to display. Server default: 100.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/elasticsearch/api/actions/cat/ml_trained_models.rb', line 68

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 = {}) ⇒ Object

Get node attribute information. Get information about custom node attributes. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.

Options Hash (arguments):

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/elasticsearch/api/actions/cat/nodeattrs.rb', line 67

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 = {}) ⇒ Object

Get node information. Get information about the nodes in a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.

Options Hash (arguments):

  • :full_id (Boolean)

    If true, return the full node ID. If false, return the shortened node ID.

  • :include_unloaded_segments (Boolean)

    If true, the response includes information from segments that are not loaded into memory.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards. Server default: ip,hp,rp,r,m,n,cpu,l.

  • :s (String, Array<String>)

    A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :master_timeout (Time)

    The period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/elasticsearch/api/actions/cat/nodes.rb', line 66

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 = {}) ⇒ Object

Get pending task information. Get information about cluster-level changes that have not yet taken effect. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the pending cluster tasks API.

Options Hash (arguments):

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/elasticsearch/api/actions/cat/pending_tasks.rb', line 67

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 = {}) ⇒ Object

Get plugin information. Get a list of plugins running on each node of a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.

Options Hash (arguments):

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :include_bootstrap (Boolean)

    Include bootstrap plugins in the response

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/elasticsearch/api/actions/cat/plugins.rb', line 68

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 = {}) ⇒ Object

Get shard recovery information. Get information about ongoing and completed shard recoveries. Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing. For data streams, the API returns information about the stream’s backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.

Options Hash (arguments):

  • :index (String, Array)

    A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (‘*`). To target all data streams and indices, omit this parameter or use `*` or _all.

  • :active_only (Boolean)

    If true, the response only includes ongoing shard recoveries.

  • :detailed (Boolean)

    If true, the response includes detailed information about shard recoveries.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards. Server default: ip,hp,rp,r,m,n,cpu,l.

  • :s (String, Array<String>)

    A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/elasticsearch/api/actions/cat/recovery.rb', line 69

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 = {}) ⇒ Object

Get snapshot repository information. Get a list of snapshot repositories for a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.

Options Hash (arguments):

  • :h (String, Array<String>)

    List of columns to appear in the response. Supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/elasticsearch/api/actions/cat/repositories.rb', line 67

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 = {}) ⇒ Object

Get segment information. Get low-level information about the Lucene segments in index shards. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.

Options Hash (arguments):

  • :index (String, Array)

    A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (‘*`). To target all data streams and indices, omit this parameter or use `*` or _all.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards. Server default: ip,hp,rp,r,m,n,cpu,l.

  • :s (String, Array<String>)

    A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :expand_wildcards (String, Array<String>)

    Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden. Server default: open.

  • :allow_no_indices (Boolean)

    If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. Server default: true.

  • :ignore_throttled (Boolean)

    If true, concrete, expanded or aliased indices are ignored when frozen.

  • :ignore_unavailable (Boolean)

    If true, missing or closed indices are not included in the response.

  • :allow_closed (Boolean)

    If true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour of throwing an exception if index pattern matches closed indices

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



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

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 = {}) ⇒ Object

Get shard information. Get information about the shards in a cluster. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.

Options Hash (arguments):

  • :index (String, Array)

    A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (‘*`). To target all data streams and indices, omit this parameter or use `*` or _all.

  • :h (String, Array<String>)

    List of columns to appear in the response. Supports simple wildcards.

  • :s (String, Array<String>)

    A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :master_timeout (Time)

    The period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/elasticsearch/api/actions/cat/shards.rb', line 67

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 = {}) ⇒ Object

Get snapshot information. Get information about the snapshots stored in one or more repositories. A snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.

Options Hash (arguments):

  • :repository (String, Array<String>)

    A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. _all returns all repositories. If any repository fails during the request, Elasticsearch returns an error.

  • :ignore_unavailable (Boolean)

    If true, the response does not include information from unavailable snapshots.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards. Server default: ip,hp,rp,r,m,n,cpu,l.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/elasticsearch/api/actions/cat/snapshots.rb', line 70

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 = {}) ⇒ Object

Get task information. Get information about tasks currently running in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API. This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

Options Hash (arguments):

  • :actions (Array<String>)

    The task action names, which are used to limit the response.

  • :detailed (Boolean)

    If true, the response includes detailed information about shard recoveries.

  • :nodes (Array<String>)

    Unique node identifiers, which are used to limit the response.

  • :parent_task_id (String)

    The parent task identifier, which is used to limit the response.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :timeout (Time)

    Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.

  • :wait_for_completion (Boolean)

    If true, the request blocks until the task has completed.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/elasticsearch/api/actions/cat/tasks.rb', line 72

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 = {}) ⇒ Object

Get index template information. Get information about the index templates in a cluster. You can use index templates to apply index settings and field mappings to new indices at creation. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.

Options Hash (arguments):

  • :name (String)

    The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned.

  • :h (String, Array<String>)

    A comma-separated list of columns names to display. It supports simple wildcards.

  • :s (String, Array<String>)

    List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    Period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/elasticsearch/api/actions/cat/templates.rb', line 70

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 = {}) ⇒ Object

Get thread pool statistics. Get thread pool statistics for each node in a cluster. Returned information includes all built-in thread pools and custom thread pools. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.

Options Hash (arguments):

  • :thread_pool_patterns (String, Array<String>)

    A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions.

  • :h (String, Array<String>)

    List of columns to appear in the response. Supports simple wildcards.

  • :s (String, Array<String>)

    A comma-separated list of column names or aliases that determines the sort order. Sorting defaults to ascending and can be changed by setting :asc or :desc as a suffix to the column name.

  • :local (Boolean)

    If true, the request computes the list of selected nodes from the local cluster state. If false the list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.

  • :master_timeout (Time)

    The period to wait for a connection to the master node. Server default: 30s.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/elasticsearch/api/actions/cat/thread_pool.rb', line 70

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 = {}) ⇒ Object

Get transform information. Get configuration and usage information about transforms. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get transform statistics API.

Options Hash (arguments):

  • :transform_id (String)

    A transform identifier or a wildcard expression. If you do not specify one of these options, the API returns information for all transforms.

  • :allow_no_match (Boolean)

    Specifies what to do when the request: contains wildcard expressions and there are no transforms that match; contains the _all string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches. If true, it returns an empty transforms array when there are no matches and the subset of results when there are partial matches. If false, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.

  • :from (Integer)

    Skips the specified number of transforms. Server default: 0.

  • :h (String, Array<String>)

    Comma-separated list of column names to display. Server default: changes_last_detection_time,checkpoint,checkpoint_progress,documents_processed,id,last_search_time,state.

  • :s (String, Array<String>)

    Comma-separated list of column names or column aliases used to sort the response.

  • :size (Integer)

    The maximum number of transforms to obtain. Server default: 100.

  • :format (String)

    Specifies the format to return the columnar data in, can be set to text, json, cbor, yaml, or smile. Server default: text.

  • :help (Boolean)

    When set to true will output available columns. This option can’t be combined with any other query string option.

  • :v (Boolean)

    When set to true will enable verbose output.

  • :bytes (String)

    Sets the units for columns that contain a byte-size value. Note that byte-size value units work in terms of powers of 1024. For instance 1kb means 1024 bytes, not 1000 bytes. If omitted, byte-size values are rendered with a suffix such as kb, mb, or gb, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, byte-size values are rendered as an integer with no suffix, representing the value of the column in the chosen unit. Values that are not an exact multiple of the chosen unit are rounded down.

  • :time (String)

    Sets the units for columns that contain a time duration. If omitted, time duration values are rendered with a suffix such as ms, s, m or h, chosen such that the numeric value of the column is as small as possible whilst still being at least 1.0. If given, time duration values are rendered as an integer with no suffix. Values that are not an exact multiple of the chosen unit are rounded down.

  • :error_trace (Boolean)

    When set to true Elasticsearch will include the full stack trace of errors when they occur.

  • :filter_path (String, Array<String>)

    Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.

  • :human (Boolean)

    When set to true will return statistics in a format suitable for humans. For example ‘“exists_time”: “1h”` for humans and `“exists_time_in_millis”: 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines.

  • :pretty (Boolean)

    If set to true the returned JSON will be “pretty-formatted”. Only use this option for debugging only.

  • :headers (Hash)

    Custom HTTP headers

See Also:



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/elasticsearch/api/actions/cat/transforms.rb', line 69

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