in opensearch-api/lib/opensearch/api/actions/nodes/stats.rb [47:77]
def stats(arguments = {})
headers = arguments.delete(:headers) || {}
arguments = arguments.clone
_node_id = arguments.delete(:node_id)
_metric = arguments.delete(:metric)
_index_metric = arguments.delete(:index_metric)
method = OpenSearch::API::HTTP_GET
path = if _node_id && _metric && _index_metric
"_nodes/#{Utils.__listify(_node_id)}/stats/#{Utils.__listify(_metric)}/#{Utils.__listify(_index_metric)}"
elsif _metric && _index_metric
"_nodes/stats/#{Utils.__listify(_metric)}/#{Utils.__listify(_index_metric)}"
elsif _node_id && _metric
"_nodes/#{Utils.__listify(_node_id)}/stats/#{Utils.__listify(_metric)}"
elsif _node_id
"_nodes/#{Utils.__listify(_node_id)}/stats"
elsif _metric
"_nodes/stats/#{Utils.__listify(_metric)}"
else
"_nodes/stats"
end
params = Utils.__validate_and_extract_params arguments, ParamsRegistry.get(__method__)
body = nil
perform_request(method, path, params, body, headers).body
end