Skip to content

Commit a766d14

Browse files
committed
[DOCS] Autogenerated code
Extends API source code docs based on specification API changes: * `create` - Adds [Integer, String] parameter `:wait_for_active_shards`: The number of shard copies that must be active before proceeding with the operation. Set to +all+ or any positive integer up to the total number of shards in the index (+number_of_replicas+1+). Server default: 1. * `field_caps` - Adds boolean parameter `:include_empty_fields`: If false, empty fields are not included in the response. Server default: true. * `get`, `mget`, `search` - Add boolean parameter `:force_synthetic_source`: Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. * `ml.get_trained_models` - Adds [String, Array] parameter `:model_id`: The unique identifier of the trained model or a model alias. You can get information for multiple trained models in a single API request by using a comma-separated list of model IDs or a wildcard expression. * `ml.put_calendar_job` Adds [String, Array] parameter `:job_id`: An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a comma-separated list of jobs or groups. (*Required*) * `ml.put_trained_model` - Adds boolean parameter `:wait_for_completion`: Whether to wait for all child operations (e.g. model download) to complete. * `search_application.search` - Adds boolean parameter `:typed_keys`: Determines whether aggregation names are prefixed by their respective types in the response. * `security.get_api_key` - Adds boolean parameter `:active_only` A boolean flag that can be used to query API keys that are currently active. An API key is considered active if it is neither invalidated, nor expired at query time. You can specify this together with other parameters such as `owner` or `name`. If `active_only` is false, the response will include both active and inactive (expired or invalidated) keys. Adds boolean parameter `:with_profile_uid`: Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists. * `security.query_api_keys` - Adds boolean parameter `:with_profile_uid`: Determines whether to also retrieve the profile uid, for the API key owner principal, if it exists. Adds boolean parameter `:typed_keys`: Determines whether aggregation names are prefixed by their respective types in the response.
1 parent 9f07499 commit a766d14

File tree

147 files changed

+452
-130
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+452
-130
lines changed

lib/elasticsearch-serverless/api/async_search/delete.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ module ElasticsearchServerless
2222
module API
2323
module AsyncSearch
2424
module Actions
25-
# Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
25+
# Deletes an async search by identifier.
26+
# If the search is still running, the search request will be cancelled.
27+
# Otherwise, the saved search results are deleted.
28+
# If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the `cancel_task` cluster privilege.
2629
#
2730
# @option arguments [String] :id A unique identifier for the async search. (*Required*)
2831
# @option arguments [Hash] :headers Custom HTTP headers

lib/elasticsearch-serverless/api/async_search/get.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ module ElasticsearchServerless
2222
module API
2323
module AsyncSearch
2424
module Actions
25-
# Retrieves the results of a previously submitted async search request given its ID.
25+
# Retrieves the results of a previously submitted async search request given its identifier.
26+
# If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
2627
#
2728
# @option arguments [String] :id A unique identifier for the async search. (*Required*)
2829
# @option arguments [Time] :keep_alive Specifies how long the async search should be available in the cluster. When not specified, the +keep_alive+ set with the corresponding submit async request will be used. Otherwise, it is possible to override the value and extend the validity of the request. When this period expires, the search, if still running, is cancelled. If the search is completed, its saved results are deleted.

lib/elasticsearch-serverless/api/async_search/status.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ module ElasticsearchServerless
2222
module API
2323
module AsyncSearch
2424
module Actions
25-
# Retrieves the status of a previously submitted async search request given its ID.
25+
# Get async search status
26+
# Retrieves the status of a previously submitted async search request given its identifier, without retrieving search results.
27+
# If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
2628
#
2729
# @option arguments [String] :id A unique identifier for the async search. (*Required*)
2830
# @option arguments [Hash] :headers Custom HTTP headers

