diff --git a/elasticsearch-api/lib/elasticsearch/api.rb b/elasticsearch-api/lib/elasticsearch/api.rb index eddd6bcd1a..c689953394 100644 --- a/elasticsearch-api/lib/elasticsearch/api.rb +++ b/elasticsearch-api/lib/elasticsearch/api.rb @@ -80,6 +80,7 @@ def perform_request(method, path, params = {}, body = nil, headers = nil, reques :snapshot, :sql, :ssl, + :streams, :synonyms, :tasks, :text_structure, diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb index 7a21c8179b..b74c840bd4 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/esql/async_query_get.rb @@ -31,6 +31,7 @@ module Actions # A query ID is also provided when the request was submitted with the `keep_on_completion` parameter set to `true`. (*Required*) # @option arguments [Boolean] :drop_null_columns Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results. # If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns. + # @option arguments [String] :format A short version of the Accept header, for example `json` or `yaml`. # @option arguments [Time] :keep_alive The period for which the query and its results are stored in the cluster. # When this period expires, the query and its results are deleted, even if the query is still ongoing. # @option arguments [Time] :wait_for_completion_timeout The period to wait for the request to finish. diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb index 71cfb8c988..fe2b4b3410 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/search_mvt.rb @@ -30,54 +30,6 @@ module Actions # * A `geotile_grid` or `geohex_grid` aggregation on the ``. The `grid_agg` parameter determines the aggregation type. The aggregation uses the `//` tile as a bounding box. # * Optionally, a `geo_bounds` aggregation on the ``. The search only includes this aggregation if the `exact_bounds` parameter is `true`. # * If the optional parameter `with_labels` is `true`, the internal search will include a dynamic runtime field that calls the `getLabelPosition` function of the geometry doc value. This enables the generation of new point features containing suggested geometry labels, so that, for example, multi-polygons will have only one label. - # For example, Elasticsearch may translate a vector tile search API request with a `grid_agg` argument of `geotile` and an `exact_bounds` argument of `true` into the following search - # - # ``` - # GET my-index/_search - # { - # "size": 10000, - # "query": { - # "geo_bounding_box": { - # "my-geo-field": { - # "top_left": { - # "lat": -40.979898069620134, - # "lon": -45 - # }, - # "bottom_right": { - # "lat": -66.51326044311186, - # "lon": 0 - # } - # } - # } - # }, - # "aggregations": { - # "grid": { - # "geotile_grid": { - # "field": "my-geo-field", - # "precision": 11, - # "size": 65536, - # "bounds": { - # "top_left": { - # "lat": -40.979898069620134, - # "lon": -45 - # }, - # "bottom_right": { - # "lat": -66.51326044311186, - # "lon": 0 - # } - # } - # } - # }, - # "bounds": { - # "geo_bounds": { - # "field": "my-geo-field", - # "wrap_longitude": false - # } - # } - # } - # } - # ``` - # # The API returns results as a binary Mapbox vector tile. # Mapbox vector tiles are encoded as Google Protobufs (PBF). By default, the tile contains three layers: # * A `hits` layer containing a feature for each `` value matching the `geo_bounding_box` query. @@ -142,6 +94,7 @@ module Actions # Some cells may intersect more than one vector tile. # To compute the H3 resolution for each precision, Elasticsearch compares the average density of hexagonal bins at each resolution with the average density of tile bins at each zoom level. # Elasticsearch uses the H3 resolution that is closest to the corresponding geotile density. + # Learn how to use the vector tile search API with practical examples in the {https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search Vector tile search examples} guide. # # @option arguments [String, Array] :index Comma-separated list of data streams, indices, or aliases to search (*Required*) # @option arguments [String] :field Field containing geospatial data to return (*Required*) 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 507bf7eecd..9b32583e32 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 @@ -28,6 +28,7 @@ module Actions # To use this API, you must have at least the `manage_own_api_key` or the `read_security` cluster privileges. # If you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own. # If you have the `read_security`, `manage_api_key`, or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership. + # Refer to the linked documentation for examples of how to find API keys: # # @option arguments [Boolean] :with_limited_by Return the snapshot of the owner user's role descriptors associated with the API key. # An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it). diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/streams/logs_disable.rb b/elasticsearch-api/lib/elasticsearch/api/actions/streams/logs_disable.rb new file mode 100644 index 0000000000..6c1d312257 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/streams/logs_disable.rb @@ -0,0 +1,50 @@ +# 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 Streams + module Actions + # Disable the Logs Streams feature for this cluster + # + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-disable.html + # + def logs_disable(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'streams.logs_disable' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_POST + path = '_streams/logs/_disable' + params = {} + + 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/streams/logs_enable.rb b/elasticsearch-api/lib/elasticsearch/api/actions/streams/logs_enable.rb new file mode 100644 index 0000000000..b5863eb80d --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/streams/logs_enable.rb @@ -0,0 +1,50 @@ +# 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 Streams + module Actions + # Enable the Logs Streams feature for this cluster + # + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-logs-enable.html + # + def logs_enable(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'streams.logs_enable' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_POST + path = '_streams/logs/_enable' + params = {} + + 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/streams/status.rb b/elasticsearch-api/lib/elasticsearch/api/actions/streams/status.rb new file mode 100644 index 0000000000..45f8d28c12 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/streams/status.rb @@ -0,0 +1,50 @@ +# 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 Streams + module Actions + # Return the current status of the streams feature for each streams type + # + # @option arguments [Hash] :headers Custom HTTP headers + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/streams-status.html + # + def status(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'streams.status' } + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = nil + + method = Elasticsearch::API::HTTP_GET + path = '_streams/status' + params = {} + + 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/version.rb b/elasticsearch-api/lib/elasticsearch/api/version.rb index ce4ac60bd6..aa75ce46e5 100644 --- a/elasticsearch-api/lib/elasticsearch/api/version.rb +++ b/elasticsearch-api/lib/elasticsearch/api/version.rb @@ -17,7 +17,7 @@ module Elasticsearch module API - VERSION = '9.0.0'.freeze - ES_SPECIFICATION_COMMIT = '09ebf27a057301e6f26581259d3c1d105074bdfd'.freeze + VERSION = '9.1.0'.freeze + ES_SPECIFICATION_COMMIT = 'cd2d1fba07d3224129ca5a8d6018d86f67004fdf'.freeze end end diff --git a/elasticsearch-api/spec/unit/actions/streams/logs_disable_spec.rb b/elasticsearch-api/spec/unit/actions/streams/logs_disable_spec.rb new file mode 100644 index 0000000000..c802267b5f --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/streams/logs_disable_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.streams#logs_disable' do + let(:expected_args) do + [ + 'POST', + '_streams/logs/_disable', + {}, + nil, + {}, + { endpoint: 'streams.logs_disable' } + ] + end + + it 'performs the request' do + expect(client_double.streams.logs_disable).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/streams/logs_enable_spec.rb b/elasticsearch-api/spec/unit/actions/streams/logs_enable_spec.rb new file mode 100644 index 0000000000..ad4aa3f5aa --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/streams/logs_enable_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.streams#logs_enable' do + let(:expected_args) do + [ + 'POST', + '_streams/logs/_enable', + {}, + nil, + {}, + { endpoint: 'streams.logs_enable' } + ] + end + + it 'performs the request' do + expect(client_double.streams.logs_enable).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/actions/streams/status_spec.rb b/elasticsearch-api/spec/unit/actions/streams/status_spec.rb new file mode 100644 index 0000000000..def22a386c --- /dev/null +++ b/elasticsearch-api/spec/unit/actions/streams/status_spec.rb @@ -0,0 +1,35 @@ +# 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. + +require 'spec_helper' + +describe 'client.streams#status' do + let(:expected_args) do + [ + 'GET', + '_streams/status', + {}, + nil, + {}, + { endpoint: 'streams.status' } + ] + end + + it 'performs the request' do + expect(client_double.streams.status).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/unit/perform_request_spec.rb b/elasticsearch-api/spec/unit/perform_request_spec.rb index 8f75ea482b..a94e74ff14 100644 --- a/elasticsearch-api/spec/unit/perform_request_spec.rb +++ b/elasticsearch-api/spec/unit/perform_request_spec.rb @@ -29,7 +29,7 @@ spec.module_namespace.flatten.first == 'rollup' || [ 'scroll', 'clear_scroll', 'connector.last_sync', 'knn_search', - 'indices.put_data_stream_settings', 'indices.get_data_stream_settings' + 'indices.remove_block' ].include?(spec.endpoint_name) # These are the path parts defined by the user in the method argument diff --git a/elasticsearch/elasticsearch.gemspec b/elasticsearch/elasticsearch.gemspec index 563638b546..5a6ec04555 100644 --- a/elasticsearch/elasticsearch.gemspec +++ b/elasticsearch/elasticsearch.gemspec @@ -46,7 +46,7 @@ Gem::Specification.new do |s| s.rdoc_options = ['--charset=UTF-8'] s.required_ruby_version = '>= 2.6' # For compatibility with JRuby 9.3 - s.add_dependency 'elasticsearch-api', '9.0.0' + s.add_dependency 'elasticsearch-api', '9.1.0' s.add_dependency 'elastic-transport', '~> 8.3' s.add_development_dependency 'base64' diff --git a/elasticsearch/lib/elasticsearch/version.rb b/elasticsearch/lib/elasticsearch/version.rb index 33758a0941..5df6963a01 100644 --- a/elasticsearch/lib/elasticsearch/version.rb +++ b/elasticsearch/lib/elasticsearch/version.rb @@ -16,5 +16,5 @@ # under the License. module Elasticsearch - VERSION = '9.0.0'.freeze + VERSION = '9.1.0'.freeze end