lib/elasticsearch/api/actions/health_report.rb in elasticsearch-api-8.10.0 vs lib/elasticsearch/api/actions/health_report.rb in elasticsearch-api-8.11.0

- old
+ new

@@ -27,13 +27,21 @@ # @option arguments [Time] :timeout Explicit operation timeout # @option arguments [Boolean] :verbose Opt in for more information about the health of the system # @option arguments [Integer] :size Limit the number of affected resources the health API returns # @option arguments [Hash] :headers Custom HTTP headers # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/health-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.11/health-api.html # def health_report(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || "health_report" } + + defined_params = [:feature].inject({}) do |set_variables, variable| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + set_variables + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + arguments = arguments.clone headers = arguments.delete(:headers) || {} body = nil @@ -46,10 +54,10 @@ "_health_report" end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( - perform_request(method, path, params, body, headers) + perform_request(method, path, params, body, headers, request_opts) ) end end end end