lib/elasticsearch-serverless/api/async_search/submit.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ module ElasticsearchServerless
2222
module API
2323
module AsyncSearch
2424
module Actions
25-
# Executes a search request asynchronously.
25+
# Runs a search request asynchronously.
26+
# When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field, hence partial results become available following the sort criteria that was requested.
27+
# Warning: Async search does not support scroll nor search requests that only include the suggest section.
28+
# By default, Elasticsearch doesn’t allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
29+
# The maximum allowed size for a stored async search response can be set by changing the `search.max_async_search_response_size` cluster level setting.
2630
#
2731
# @option arguments [String, Array] :index A comma-separated list of index names to search; use +_all+ or empty string to perform the operation on all indices
2832
# @option arguments [Time] :wait_for_completion_timeout Blocks and waits until the search is completed up to a certain timeout. When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster. Server default: 1s.

lib/elasticsearch-serverless/api/bulk.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
module ElasticsearchServerless
2222
module API
2323
module Actions
24-
# Allows to perform multiple index/update/delete operations in a single request.
24+
# Performs multiple indexing or delete operations in a single API call.
25+
# This reduces overhead and can greatly increase indexing speed.
2526
#
2627
# @option arguments [String] :index Name of the data stream, index, or index alias to perform bulk actions on.
2728
# @option arguments [String] :pipeline ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to +_none+ disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter.

lib/elasticsearch-serverless/api/cat/aliases.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ module ElasticsearchServerless
2222
module API
2323
module Cat
2424
module Actions
25-
# Shows information about currently configured aliases to indices including filter and routing infos.
25+
# Retrieves the cluster’s index aliases, including filter and routing information.
26+
# The API does not return data stream aliases.
27+
# 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.
2628
#
2729
# @option arguments [String, Array<String>] :name A comma-separated list of aliases to retrieve. Supports wildcards (+*+). To retrieve all aliases, omit this parameter or use +*+ or +_all+.
2830
# @option arguments [String, Array<String>] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both.

lib/elasticsearch-serverless/api/cat/component_templates.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ module ElasticsearchServerless
2222
module API
2323
module Cat
2424
module Actions
25-
# Returns information about existing component_templates templates.
25+
# Returns information about component templates in a cluster.
26+
# Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
27+
# IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.
28+
# They are not intended for use by applications. For application consumption, use the get component template API.
2629
#
2730
# @option arguments [String] :name The name of the component template. Accepts wildcard expressions. If omitted, all component templates are returned.
2831
# @option arguments [String] :format Specifies the format to return the columnar data in, can be set to +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.

lib/elasticsearch-serverless/api/cat/count.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ module ElasticsearchServerless
2222
module API
2323
module Cat
2424
module Actions
25-
# Provides quick access to the document count of the entire cluster, or individual indices.
25+
# Provides quick access to a document count for a data stream, an index, or an entire cluster.
26+
# NOTE: The document count only includes live documents, not deleted documents which have not yet been removed by the merge process.
27+
# IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.
28+
# They are not intended for use by applications. For application consumption, use the count API.
2629
#
2730
# @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+.
2831
# @option arguments [String] :format Specifies the format to return the columnar data in, can be set to +text+, +json+, +cbor+, +yaml+, or +smile+. Server default: text.

lib/elasticsearch-serverless/api/cat/indices.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ module ElasticsearchServerless
2222
module API
2323
module Cat
2424
module Actions
25-
# Returns information about indices: number of primaries and replicas, document counts, disk size, ...
25+
# Returns high-level information about indices in a cluster, including backing indices for data streams.
26+
# IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console.
27+
# They are not intended for use by applications. For application consumption, use the get index API.
28+
# Use the cat indices API to get the following information for each index in a cluster: shard count; document count; deleted document count; primary store size; total store size of all shards, including shard replicas.
29+
# These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents.
30+
# To get an accurate count of Elasticsearch documents, use the cat count or count APIs.
2631
#
2732
# @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+.
2833
# @option arguments [String] :bytes The unit used to display byte values.

lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ module ElasticsearchServerless
2222
module API
2323
module Cat
2424
module Actions
25-
# Gets configuration and usage information about data frame analytics jobs.
25+
# Returns configuration and usage information about data frame analytics jobs.
26+
#
27+
# IMPORTANT: cat APIs are only intended for human consumption using the Kibana
28+
# console or command line. They are not intended for use by applications. For
29+
# application consumption, use the get data frame analytics jobs statistics API.
2630
#
2731
# @option arguments [String] :id The ID of the data frame analytics to fetch
2832
# @option arguments [Boolean] :allow_no_match Whether to ignore if a wildcard expression matches no configs. (This includes +_all+ string or when no configs have been specified)

lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ module ElasticsearchServerless
2222
module API
2323
module Cat
2424
module Actions
25-
# Gets configuration and usage information about datafeeds.
25+
# Returns configuration and usage information about datafeeds.
26+
# This API returns a maximum of 10,000 datafeeds.
27+
# If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage`
28+
# cluster privileges to use this API.
29+
#
30+
# IMPORTANT: cat APIs are only intended for human consumption using the Kibana
31+
# console or command line. They are not intended for use by applications. For
32+
# application consumption, use the get datafeed statistics API.
2633
#
2734
# @option arguments [String] :datafeed_id A numerical character string that uniquely identifies the datafeed.
2835
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: * Contains wildcard expressions and there are no datafeeds that match. * Contains the +_all+ string or no identifiers and there are no matches. * Contains wildcard expressions and there are only partial matches. If +true+, the API returns an empty datafeeds array when there are no matches and the subset of results when there are partial matches. If +false+, the API returns a 404 status code when there are no matches or only partial matches. Server default: true.

lib/elasticsearch-serverless/api/cat/ml_jobs.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ module ElasticsearchServerless
2222
module API
2323
module Cat
2424
module Actions
25-
# Gets configuration and usage information about anomaly detection jobs.
25+
# Returns configuration and usage information for anomaly detection jobs.
26+
# This API returns a maximum of 10,000 jobs.
27+
# If the Elasticsearch security features are enabled, you must have `monitor_ml`,
28+
# `monitor`, `manage_ml`, or `manage` cluster privileges to use this API.
29+
#
30+
# IMPORTANT: cat APIs are only intended for human consumption using the Kibana
31+
# console or command line. They are not intended for use by applications. For
32+
# application consumption, use the get anomaly detection job statistics API.
2633
#
2734
# @option arguments [String] :job_id Identifier for the anomaly detection job.
2835
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: * Contains wildcard expressions and there are no jobs that match. * Contains the +_all+ string or no identifiers and there are no matches. * Contains wildcard expressions and there are only partial matches. If +true+, the API returns an empty jobs array when there are no matches and the subset of results when there are partial matches. If +false+, the API returns a 404 status code when there are no matches or only partial matches. Server default: true.

lib/elasticsearch-serverless/api/cat/ml_trained_models.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ module ElasticsearchServerless
2222
module API
2323
module Cat
2424
module Actions
25-
# Gets configuration and usage information about inference trained models.
25+
# Returns configuration and usage information about inference trained models.
26+
#
27+
# IMPORTANT: cat APIs are only intended for human consumption using the Kibana
28+
# console or command line. They are not intended for use by applications. For
29+
# application consumption, use the get trained models statistics API.
2630
#
2731
# @option arguments [String] :model_id A unique identifier for the trained model.
2832
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no models that match; contains the +_all+ string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches. If +true+, the API returns an empty array when there are no matches and the subset of results when there are partial matches. If +false+, the API returns a 404 status code when there are no matches or only partial matches. Server default: true.

lib/elasticsearch-serverless/api/cat/transforms.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ module ElasticsearchServerless
2222
module API
2323
module Cat
2424
module Actions
25-
# Gets configuration and usage information about transforms.
25+
# Returns configuration and usage information about transforms.
26+
#
27+
# IMPORTANT: cat APIs are only intended for human consumption using the Kibana
28+
# console or command line. They are not intended for use by applications. For
29+
# application consumption, use the get transform statistics API.
2630
#
2731
# @option arguments [String] :transform_id A transform identifier or a wildcard expression. If you do not specify one of these options, the API returns information for all transforms.
2832
# @option arguments [Boolean] :allow_no_match Specifies what to do when the request: contains wildcard expressions and there are no transforms that match; contains the +_all+ string or no identifiers and there are no matches; contains wildcard expressions and there are only partial matches. If +true+, it returns an empty transforms array when there are no matches and the subset of results when there are partial matches. If +false+, the request returns a 404 status code when there are no matches or only partial matches. Server default: true.

