diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index 7504667e3..1619109a1 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -57,6 +57,7 @@ def perform_request(method, path, params = {}, body = nil, headers = nil, reques :cluster, :connector, :dangling_indices, + :data_recovery, :encryption, :enrich, :eql, diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb index f1fae4b37..22deff861 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/aliases.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Cat module Actions - # Get aliases. + # Get a compact list of aliases. # Get the cluster's index aliases, including filter and routing information. # This API does not return data stream aliases. # IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb index 9632145e5..ef319440e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/component_templates.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Cat module Actions - # Get component templates. + # Get a compact list of component templates. # Get information about component templates in a cluster. # Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. # IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb index f5a3d42bd..16e871fa9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/health.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Cat module Actions - # Get the cluster health status. + # Get a compact cluster health summary. # IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. # They are not intended for use by applications. For application consumption, use the cluster health API. # This API is often used to check malfunctioning clusters. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb index 62b89b5bf..ff600a7f0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/indices.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Cat module Actions - # Get index information. + # Get a compact list of indices. # Get high-level information about indices in a cluster, including backing indices for data streams. # Use this request to get the following information for each index in a cluster: # - shard count diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb index a1d3ff104..0c136ced5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/nodes.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Cat module Actions - # Get node information. + # Get a compact list of nodes. # Get information about the nodes in a cluster. # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API. # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb index f48e3375c..142809cfe 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/recovery.rb @@ -30,7 +30,7 @@ module Actions # # @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request. # Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. - # @option arguments [Boolean] :active_only If `true`, the response only includes ongoing shard recoveries. + # @option arguments [Boolean] :active_only If `true`, the response only includes shard recoveries that have not yet completed (excludes `done` stage). # @option arguments [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries. # @option arguments [String, Array] :h A comma-separated list of columns names to display. # It supports simple wildcards. Server default: ip,hp,rp,r,m,n,cpu,l. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb index 41226355b..5b4c102ec 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/repositories.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Cat module Actions - # Get snapshot repository information. + # Get a compact list of snapshot repositories. # Get a list of snapshot repositories for a cluster. # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API. # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb index 076d7c1e5..f7856bced 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/snapshots.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Cat module Actions - # Get snapshot information. + # Get a compact list of snapshots. # Get information about the snapshots stored in one or more repositories. # A snapshot is a backup of an index or running Elasticsearch cluster. # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb index 5598978ce..909917dcc 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cat/tasks.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Cat module Actions - # Get task information. + # Get a compact list of running tasks. # Get information about tasks currently running in the cluster. # IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API. # This functionality is experimental and is not ready for production usage. Experimental diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb index 965257ffe..474ba031b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/allocation_explain.rb @@ -67,7 +67,7 @@ def allocation_explain(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_cluster/allocation/explain' + path = '_cluster/allocation/explain' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb index 072af60ec..39a45b31a 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/cluster/info.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Cluster module Actions - # Get cluster info. + # Get cluster subsystem info. # Returns basic information about the cluster. # # @option arguments [String, Array] :target Limits the information returned to the specific target. Supports a comma-separated list, such as http,ingest. (*Required*) diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb index f96050726..de476d2aa 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/count.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/count.rb @@ -109,11 +109,11 @@ def count(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.listify(_index)}/_count" - else - '_count' - end + path = if _index + "#{Utils.listify(_index)}/_count" + else + '_count' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_recovery.rb new file mode 100644 index 000000000..5218b9b6f --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_recovery.rb @@ -0,0 +1,75 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module DataRecovery + module Actions + # Get a recovery. + # Get the status and details of a recovery that was started with the start recovery API. + # This API is intended for internal operator use. + # The progress of a running recovery is reported as a percentage, and the repository and audit details of the recovery are not exposed. + # This functionality is subject to potential breaking changes within a + # minor version, meaning that your referencing code may break when this + # library is upgraded. + # + # @option arguments [String] :recovery_id The identifier of the recovery, as returned when the recovery was started. (*Required*) + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + def get_recovery(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'data_recovery.get_recovery' } + + defined_params = [:recovery_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? + + raise ArgumentError, "Required argument 'recovery_id' missing" unless arguments[:recovery_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _recovery_id = arguments.delete(:recovery_id) + + method = Elasticsearch::API::HTTP_GET + path = "_data_recovery/recoveries/#{Utils.listify(_recovery_id)}" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_recovery_points.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_recovery_points.rb new file mode 100644 index 000000000..8a5361aa9 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_recovery_points.rb @@ -0,0 +1,73 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module DataRecovery + module Actions + # Get recovery points. + # Get recovery points from the platform-managed data recovery repository. + # This API is intended for internal operator use. + # Recovery points are returned in descending order by end time. Repository, + # snapshot, and policy identifiers are not exposed. + # This functionality is subject to potential breaking changes within a + # minor version, meaning that your referencing code may break when this + # library is upgraded. + # + # @option arguments [String, Time] :end_time_before Return only recovery points whose end time is earlier than this value. + # The boundary is exclusive and can be set to the last recovery point's + # end time to retrieve the next page. + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to `-1`. Server default: 30s. + # @option arguments [Integer] :size The maximum number of recovery points to return. The value must be between 1 and 1000. Server default: 100. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + def get_recovery_points(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'data_recovery.get_recovery_points' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_data_recovery/points' + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_recovery_sources.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_recovery_sources.rb new file mode 100644 index 000000000..c7a30f0ba --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_recovery_sources.rb @@ -0,0 +1,71 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module DataRecovery + module Actions + # Get recovery sources. + # Get the logical sources captured at an exact recovery point in the platform-managed data recovery repository. + # This API is intended for internal operator use. Repository, snapshot, and policy identifiers are not exposed. + # This functionality is subject to potential breaking changes within a + # minor version, meaning that your referencing code may break when this + # library is upgraded. + # + # @option arguments [String, Array] :expression A comma-separated list of source expressions to match. Wildcards and exclusions prefixed with `-` are supported. (*Required*) + # @option arguments [Boolean] :include_incomplete_sources If `true`, include logical sources that were not completely captured in the recovery point. + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to `-1`. Server default: 30s. + # @option arguments [String, Time] :recovery_point_end_time The exact end time of the recovery point. (*Required*) + # @option arguments [Integer] :size The maximum number of matching sources to return. The value must be between 1 and 1000. Server default: 100. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + def get_recovery_sources(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'data_recovery.get_recovery_sources' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_data_recovery/sources' + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_rpo_series.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_rpo_series.rb new file mode 100644 index 000000000..cc9dfba51 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/get_rpo_series.rb @@ -0,0 +1,75 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module DataRecovery + module Actions + # Get the recovery point objective series. + # Get, for each bucket in the half-open range `[start, end)`, the maximum age + # that the newest recoverable state reached during that bucket. + # This API is intended for internal operator use. + # The range is divided into at most 1,000 buckets. A bucket has no value if + # no retained recovery point covers its start. + # This functionality is subject to potential breaking changes within a + # minor version, meaning that your referencing code may break when this + # library is upgraded. + # + # @option arguments [String, Time] :start The inclusive start of the range, as a date or epoch milliseconds. + # When omitted, it is seven days before `end`, rounded down to a whole multiple of `bucket_duration`, + # so that repeated requests with default parameters return the same bucket boundaries. + # @option arguments [String, Time] :end The exclusive end of the range, as a date or epoch milliseconds. Server default: now. + # @option arguments [Time] :bucket_duration The duration of each bucket. It must be greater than zero, and the range must divide into at most 1,000 buckets. Server default: 1h. + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to `-1`. Server default: 30s. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + def get_rpo_series(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'data_recovery.get_rpo_series' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_data_recovery/rpo' + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/list_recoveries.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/list_recoveries.rb new file mode 100644 index 000000000..67c6530a2 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/list_recoveries.rb @@ -0,0 +1,75 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module DataRecovery + module Actions + # List recoveries. + # List the recoveries that were started with the start recovery API, including those that have finished. + # This API is intended for internal operator use. + # Recoveries are ordered by start time, and the most recent are returned first by default. + # To retrieve further pages, pass the start time and identifier of the last recovery of a page as `search_after_started_at` and `search_after_recovery_id`. + # This functionality is subject to potential breaking changes within a + # minor version, meaning that your referencing code may break when this + # library is upgraded. + # + # @option arguments [Integer] :size The maximum number of recoveries to return. The value must be between 1 and 1000. Server default: 100. + # @option arguments [String, Time] :started_at_gte Return only recoveries that started at or after this time, as an ISO-8601 timestamp. + # @option arguments [String, Time] :started_at_lt Return only recoveries that started before this time, as an ISO-8601 timestamp. It must not be earlier than `started_at_gte`. + # @option arguments [String] :order The order of the recoveries by start time. Server default: desc. + # @option arguments [String, Time] :search_after_started_at Return only recoveries after this start time in the sort order, to retrieve the next page. + # It must be provided together with `search_after_recovery_id`. + # @option arguments [String] :search_after_recovery_id Return only recoveries after this identifier in the sort order for recoveries with the same start time, to retrieve the next page. + # It must be provided together with `search_after_started_at`. + # @option arguments [String, Array] :status A comma-separated list of statuses. Return only recoveries with one of these statuses. By default, recoveries with any status are returned. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + def list_recoveries(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'data_recovery.list_recoveries' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_data_recovery/recoveries' + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/start_recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/start_recovery.rb new file mode 100644 index 000000000..e4fa7a2d8 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/data_recovery/start_recovery.rb @@ -0,0 +1,73 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module DataRecovery + module Actions + # Start a recovery. + # Start recovering indices and data streams from a recovery point. + # This API is intended for internal operator use. + # Depending on the mode, the sources are either replaced with their state at the recovery point, over the data that currently exists, + # or recovered under new names. + # The recovery runs in the background, so the API returns with a `202 Accepted` status once it has started. + # This functionality is subject to potential breaking changes within a + # minor version, meaning that your referencing code may break when this + # library is upgraded. + # + # @option arguments [Time] :master_timeout The period to wait for the master node. + # If the master node is not available before the timeout expires, the request fails and returns an error. + # To indicate that the request should never timeout, set it to `-1`. Server default: 30s. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + def start_recovery(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'data_recovery.start_recovery' } + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + method = Elasticsearch::API::HTTP_POST + path = '_data_recovery/recoveries' + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb index db5bf4173..46c9d2dca 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/explain.rb @@ -97,7 +97,7 @@ def explain(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "#{Utils.listify(_index)}/_explain/#{Utils.listify(_id)}" + path = "#{Utils.listify(_index)}/_explain/#{Utils.listify(_id)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb index 0b29328c6..97c5a7eb2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb @@ -82,11 +82,11 @@ def field_caps(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.listify(_index)}/_field_caps" - else - '_field_caps' - end + path = if _index + "#{Utils.listify(_index)}/_field_caps" + else + '_field_caps' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb index 5b45e9ca4..184377db2 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/get_field_mapping.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Indices module Actions - # Get mapping definitions. + # Get field mapping definitions. # Retrieves mapping definitions for one or more fields. # For data streams, the API retrieves field mappings for the stream’s backing indices. # This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb index 4752638cb..0ed075657 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/recovery.rb @@ -43,7 +43,7 @@ module Actions # @option arguments [String, Array] :index Comma-separated list of data streams, indices, and aliases used to limit the request. # Supports wildcards (`*`). # To target all data streams and indices, omit this parameter or use `*` or `_all`. - # @option arguments [Boolean] :active_only If `true`, the response only includes ongoing shard recoveries. + # @option arguments [Boolean] :active_only If `true`, the response only includes shard recoveries that have not yet completed (excludes `DONE` stage). # @option arguments [Boolean] :detailed If `true`, the response includes detailed information about shard recoveries. # @option arguments [Boolean] :allow_no_indices A setting that does two separate checks on the index expression. # If `false`, the request returns an error (1) if any wildcard expression diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb index 8a5148822..c01461470 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb @@ -80,7 +80,7 @@ def resolve_index(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_resolve/index/#{Utils.listify(_name)}" + path = "_resolve/index/#{Utils.listify(_name)}" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb index 2044006ec..16a28785b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/rollover.rb @@ -23,7 +23,8 @@ module API module Indices module Actions # Roll over to a new index. - # TIP: We recommend using the index lifecycle rollover action to automate rollovers. However, Serverless does not support Index Lifecycle Management (ILM), so don't use this approach in the Serverless context. + # TIP: To automate rollovers, use index lifecycle management (ILM) in deployments that support it. + # Serverless does not support ILM. For data streams in Serverless, use data stream lifecycle instead. # The rollover API creates a new index for a data stream or index alias. # The API behavior depends on the rollover target. # **Roll over a data stream** diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb index 2b87ac404..f4aaecbda 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/update_aliases.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module Indices module Actions - # Create or update an alias. + # Update aliases and delete indices atomically. # Adds a data stream or index to an alias. # # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb index a92d4fd4c..c9b61ded6 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/indices/validate_query.rb @@ -93,11 +93,11 @@ def validate_query(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.listify(_index)}/_validate/query" - else - '_validate/query' - end + path = if _index + "#{Utils.listify(_index)}/_validate/query" + else + '_validate/query' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb index 8452f50ce..cee30983b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb @@ -22,10 +22,10 @@ module Elasticsearch module API module Inference module Actions - # Perform chat completion inference on the service. + # Perform streaming chat completion inference on the service. # The chat completion inference API enables real-time responses for chat completion tasks by delivering answers incrementally, reducing response times during computation. # It only works with the `chat_completion` task type. - # NOTE: The `chat_completion` task type is only available within the _stream API and only supports streaming. + # NOTE: The `chat_completion` task type supports both streaming and non-streaming. # The Chat completion inference API and the Stream inference API differ in their response structure and capabilities. # The Chat completion inference API provides more comprehensive customization options through more fields and function calling support. # To determine whether a given inference service supports this task type, please see the page for that service. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/non_streaming_chat_completion.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/non_streaming_chat_completion.rb new file mode 100644 index 000000000..900036f4f --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/non_streaming_chat_completion.rb @@ -0,0 +1,93 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Inference + module Actions + # Perform non-streaming chat completion inference on the service. + # The chat completion inference API enables rich responses for chat completion tasks. + # It only works with the `chat_completion` task type. + # NOTE: The `chat_completion` task type supports both streaming and non-streaming. + # The Chat completion inference API provides more comprehensive customization options through more fields and function calling support. + # To determine whether a given inference service supports this task type, please see the page for that service. + # These services support non-streaming chat completion inference: + # - AI21 + # - Azure OpenAI + # - Deepseek + # - Elastic + # - FireworksAI + # - Groq + # - Huggingface + # - IBMWatsonX + # - Llama + # - Mistral + # - NVIDIA + # - OpenAI + # - OpenShiftAI + # + # @option arguments [String] :inference_id The inference Id (*Required*) + # @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 120s. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body chat_completion_request + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-non-streaming-chat-completion + # + def non_streaming_chat_completion(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.non_streaming_chat_completion' } + + defined_params = [:inference_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? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + method = Elasticsearch::API::HTTP_POST + path = "_inference/chat_completion/#{Utils.listify(_inference_id)}" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb index 25ba1b890..24550d2c9 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb @@ -70,11 +70,11 @@ def explain_data_frame_analytics(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _id - "_ml/data_frame/analytics/#{Utils.listify(_id)}/_explain" - else - '_ml/data_frame/analytics/_explain' - end + path = if _id + "_ml/data_frame/analytics/#{Utils.listify(_id)}/_explain" + else + '_ml/data_frame/analytics/_explain' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb index 9168ffb6b..315318afb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb @@ -80,11 +80,11 @@ def get_buckets(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _job_id && _timestamp - "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/buckets/#{Utils.listify(_timestamp)}" - else - "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/buckets" - end + path = if _job_id && _timestamp + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/buckets/#{Utils.listify(_timestamp)}" + else + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/buckets" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb index a9b97b3c4..fe3972062 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb @@ -64,11 +64,11 @@ def get_calendars(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _calendar_id - "_ml/calendars/#{Utils.listify(_calendar_id)}" - else - '_ml/calendars' - end + path = if _calendar_id + "_ml/calendars/#{Utils.listify(_calendar_id)}" + else + '_ml/calendars' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb index 154da7493..f13e6c0c1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_categories.rb @@ -74,11 +74,11 @@ def get_categories(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _job_id && _category_id - "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/categories/#{Utils.listify(_category_id)}" - else - "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/categories" - end + path = if _job_id && _category_id + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/categories/#{Utils.listify(_category_id)}" + else + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/categories" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb index 91b9e23b6..9fe532c61 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb @@ -81,7 +81,7 @@ def get_influencers(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/influencers" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/influencers" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb index 25ee58380..26abcf171 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb @@ -76,11 +76,11 @@ def get_model_snapshots(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _job_id && _snapshot_id - "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots/#{Utils.listify(_snapshot_id)}" - else - "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots" - end + path = if _job_id && _snapshot_id + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots/#{Utils.listify(_snapshot_id)}" + else + "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/model_snapshots" + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb index 13ea6f211..2a9937f9e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb @@ -103,7 +103,7 @@ def get_overall_buckets(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/overall_buckets" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/overall_buckets" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb index ad6930268..daf2d8725 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/get_records.rb @@ -84,7 +84,7 @@ def get_records(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/records" + path = "_ml/anomaly_detectors/#{Utils.listify(_job_id)}/results/records" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb index 24be8d4c4..f47391577 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb @@ -63,11 +63,11 @@ def preview_data_frame_analytics(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _id - "_ml/data_frame/analytics/#{Utils.listify(_id)}/_preview" - else - '_ml/data_frame/analytics/_preview' - end + path = if _id + "_ml/data_frame/analytics/#{Utils.listify(_id)}/_preview" + else + '_ml/data_frame/analytics/_preview' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb index dd3d6ba03..8d12fc557 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb @@ -75,11 +75,11 @@ def preview_datafeed(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _datafeed_id - "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_preview" - else - '_ml/datafeeds/_preview' - end + path = if _datafeed_id + "_ml/datafeeds/#{Utils.listify(_datafeed_id)}/_preview" + else + '_ml/datafeeds/_preview' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb index 855d8a9bd..9533ff511 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/mtermvectors.rb @@ -87,11 +87,11 @@ def mtermvectors(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.listify(_index)}/_mtermvectors" - else - '_mtermvectors' - end + path = if _index + "#{Utils.listify(_index)}/_mtermvectors" + else + '_mtermvectors' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb index a58174ad5..17e375a7d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb @@ -32,7 +32,10 @@ module Actions # A subsequent search request with the `pit` parameter must not specify `index`, `routing`, or `preference` values as these parameters are copied from the point in time. # Just like regular searches, you can use `from` and `size` to page through point in time search results, up to the first 10,000 hits. # If you want to retrieve more hits, use PIT with `search_after`. - # IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request. + # IMPORTANT: Each search request against a PIT returns in its response a `pit_id` field which may be different from the identifier you originally supplied. + # Always use the most recently-received PIT identifier for the next request. + # If you make concurrent search requests against the same PIT, Elasticsearch can return several different `pit_id` values in its responses. + # In that case, use any of these values for later requests, preferring more recently-received values whenever possible. # When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a `NoShardAvailableActionException` exception. # To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime. # **Keeping point in time alive** diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/project/tags.rb b/elasticsearch-api/lib/elasticsearch/api/actions/project/tags.rb index babfb906b..703b7b5e0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/project/tags.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/project/tags.rb @@ -62,7 +62,7 @@ def tags(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_project/tags' + path = '_project/tags' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb index 2f92c9b94..842061a9d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/scroll.rb @@ -72,7 +72,7 @@ def scroll(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_search/scroll' + path = '_search/scroll' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb index d85f87b5f..fa9302c71 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search.rb @@ -193,11 +193,11 @@ def search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _index - "#{Utils.listify(_index)}/_search" - else - '_search' - end + path = if _index + "#{Utils.listify(_index)}/_search" + else + '_search' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb index 28e6ff4c4..e53781aa7 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_application/search.rb @@ -71,7 +71,7 @@ def search(arguments = {}) Elasticsearch::API::HTTP_GET end - path = "_application/search_application/#{Utils.listify(_name)}/_search" + path = "_application/search_application/#{Utils.listify(_name)}/_search" params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb index 33e377f7a..d71d1430e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb @@ -22,7 +22,7 @@ module Elasticsearch module API module SearchableSnapshots module Actions - # Clear the cache. + # Clear the searchable snapshots shared cache. # Clear indices and data streams from the shared cache for partially mounted indices. # This functionality is experimental and is not ready for production usage. Experimental # features may change or be removed at any time. Elastic will work to fix any issues, but diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb index e3eeae10e..ec85d1864 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/create_service_token.rb @@ -24,6 +24,7 @@ module Security module Actions # Create a service account token. # Create a service accounts token for access without requiring basic authentication. + # This route serves both kinds of service account, but the privileges differ: `manage_service_account` authorizes tokens of built-in accounts in the `elastic` namespace only, and tokens of a user-managed account require `manage_security`. # NOTE: Service account tokens never expire. # You must actively delete them if they are no longer needed. # IMPORTANT: On Serverless, non-operator users can create tokens for only `elastic/fleet-server` and `elastic/fleet-server-remote`. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb index 25b8cdec3..90191359e 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_service_token.rb @@ -24,6 +24,7 @@ module Security module Actions # Delete service account tokens. # Delete service account tokens for a service in a specified namespace. + # This route serves both kinds of service account, but the privileges differ: `manage_service_account` authorizes tokens of built-in accounts in the `elastic` namespace only, and tokens of a user-managed account require `manage_security`. # IMPORTANT: On Serverless, non-operator users can delete tokens for only `elastic/fleet-server` and `elastic/fleet-server-remote`. # Deleting tokens for any other service account requires operator privileges. # diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user_managed_service_account.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user_managed_service_account.rb new file mode 100644 index 000000000..5caea565e --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/delete_user_managed_service_account.rb @@ -0,0 +1,87 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Security + module Actions + # Delete user-managed service accounts. + # Delete a service account from a namespace of your own. + # Deleting an account that still has service tokens is rejected unless `force` is `true`. + # A forced delete leaves the tokens behind: they cannot authenticate while no account of that name exists, and recreating the account is rejected until they are deleted. + # NOTE: The `elastic` namespace is reserved for the built-in service accounts that ship with Elasticsearch. + # A name that no user-managed service account could have is rejected rather than reported as not found. + # The `manage_service_account` privilege does not authorize this API. + # + # @option arguments [String] :namespace The namespace, which is a top-level grouping of service accounts. + # It must start with a letter or digit and can contain only letters, digits, hyphens, and underscores, up to a maximum of 128 characters. + # It cannot be `elastic`, which is reserved for built-in service accounts. (*Required*) + # @option arguments [String] :service The service name. + # It must start with a letter or digit and can contain only letters, digits, hyphens, and underscores, up to a maximum of 128 characters. (*Required*) + # @option arguments [String] :refresh If `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `true` then refresh the affected shards to make this operation visible to search, if `false` then do nothing with refreshes. Server default: wait_for. + # @option arguments [Boolean] :force If `false` (the default), deleting a service account that still has service tokens is rejected. + # If `true`, the account is deleted and its tokens are left in place. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-user-managed-service-account + # + def delete_user_managed_service_account(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.delete_user_managed_service_account' } + + defined_params = [:namespace, :service].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? + + raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] + raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + _namespace = arguments.delete(:namespace) + + _service = arguments.delete(:service) + + method = Elasticsearch::API::HTTP_DELETE + path = "_security/service/#{Utils.listify(_namespace)}/#{Utils.listify(_service)}" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb index fd35bb6ec..a4470f5b0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/get_service_accounts.rb @@ -24,13 +24,17 @@ module Security module Actions # Get service accounts. # Get a list of service accounts that match the provided path parameters. - # NOTE: Currently, only the `elastic/fleet-server` service account is available. + # Built-in service accounts ship with Elasticsearch in the `elastic` namespace; user-managed service accounts are created with the put user-managed service account API. + # NOTE: When `type` is omitted, a request without a namespace reports built-in accounts only, which preserves the response of a whole-cluster listing. + # A request scoped to a namespace reports both kinds, so an account you created is found without naming its kind. # # @option arguments [String] :namespace The name of the namespace. # Omit this parameter to retrieve information about all service accounts. # If you omit this parameter, you must also omit the `service` parameter. # @option arguments [String] :service The service name. # Omit this parameter to retrieve information about all service accounts that belong to the specified `namespace`. + # @option arguments [String, Array] :type A comma-separated list of the kinds of service account to return. + # If it is omitted, it defaults to `built_in` when no namespace is given and to `built_in,user_managed` otherwise. # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors # when they occur. # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user_managed_service_account.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user_managed_service_account.rb new file mode 100644 index 000000000..cfce900c6 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/put_user_managed_service_account.rb @@ -0,0 +1,87 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# This code was automatically generated from the Elasticsearch Specification +# See https://github.com/elastic/elasticsearch-specification +# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash. +module Elasticsearch + module API + module Security + module Actions + # Create user-managed service accounts. + # Create a service account in a namespace of your own, or replace one that already exists. + # A replacement is not a partial update: every write applies the defaults, so an account that was disabled and is then written again without `enabled` comes back enabled. + # Creating an account whose name still has leftover service tokens is rejected. + # Delete those tokens first. + # NOTE: The `elastic` namespace is reserved for the built-in service accounts that ship with Elasticsearch. + # The `manage_service_account` privilege does not authorize this API. + # + # @option arguments [String] :namespace The namespace, which is a top-level grouping of service accounts. + # It must start with a letter or digit and can contain only letters, digits, hyphens, and underscores, up to a maximum of 128 characters. + # It cannot be `elastic`, which is reserved for built-in service accounts. (*Required*) + # @option arguments [String] :service The service name. + # It must start with a letter or digit and can contain only letters, digits, hyphens, and underscores, up to a maximum of 128 characters. (*Required*) + # @option arguments [String] :refresh If `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `true` then refresh the affected shards to make this operation visible to search, if `false` then do nothing with refreshes. Server default: wait_for. + # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors + # when they occur. + # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response + # returned by Elasticsearch. + # @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans. + # For example `"exists_time": "1h"` for humans and + # `"exists_time_in_millis": 3600000` for computers. When disabled the human + # readable values will be omitted. This makes sense for responses being consumed + # only by machines. + # @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use + # this option for debugging only. + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body request body + # + # @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-put-user-managed-service-account + # + def put_user_managed_service_account(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'security.put_user_managed_service_account' } + + defined_params = [:namespace, :service].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? + + raise ArgumentError, "Required argument 'body' missing" unless arguments[:body] + raise ArgumentError, "Required argument 'namespace' missing" unless arguments[:namespace] + raise ArgumentError, "Required argument 'service' missing" unless arguments[:service] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _namespace = arguments.delete(:namespace) + + _service = arguments.delete(:service) + + method = Elasticsearch::API::HTTP_PUT + path = "_security/service/#{Utils.listify(_namespace)}/#{Utils.listify(_service)}" + params = Utils.process_params(arguments) + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb index 9b32583e3..6bc7fb181 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_api_keys.rb @@ -66,7 +66,7 @@ def query_api_keys(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_security/_query/api_key' + path = '_security/_query/api_key' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb index 5139b1897..dade407e1 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_role.rb @@ -59,7 +59,7 @@ def query_role(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_security/_query/role' + path = '_security/_query/role' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb index 113a347d9..19a791c7b 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/query_user.rb @@ -59,7 +59,7 @@ def query_user(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_security/_query/user' + path = '_security/_query/user' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb index cb732b070..599d036bb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb @@ -63,7 +63,7 @@ def suggest_user_profiles(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_security/profile/_suggest' + path = '_security/profile/_suggest' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb index be79f52e0..3ac9ad733 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/snapshot/delete.rb @@ -30,8 +30,10 @@ module Actions # @option arguments [Time] :master_timeout The period to wait for the master node. # If the master node is not available before the timeout expires, the request fails and returns an error. # To indicate that the request should never timeout, set it to `-1`. Server default: 30s. - # @option arguments [Boolean] :wait_for_completion If `true`, the request returns a response when the matching snapshots are all deleted. - # If `false`, the request returns a response as soon as the deletes are scheduled. Server default: true. + # @option arguments [Boolean] :wait_for_completion If `false`, the request returns a response as soon as the deletes are scheduled. + # If `true`, the request returns a response when the matching snapshots are all deleted, and the post-deletion cleanup work associated with the request has completed. + # If you make several requests to the delete-snapshots API targetting overlapping collections of snapshots then some of those requests may perform different parts of the associated post-deletion cleanup work, returning their responses at different times. + # For example, if you make two requests to delete the same snapshot then sometimes all of the post-deletion cleanup work will be associated with the first request, delaying its response, while the second request has no associated post-deletion cleanup work and receives its response as soon as the snapshot has been deleted. Server default: true. # @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors # when they occur. # @option arguments [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb index 0862ea63f..870993862 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/transform/preview_transform.rb @@ -69,11 +69,11 @@ def preview_transform(arguments = {}) Elasticsearch::API::HTTP_GET end - path = if _transform_id - "_transform/#{Utils.listify(_transform_id)}/_preview" - else - '_transform/_preview' - end + path = if _transform_id + "_transform/#{Utils.listify(_transform_id)}/_preview" + else + '_transform/_preview' + end params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb index eba3e8072..bf6f24353 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/watcher/query_watches.rb @@ -56,7 +56,7 @@ def query_watches(arguments = {}) Elasticsearch::API::HTTP_GET end - path = '_watcher/_query/watches' + path = '_watcher/_query/watches' params = Utils.process_params(arguments) Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index 257f44fa7..e98ca88fb 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -18,6 +18,6 @@ module Elasticsearch module API VERSION = '9.5.0'.freeze - ES_SPECIFICATION_COMMIT = '09e94fcf143964734d69ad0c99eb19dd1bad6460'.freeze + ES_SPECIFICATION_COMMIT = 'ab461b6496b27f5e02320e6b856846cad1204e34'.freeze end end