Module: OpenSearch::API::Cat::Actions

Included in:
CatClient
Defined in:
lib/opensearch/api/namespace/cat.rb,
lib/opensearch/api/actions/cat/help.rb,
lib/opensearch/api/actions/cat/count.rb,
lib/opensearch/api/actions/cat/nodes.rb,
lib/opensearch/api/actions/cat/tasks.rb,
lib/opensearch/api/actions/cat/health.rb,
lib/opensearch/api/actions/cat/master.rb,
lib/opensearch/api/actions/cat/shards.rb,
lib/opensearch/api/actions/cat/aliases.rb,
lib/opensearch/api/actions/cat/indices.rb,
lib/opensearch/api/actions/cat/plugins.rb,
lib/opensearch/api/actions/cat/recovery.rb,
lib/opensearch/api/actions/cat/segments.rb,
lib/opensearch/api/actions/cat/fielddata.rb,
lib/opensearch/api/actions/cat/nodeattrs.rb,
lib/opensearch/api/actions/cat/snapshots.rb,
lib/opensearch/api/actions/cat/templates.rb,
lib/opensearch/api/actions/cat/allocation.rb,
lib/opensearch/api/actions/cat/thread_pool.rb,
lib/opensearch/api/actions/cat/pit_segments.rb,
lib/opensearch/api/actions/cat/repositories.rb,
lib/opensearch/api/actions/cat/pending_tasks.rb,
lib/opensearch/api/actions/cat/cluster_manager.rb,
lib/opensearch/api/actions/cat/params_registry.rb,
lib/opensearch/api/actions/cat/all_pit_segments.rb

Defined Under Namespace

Modules: ParamsRegistry

Instance Method Summary collapse

Instance Method Details

#aliases(arguments = {}) ⇒ Object

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

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (List)

    A comma-separated list of alias names to return

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :expand_wildcards (String)

    Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)

  • :headers (Hash)

    Custom HTTP headers



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/opensearch/api/actions/cat/aliases.rb', line 44