lib/elasticsearch-serverless/api/clear_scroll.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
module ElasticsearchServerless
2222
module API
2323
module Actions
24-
# Explicitly clears the search context for a scroll.
24+
# Clears the search context and results for a scrolling search.
2525
#
2626
# @option arguments [String, Array] :scroll_id Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use +_all+.
2727
# @option arguments [Hash] :headers Custom HTTP headers

lib/elasticsearch-serverless/api/close_point_in_time.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
module ElasticsearchServerless
2222
module API
2323
module Actions
24-
# Close a point in time
24+
# Closes a point-in-time.
2525
#
2626
# @option arguments [Hash] :headers Custom HTTP headers
2727
# @option arguments [Hash] :body request body

lib/elasticsearch-serverless/api/cluster/delete_component_template.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ module ElasticsearchServerless
2222
module API
2323
module Cluster
2424
module Actions
25-
# Deletes a component template
25+
# Deletes component templates.
26+
# Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
2627
#
2728
# @option arguments [String, Array<String>] :name Comma-separated list or wildcard expression of component template names used to limit the request. (*Required*)
2829
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.

lib/elasticsearch-serverless/api/cluster/get_component_template.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module ElasticsearchServerless
2222
module API
2323
module Cluster
2424
module Actions
25-
# Returns one or more component templates
25+
# Retrieves information about component templates.
2626
#
2727
# @option arguments [String] :name Comma-separated list of component template names used to limit the request. Wildcard (+*+) expressions are supported.
2828
# @option arguments [Boolean] :flat_settings If +true+, returns settings in flat format.

lib/elasticsearch-serverless/api/cluster/put_component_template.rb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,21 @@ module ElasticsearchServerless
2222
module API
2323
module Cluster
2424
module Actions
25-
# Creates or updates a component template
25+
# Creates or updates a component template.
26+
# Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
27+
#
28+
# An index template can be composed of multiple component templates.
29+
# To use a component template, specify it in an index template’s `composed_of` list.
30+
# Component templates are only applied to new data streams and indices as part of a matching index template.
31+
#
32+
# Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template.
33+
#
34+
# Component templates are only used during index creation.
35+
# For data streams, this includes data stream creation and the creation of a stream’s backing indices.
36+
# Changes to component templates do not affect existing indices, including a stream’s backing indices.
37+
#
38+
# You can use C-style `/* *\/` block comments in component templates.
39+
# You can include comments anywhere in the request body except before the opening curly bracket.
2640
#
2741
# @option arguments [String] :name Name of the component template to create. Elasticsearch includes the following built-in component templates: +logs-mappings+; 'logs-settings+; +metrics-mappings+; +metrics-settings+;+synthetics-mapping+; +synthetics-settings+. Elastic Agent uses these templates to configure backing indices for its data streams. If you use Elastic Agent and want to overwrite one of these templates, set the +version+ for your replacement template higher than the current version. If you don’t use Elastic Agent and want to disable all built-in component and index templates, set +stack.templates.enabled+ to +false+ using the cluster update settings API. (*Required*)
2842
# @option arguments [Boolean] :create If +true+, this request cannot replace or update existing component templates.

lib/elasticsearch-serverless/api/create.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
module ElasticsearchServerless
2222
module API
2323
module Actions
24-
# Creates a new document in the index.
25-
#
26-
# Returns a 409 response when a document with a same ID already exists in the index.
24+
# Adds a JSON document to the specified data stream or index and makes it searchable.
25+
# If the target is an index and the document already exists, the request updates the document and increments its version.
2726
#
2827
# @option arguments [String] :id Unique identifier for the document. (*Required*)
2928
# @option arguments [String] :index Name of the data stream or index to target. If the target doesn’t exist and matches the name or wildcard (+*+) pattern of an index template with a +data_stream+ definition, this request creates the data stream. If the target doesn’t exist and doesn’t match a data stream template, this request creates the index. (*Required*)

0 commit comments

Comments
 (0)