lib/elasticsearch/api/actions/ingest/get_pipeline.rb in elasticsearch-api-8.10.0 vs lib/elasticsearch/api/actions/ingest/get_pipeline.rb in elasticsearch-api-8.11.0
- old
+ new
@@ -27,13 +27,21 @@
# @option arguments [String] :id Comma separated list of pipeline ids. Wildcards supported
# @option arguments [Boolean] :summary Return pipelines without their definitions (default: false)
# @option arguments [Time] :master_timeout Explicit operation timeout for connection to master node
# @option arguments [Hash] :headers Custom HTTP headers
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/get-pipeline-api.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.11/get-pipeline-api.html
#
def get_pipeline(arguments = {})
+ request_opts = { endpoint: arguments[:endpoint] || "ingest.get_pipeline" }
+
+ defined_params = [:id].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 @@
"_ingest/pipeline"
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