lib/elasticsearch/api/actions/rollup/get_jobs.rb in elasticsearch-api-8.10.0 vs lib/elasticsearch/api/actions/rollup/get_jobs.rb in elasticsearch-api-8.11.0
- old
+ new
@@ -29,13 +29,21 @@
# support SLA of official GA features.
#
# @option arguments [String] :id The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs
# @option arguments [Hash] :headers Custom HTTP headers
#
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.10/rollup-get-job.html
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.11/rollup-get-job.html
#
def get_jobs(arguments = {})
+ request_opts = { endpoint: arguments[:endpoint] || "rollup.get_jobs" }
+
+ 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
@@ -48,10 +56,10 @@
"_rollup/job"
end
params = {}
Elasticsearch::API::Response.new(
- perform_request(method, path, params, body, headers)
+ perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end