def aliases(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _name = arguments.delete(:name)

  method = OpenSearch::API::HTTP_GET
  path   = if _name
             "_cat/aliases/#{Utils.__listify(_name)}"
           else
             '_cat/aliases'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#all_pit_segments(arguments = {}) ⇒ Object

Retrieves info of all PIT segments

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/opensearch/api/actions/cat/all_pit_segments.rb', line 22

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

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/pit_segments/_all'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#allocation(arguments = {}) ⇒ Object

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

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :node_id (List)

    A comma-separated list of node IDs or names to limit the returned information

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node (default: false)

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/opensearch/api/actions/cat/allocation.rb', line 46

def allocation(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _node_id = arguments.delete(:node_id)

  method = OpenSearch::API::HTTP_GET
  path   = if _node_id
             "_cat/allocation/#{Utils.__listify(_node_id)}"
           else
             '_cat/allocation'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#cluster_manager(arguments = {}) ⇒ Object

Returns information about the cluster_manager node.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node (default: false)

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/opensearch/api/actions/cat/cluster_manager.rb', line 26

def cluster_manager(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/cluster_manager'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#count(arguments = {}) ⇒ Object

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

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names to limit the returned information

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/opensearch/api/actions/cat/count.rb', line 42

def count(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _index = arguments.delete(:index)

  method = OpenSearch::API::HTTP_GET
  path   = if _index
             "_cat/count/#{Utils.__listify(_index)}"
           else
             '_cat/count'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#fielddata(arguments = {}) ⇒ Object

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

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :fields (List)

    A comma-separated list of fields to return the fielddata size

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/opensearch/api/actions/cat/fielddata.rb', line 43

def fielddata(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _fields = arguments.delete(:fields)

  method = OpenSearch::API::HTTP_GET
  path   = if _fields
             "_cat/fielddata/#{Utils.__listify(_fields)}"
           else
             '_cat/fielddata'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#health(arguments = {}) ⇒ Object

Returns a concise representation of the cluster health.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :ts (Boolean)

    Set to false to disable timestamping

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/opensearch/api/actions/cat/health.rb', line 43

def health(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/health'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#help(arguments = {}) ⇒ Object

Returns help for the Cat APIs.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :headers (Hash)

    Custom HTTP headers



38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/opensearch/api/actions/cat/help.rb', line 38

def help(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#indices(arguments = {}) ⇒ Object

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

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names to limit the returned information

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node (default: false)

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :health (String)

    A health status (“green”, “yellow”, or “red” to filter only indices matching the specified health status (options: green, yellow, red)

  • :help (Boolean)

    Return help information

  • :pri (Boolean)

    Set to true to return stats only for primary shards

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :v (Boolean)

    Verbose mode. Display column headers

  • :include_unloaded_segments (Boolean)

    If set to true segment stats will include stats for segments that are not currently loaded into memory

  • :expand_wildcards (String)

    Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)

  • :headers (Hash)

    Custom HTTP headers



51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/opensearch/api/actions/cat/indices.rb', line 51

def indices(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _index = arguments.delete(:index)

  method = OpenSearch::API::HTTP_GET
  path   = if _index
             "_cat/indices/#{Utils.__listify(_index)}"
           else
             '_cat/indices'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#master(arguments = {}) ⇒ Object

Returns information about the master node.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :local (Boolean)

    Return local information, do not retrieve the state from master node (default: false)

  • :master_timeout (Time)

    Explicit operation timeout for connection to master node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/opensearch/api/actions/cat/master.rb', line 44

def master(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/master'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#nodeattrs(arguments = {}) ⇒ Object

Returns information about custom node attributes.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node (default: false)

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/opensearch/api/actions/cat/nodeattrs.rb', line 44

def nodeattrs(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/nodeattrs'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#nodes(arguments = {}) ⇒ Object

Returns basic statistics about performance of cluster nodes.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :full_id (Boolean)

    Return the full node ID instead of the shortened version (default: false)

  • :local (Boolean)

    Calculate the selected nodes using the local cluster state rather than the state from cluster_manager node (default: false) Deprecated

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :v (Boolean)

    Verbose mode. Display column headers

  • :include_unloaded_segments (Boolean)

    If set to true segment stats will include stats for segments that are not currently loaded into memory

  • :headers (Hash)

    Custom HTTP headers



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/opensearch/api/actions/cat/nodes.rb', line 48

def nodes(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/nodes'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h], escape: false) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#pending_tasks(arguments = {}) ⇒ Object

Returns a concise representation of the cluster pending tasks.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node (default: false)

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/opensearch/api/actions/cat/pending_tasks.rb', line 45

def pending_tasks(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/pending_tasks'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#pit_segments(arguments = {}) ⇒ Object

Retrieves info of certain PIT segments

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • body: (Hash)

    Must include ‘pit_id`, which is an array of PIT IDs. (required)

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers

Raises:

  • (ArgumentError)


23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/opensearch/api/actions/cat/pit_segments.rb', line 23

def pit_segments(arguments = {})
  raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

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

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/pit_segments'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = arguments[:body]
  perform_request(method, path, params, body, headers).body
end

#plugins(arguments = {}) ⇒ Object

Returns information about installed plugins across nodes node.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node (default: false)

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :include_bootstrap (Boolean)

    Include bootstrap plugins in the response

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/opensearch/api/actions/cat/plugins.rb', line 45

def plugins(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/plugins'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#recovery(arguments = {}) ⇒ Object

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

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    Comma-separated list or wildcard expression of index names to limit the returned information

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :active_only (Boolean)

    If ‘true`, the response only includes ongoing shard recoveries

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :detailed (Boolean)

    If ‘true`, the response includes detailed information about shard recoveries

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/opensearch/api/actions/cat/recovery.rb', line 46

def recovery(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _index = arguments.delete(:index)

  method = OpenSearch::API::HTTP_GET
  path   = if _index
             "_cat/recovery/#{Utils.__listify(_index)}"
           else
             '_cat/recovery'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#repositories(arguments = {}) ⇒ Object

Returns information about snapshot repositories registered in the cluster.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/opensearch/api/actions/cat/repositories.rb', line 44

def repositories(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/repositories'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#segments(arguments = {}) ⇒ Object

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

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names to limit the returned information

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/opensearch/api/actions/cat/segments.rb', line 43

def segments(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _index = arguments.delete(:index)

  method = OpenSearch::API::HTTP_GET
  path   = if _index
             "_cat/segments/#{Utils.__listify(_index)}"
           else
             '_cat/segments'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#shards(arguments = {}) ⇒ Object

Provides a detailed view of shard allocation on nodes.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :index (List)

    A comma-separated list of index names to limit the returned information

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :bytes (String)

    The unit in which to display byte values (options: b, k, kb, m, mb, g, gb, t, tb, p, pb)

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node (default: false) Deprecated

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/opensearch/api/actions/cat/shards.rb', line 47

def shards(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _index = arguments.delete(:index)

  method = OpenSearch::API::HTTP_GET
  path   = if _index
             "_cat/shards/#{Utils.__listify(_index)}"
           else
             '_cat/shards'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end

#snapshots(arguments = {}) ⇒ Object

Returns all snapshots in a specific repository.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :repository (List)

    Name of repository from which to fetch the snapshot information

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :ignore_unavailable (Boolean)

    Set to true to ignore unavailable snapshots

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/opensearch/api/actions/cat/snapshots.rb', line 46

def snapshots(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _repository = arguments.delete(:repository)

  method = OpenSearch::API::HTTP_GET
  path   = if _repository
             "_cat/snapshots/#{Utils.__listify(_repository)}"
           else
             '_cat/snapshots'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#tasks(arguments = {}) ⇒ Object

Returns information about the tasks currently executing on one or more nodes in the cluster.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :nodes (List)

    A comma-separated list of node IDs or names to limit the returned information; use ‘_local` to return information from the node you’re connecting to, leave empty to get information from all nodes

  • :actions (List)

    A comma-separated list of actions that should be returned. Leave empty to return all.

  • :detailed (Boolean)

    Return detailed task information (default: false)

  • :parent_task_id (String)

    Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :time (String)

    The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/opensearch/api/actions/cat/tasks.rb', line 46

def tasks(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  method = OpenSearch::API::HTTP_GET
  path   = '_cat/tasks'
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#templates(arguments = {}) ⇒ Object

Returns information about existing templates.

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :name (String)

    A pattern that returned template names must match

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node (default: false)

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/opensearch/api/actions/cat/templates.rb', line 45

def templates(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _name = arguments.delete(:name)

  method = OpenSearch::API::HTTP_GET
  path   = if _name
             "_cat/templates/#{Utils.__listify(_name)}"
           else
             '_cat/templates'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)

  body = nil
  perform_request(method, path, params, body, headers).body
end

#thread_pool(arguments = {}) ⇒ Object

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

Parameters:

  • arguments (Hash) (defaults to: {})

    a customizable set of options

Options Hash (arguments):

  • :thread_pool_patterns (List)

    A comma-separated list of regular-expressions to filter the thread pools in the output

  • :format (String)

    a short version of the Accept header, e.g. json, yaml

  • :size (String)

    The multiplier in which to display values Deprecated (options: , k, m, g, t, p)

  • :local (Boolean)

    Return local information, do not retrieve the state from cluster_manager node (default: false)

  • :master_timeout (Time) — default: DEPRECATED: use cluster_manager_timeout instead

    Explicit operation timeout for connection to master node

  • :cluster_manager_timeout (Time)

    Explicit operation timeout for connection to cluster_manager node

  • :h (List)

    Comma-separated list of column names to display

  • :help (Boolean)

    Return help information

  • :s (List)

    Comma-separated list of column names or column aliases to sort by

  • :v (Boolean)

    Verbose mode. Display column headers

  • :headers (Hash)

    Custom HTTP headers



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/opensearch/api/actions/cat/thread_pool.rb', line 47

def thread_pool(arguments = {})
  headers = arguments.delete(:headers) || {}

  arguments = arguments.clone

  _thread_pool_patterns = arguments.delete(:thread_pool_patterns)

  method = OpenSearch::API::HTTP_GET
  path   = if _thread_pool_patterns
             "_cat/thread_pool/#{Utils.__listify(_thread_pool_patterns)}"
           else
             '_cat/thread_pool'
           end
  params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
  params[:h] = Utils.__listify(params[:h]) if params[:h]

  body = nil
  perform_request(method, path, params, body, headers).body
end