Module: Elasticsearch::API::Cat::Actions
- Included in:
- CatClient
- Defined in:
- lib/elasticsearch/api/namespace/cat.rb,
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/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
-
#aliases(arguments = {}) ⇒ Object
Get aliases.
-
#allocation(arguments = {}) ⇒ Object
Get shard allocation information.
-
#component_templates(arguments = {}) ⇒ Object
Get component templates.
-
#count(arguments = {}) ⇒ Object
Get a document count.
-
#fielddata(arguments = {}) ⇒ Object
Get field data cache information.
-
#health(arguments = {}) ⇒ Object
Get the cluster health status.
-
#help(arguments = {}) ⇒ Object
Get CAT help.
-
#indices(arguments = {}) ⇒ Object
Get index information.
-
#master(arguments = {}) ⇒ Object
Get master node information.
-
#ml_data_frame_analytics(arguments = {}) ⇒ Object
Get data frame analytics jobs.
-
#ml_datafeeds(arguments = {}) ⇒ Object
Get datafeeds.
-
#ml_jobs(arguments = {}) ⇒ Object
Get anomaly detection jobs.
-
#ml_trained_models(arguments = {}) ⇒ Object
Get trained models.
-
#nodeattrs(arguments = {}) ⇒ Object
Get node attribute information.
-
#nodes(arguments = {}) ⇒ Object
Get node information.
-
#pending_tasks(arguments = {}) ⇒ Object
Get pending task information.
-
#plugins(arguments = {}) ⇒ Object
Get plugin information.
-
#recovery(arguments = {}) ⇒ Object
Get shard recovery information.
-
#repositories(arguments = {}) ⇒ Object
Get snapshot repository information.
-
#segments(arguments = {}) ⇒ Object
Get segment information.
-
#shards(arguments = {}) ⇒ Object
Get shard information.
-
#snapshots(arguments = {}) ⇒ Object
Get snapshot information.
-
#tasks(arguments = {}) ⇒ Object
Get task information This functionality is Experimental and may be changed or removed completely in a future release.
-
#templates(arguments = {}) ⇒ Object
Get index template information.
-
#thread_pool(arguments = {}) ⇒ Object
Get thread pool statistics.
-
#transforms(arguments = {}) ⇒ Object
Get transform information.
Instance Method Details
#aliases(arguments = {}) ⇒ Object
Get aliases
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/elasticsearch/api/actions/cat/aliases.rb', line 41 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
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/elasticsearch/api/actions/cat/allocation.rb', line 41 def allocation(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.allocation' } defined_params = [:node_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _node_id = arguments.delete(:node_id) method = Elasticsearch::API::HTTP_GET path = if _node_id "_cat/allocation/#{Utils.__listify(_node_id)}" else '_cat/allocation' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#component_templates(arguments = {}) ⇒ Object
Get component templates
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/elasticsearch/api/actions/cat/component_templates.rb', line 41 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
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/elasticsearch/api/actions/cat/count.rb', line 39 def count(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.count' } defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index "_cat/count/#{Utils.__listify(_index)}" else '_cat/count' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#fielddata(arguments = {}) ⇒ Object
Get field data cache information
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/elasticsearch/api/actions/cat/fielddata.rb', line 39 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
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cat/health.rb', line 39 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
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/elasticsearch/api/actions/cat/help.rb', line 31 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
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/elasticsearch/api/actions/cat/indices.rb', line 44 def indices(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.indices' } defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index "_cat/indices/#{Utils.__listify(_index)}" else '_cat/indices' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#master(arguments = {}) ⇒ Object
Get master node information
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cat/master.rb', line 40 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
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb', line 40 def ml_data_frame_analytics(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_data_frame_analytics' } defined_params = [:id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _id = arguments.delete(:id) method = Elasticsearch::API::HTTP_GET path = if _id "_cat/ml/data_frame/analytics/#{Utils.__listify(_id)}" else '_cat/ml/data_frame/analytics' end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#ml_datafeeds(arguments = {}) ⇒ Object
Get datafeeds
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/elasticsearch/api/actions/cat/ml_datafeeds.rb', line 40 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
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/elasticsearch/api/actions/cat/ml_jobs.rb', line 40 def ml_jobs(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_jobs' } defined_params = [:job_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _job_id = arguments.delete(:job_id) method = Elasticsearch::API::HTTP_GET path = if _job_id "_cat/ml/anomaly_detectors/#{Utils.__listify(_job_id)}" else '_cat/ml/anomaly_detectors' end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#ml_trained_models(arguments = {}) ⇒ Object
Get trained models
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/elasticsearch/api/actions/cat/ml_trained_models.rb', line 42 def ml_trained_models(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.ml_trained_models' } defined_params = [:model_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _model_id = arguments.delete(:model_id) method = Elasticsearch::API::HTTP_GET path = if _model_id "_cat/ml/trained_models/#{Utils.__listify(_model_id)}" else '_cat/ml/trained_models' end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#nodeattrs(arguments = {}) ⇒ Object
Get node attribute information
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cat/nodeattrs.rb', line 40 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
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/elasticsearch/api/actions/cat/nodes.rb', line 41 def nodes(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.nodes' } arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil method = Elasticsearch::API::HTTP_GET path = '_cat/nodes' params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h], escape: false) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#pending_tasks(arguments = {}) ⇒ Object
Get pending task information
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/elasticsearch/api/actions/cat/pending_tasks.rb', line 40 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
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/elasticsearch/api/actions/cat/plugins.rb', line 41 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
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/elasticsearch/api/actions/cat/recovery.rb', line 41 def recovery(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.recovery' } defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index "_cat/recovery/#{Utils.__listify(_index)}" else '_cat/recovery' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#repositories(arguments = {}) ⇒ Object
Get snapshot repository information
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/elasticsearch/api/actions/cat/repositories.rb', line 40 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
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/elasticsearch/api/actions/cat/segments.rb', line 46 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
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/elasticsearch/api/actions/cat/shards.rb', line 40 def shards(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.shards' } defined_params = [:index].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _index = arguments.delete(:index) method = Elasticsearch::API::HTTP_GET path = if _index "_cat/shards/#{Utils.__listify(_index)}" else '_cat/shards' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#snapshots(arguments = {}) ⇒ Object
Get snapshot information
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/elasticsearch/api/actions/cat/snapshots.rb', line 41 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 This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/elasticsearch/api/actions/cat/tasks.rb', line 48 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
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/elasticsearch/api/actions/cat/templates.rb', line 41 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
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/elasticsearch/api/actions/cat/thread_pool.rb', line 41 def thread_pool(arguments = {}) request_opts = { endpoint: arguments[:endpoint] || 'cat.thread_pool' } defined_params = [:thread_pool_patterns].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil _thread_pool_patterns = arguments.delete(:thread_pool_patterns) method = Elasticsearch::API::HTTP_GET path = if _thread_pool_patterns "_cat/thread_pool/#{Utils.__listify(_thread_pool_patterns)}" else '_cat/thread_pool' end params = Utils.process_params(arguments) params[:h] = Utils.__listify(params[:h]) if params[:h] Elasticsearch::API::Response.new( perform_request(method, path, params, body, headers, request_opts) ) end |
#transforms(arguments = {}) ⇒ Object
Get transform information
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/elasticsearch/api/actions/cat/transforms.rb', line 42 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 |