Files
opensearch-pyd/elasticsearch/client/cat.py
T

485 lines
22 KiB
Python
Raw Normal View History

2016-08-16 21:23:14 +02:00
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH
2014-01-18 01:30:31 +01:00
2019-05-10 09:16:33 -06:00
2014-01-18 01:30:31 +01:00
class CatClient(NamespacedClient):
2019-05-10 09:16:33 -06:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
2014-01-18 01:30:31 +01:00
def aliases(self, name=None, params=None):
"""
2015-12-08 22:19:32 +01:00
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html>`_
2014-01-18 01:30:31 +01:00
:arg name: A comma-separated list of alias names to return
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "aliases", name), params=params
)
2014-04-28 19:19:02 +02:00
@query_params("bytes", "format", "h", "help", "local", "master_timeout", "s", "v")
2014-01-18 01:30:31 +01:00
def allocation(self, node_id=None, params=None):
"""
Allocation provides a snapshot of how shards have located around the
cluster and the state of disk usage.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html>`_
2014-01-18 01:30:31 +01:00
:arg node_id: A comma-separated list of node IDs or names to limit the
returned information
2015-08-25 01:21:16 +02:00
:arg bytes: The unit in which to display byte values, valid choices are:
2016-08-16 21:23:14 +02:00
'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "allocation", node_id), params=params
)
2014-04-28 19:19:02 +02:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
2014-01-18 01:30:31 +01:00
def count(self, index=None, params=None):
"""
Count provides quick access to the document count of the entire cluster,
or individual indices.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html>`_
2014-01-18 01:30:31 +01:00
:arg index: A comma-separated list of index names to limit the returned
information
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "count", index), params=params
)
2014-04-28 19:19:02 +02:00
2019-05-10 09:16:33 -06:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "ts", "v")
2014-01-18 01:30:31 +01:00
def health(self, params=None):
"""
health is a terse, one-line representation of the same information from
:meth:`~elasticsearch.client.cluster.ClusterClient.health` API
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html>`_
2014-01-18 01:30:31 +01:00
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2014-01-18 01:30:31 +01:00
:arg ts: Set to false to disable timestamping, default True
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request("GET", "/_cat/health", params=params)
2014-04-28 19:19:02 +02:00
2019-05-10 09:16:33 -06:00
@query_params("help", "s")
2014-01-18 01:30:31 +01:00
def help(self, params=None):
"""
A simple help for the cat api.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html>`_
2014-01-18 01:30:31 +01:00
2014-04-28 19:19:02 +02:00
:arg help: Return help information, default False
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request("GET", "/_cat", params=params)
2014-04-28 19:19:02 +02:00
2019-05-10 09:16:33 -06:00
@query_params(
"bytes",
"size",
"format",
"h",
"health",
"help",
"local",
"master_timeout",
"pri",
"s",
"v",
)
2014-01-18 01:30:31 +01:00
def indices(self, index=None, params=None):
"""
The indices command provides a cross-section of each index.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html>`_
2014-01-18 01:30:31 +01:00
:arg index: A comma-separated list of index names to limit the returned
information
2015-08-25 01:21:16 +02:00
:arg bytes: The unit in which to display byte values, valid choices are:
'b', 'k', 'm', 'g'
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
2016-10-17 13:56:58 +02:00
:arg health: A health status ("green", "yellow", or "red" to filter only
indices matching the specified health status, default None, valid
choices are: 'green', 'yellow', 'red'
2014-01-18 01:30:31 +01:00
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
:arg pri: Set to true to return stats only for primary shards, default
False
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "indices", index), params=params
)
2014-04-28 19:19:02 +02:00
2019-05-10 09:16:33 -06:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
2014-01-18 01:30:31 +01:00
def master(self, params=None):
"""
2014-01-18 01:54:01 +01:00
Displays the master's node ID, bound IP address, and node name.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html>`_
2014-01-18 01:30:31 +01:00
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request("GET", "/_cat/master", params=params)
2014-04-28 19:19:02 +02:00
2019-05-10 09:16:33 -06:00
@query_params("format", "full_id", "h", "help", "local", "master_timeout", "s", "v")
2014-01-18 01:30:31 +01:00
def nodes(self, params=None):
"""
The nodes command shows the cluster topology.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html>`_
2014-01-18 01:30:31 +01:00
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
:arg full_id: Return the full node ID instead of the shortened version
(default: false)
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request("GET", "/_cat/nodes", params=params)
2014-04-28 19:19:02 +02:00
2019-05-10 09:16:33 -06:00
@query_params(
"bytes", "time", "size", "format", "h", "help", "master_timeout", "s", "v"
)
2014-01-18 01:30:31 +01:00
def recovery(self, index=None, params=None):
"""
recovery is a view of shard replication.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html>`_
2014-01-18 01:30:31 +01:00
:arg index: A comma-separated list of index names to limit the returned
information
2015-08-25 01:21:16 +02:00
:arg bytes: The unit in which to display byte values, valid choices are:
2016-08-16 21:23:14 +02:00
'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "recovery", index), params=params
)
2014-04-28 19:19:02 +02:00
2019-05-10 09:16:33 -06:00
@query_params(
"bytes", "size", "format", "h", "help", "local", "master_timeout", "s", "v"
2019-05-10 09:16:33 -06:00
)
2014-01-18 01:30:31 +01:00
def shards(self, index=None, params=None):
"""
The shards command is the detailed view of what nodes contain which shards.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html>`_
2014-01-18 01:30:31 +01:00
:arg index: A comma-separated list of index names to limit the returned
information
:arg bytes: The unit in which to display byte values, valid choices are:
'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "shards", index), params=params
)
2014-04-23 17:39:25 +02:00
2019-05-10 09:16:33 -06:00
@query_params("bytes", "size", "format", "h", "help", "s", "v")
2014-04-23 17:39:25 +02:00
def segments(self, index=None, params=None):
"""
The segments command is the detailed view of Lucene segments per index.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html>`_
2014-04-23 17:39:25 +02:00
:arg index: A comma-separated list of index names to limit the returned
information
:arg bytes: The unit in which to display byte values, valid choices are:
'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-04-23 17:39:25 +02:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-04-23 17:39:25 +02:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "segments", index), params=params
)
2014-04-28 19:19:02 +02:00
2019-05-10 09:16:33 -06:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
2014-01-18 01:30:31 +01:00
def pending_tasks(self, params=None):
"""
pending_tasks provides the same information as the
:meth:`~elasticsearch.client.cluster.ClusterClient.pending_tasks` API
in a convenient tabular format.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html>`_
2014-01-18 01:30:31 +01:00
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-01-18 01:30:31 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-01-18 01:30:31 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", "/_cat/pending_tasks", params=params
)
2014-04-28 19:19:02 +02:00
2019-05-10 09:16:33 -06:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "size", "v")
2017-01-11 15:42:33 +01:00
def thread_pool(self, thread_pool_patterns=None, params=None):
2014-02-10 18:14:30 +01:00
"""
Get information about thread pools.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html>`_
2014-02-10 18:14:30 +01:00
2017-01-11 15:42:33 +01:00
:arg thread_pool_patterns: A comma-separated list of regular-expressions
to filter the thread pools in the output
:arg format: a short version of the Accept header, e.g. json, yaml
2014-02-10 18:14:30 +01:00
:arg h: Comma-separated list of column names to display
2015-08-25 01:21:16 +02:00
:arg help: Return help information, default False
2014-02-10 18:14:30 +01:00
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2016-05-17 14:12:39 +02:00
:arg size: The multiplier in which to display values, valid choices are:
'', 'k', 'm', 'g', 't', 'p'
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-02-10 18:14:30 +01:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET",
_make_path("_cat", "thread_pool", thread_pool_patterns),
params=params,
)
2014-05-09 17:41:59 +02:00
2019-05-10 09:16:33 -06:00
@query_params("bytes", "format", "h", "help", "local", "master_timeout", "s", "v")
2014-05-09 17:41:59 +02:00
def fielddata(self, fields=None, params=None):
"""
Shows information about currently loaded fielddata on a per-node basis.
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html>`_
2014-05-09 17:41:59 +02:00
:arg fields: A comma-separated list of fields to return the fielddata
size
2015-08-25 01:21:16 +02:00
:arg bytes: The unit in which to display byte values, valid choices are:
2016-05-17 14:12:39 +02:00
'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb'
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2014-05-09 17:41:59 +02:00
:arg h: Comma-separated list of column names to display
2015-08-25 01:21:16 +02:00
:arg help: Return help information, default False
2014-05-09 17:41:59 +02:00
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2014-05-09 17:41:59 +02:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "fielddata", fields), params=params
)
2019-05-10 09:16:33 -06:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
def plugins(self, params=None):
"""
2015-12-08 22:19:32 +01:00
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html>`_
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request("GET", "/_cat/plugins", params=params)
2019-05-10 09:16:33 -06:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
2015-08-25 01:21:16 +02:00
def nodeattrs(self, params=None):
"""
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html>`_
:arg format: a short version of the Accept header, e.g. json, yaml
2015-08-25 01:21:16 +02:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-10-14 00:06:27 +02:00
:arg v: Verbose mode. Display column headers, default False
2015-08-25 01:21:16 +02:00
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request("GET", "/_cat/nodeattrs", params=params)
2015-08-25 01:21:16 +02:00
2019-05-10 09:16:33 -06:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
2015-12-08 22:19:32 +01:00
def repositories(self, params=None):
"""
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html>`_
:arg format: a short version of the Accept header, e.g. json, yaml
2015-12-08 22:19:32 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node, default False
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-12-08 22:19:32 +01:00
:arg v: Verbose mode. Display column headers, default False
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", "/_cat/repositories", params=params
)
2015-12-08 22:19:32 +01:00
2019-05-10 09:16:33 -06:00
@query_params(
"format", "h", "help", "ignore_unavailable", "master_timeout", "s", "v"
)
2017-07-31 19:17:52 -04:00
def snapshots(self, repository, params=None):
2015-12-08 22:19:32 +01:00
"""
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html>`_
2015-12-08 22:19:32 +01:00
:arg repository: Name of repository from which to fetch the snapshot
information
2017-01-11 15:42:33 +01:00
:arg format: a short version of the Accept header, e.g. json, yaml
2015-12-08 22:19:32 +01:00
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
2016-03-22 21:04:07 +01:00
:arg ignore_unavailable: Set to true to ignore unavailable snapshots,
default False
2015-12-08 22:19:32 +01:00
:arg master_timeout: Explicit operation timeout for connection to master
node
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2015-12-08 22:19:32 +01:00
:arg v: Verbose mode. Display column headers, default False
"""
2017-07-31 19:17:52 -04:00
if repository in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'repository'.")
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "snapshots", repository), params=params
)
2016-05-17 14:12:39 +02:00
2019-05-10 09:16:33 -06:00
@query_params(
"actions",
"detailed",
"format",
"h",
"help",
"nodes",
"node_id",
2019-05-10 09:16:33 -06:00
"parent_task_id",
"s",
"v",
)
2016-05-17 14:12:39 +02:00
def tasks(self, params=None):
"""
2017-01-11 15:42:33 +01:00
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html>`_
2016-05-17 14:12:39 +02:00
:arg actions: A comma-separated list of actions that should be returned.
Leave empty to return all.
:arg detailed: Return detailed task information (default: false)
:arg format: a short version of the Accept header, e.g. json, yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
2017-10-26 14:51:37 +02:00
:arg nodes: A comma-separated list of node IDs or names to limit the
returned information; use `_local` to return information from the
node you're connecting to, leave empty to get information from all
nodes (used for older version of Elasticsearch)
:arg node_id: A comma-separated list of node IDs or names to limit the
2016-05-17 14:12:39 +02:00
returned information; use `_local` to return information from the
node you're connecting to, leave empty to get information from all
nodes
2017-10-26 14:51:37 +02:00
:arg parent_task_id: Return tasks with specified parent task id. Set to -1
2016-05-17 14:12:39 +02:00
to return all.
2017-01-11 15:42:33 +01:00
:arg s: Comma-separated list of column names or column aliases to sort
by
2016-05-17 14:12:39 +02:00
:arg v: Verbose mode. Display column headers, default False
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request("GET", "/_cat/tasks", params=params)
2016-05-17 14:12:39 +02:00
2019-05-10 09:16:33 -06:00
@query_params("format", "h", "help", "local", "master_timeout", "s", "v")
2017-01-11 15:42:33 +01:00
def templates(self, name=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html>`_
:arg name: A pattern that returned template names must match
:arg format: a short version of the Accept header, e.g. json, yaml
:arg h: Comma-separated list of column names to display
:arg help: Return help information, default False
:arg local: Return local information, do not retrieve the state from
master node (default: false)
:arg master_timeout: Explicit operation timeout for connection to master
node
:arg s: Comma-separated list of column names or column aliases to sort
by
:arg v: Verbose mode. Display column headers, default False
"""
2019-05-10 09:16:33 -06:00
return self.transport.perform_request(
"GET", _make_path("_cat", "templates", name), params=params
)