From 960dff37f266d64b197298cc80250b68eac7c62f Mon Sep 17 00:00:00 2001 From: Josh Mock Date: Tue, 27 Jun 2023 11:51:11 -0500 Subject: [PATCH] Generate docstrings and better API reference docs (#1922) --- docs/reference.asciidoc | 5794 +++++++++++++++++++-- src/api/api/async_search.ts | 16 + src/api/api/autoscaling.ts | 16 + src/api/api/bulk.ts | 4 + src/api/api/cat.ts | 105 + src/api/api/ccr.ts | 52 + src/api/api/clear_scroll.ts | 4 + src/api/api/close_point_in_time.ts | 4 + src/api/api/cluster.ts | 87 + src/api/api/count.ts | 4 + src/api/api/create.ts | 6 + src/api/api/dangling_indices.ts | 12 + src/api/api/delete.ts | 4 + src/api/api/delete_by_query.ts | 4 + src/api/api/delete_by_query_rethrottle.ts | 4 + src/api/api/delete_script.ts | 4 + src/api/api/enrich.ts | 20 + src/api/api/eql.ts | 16 + src/api/api/exists.ts | 4 + src/api/api/exists_source.ts | 4 + src/api/api/explain.ts | 4 + src/api/api/features.ts | 8 + src/api/api/field_caps.ts | 4 + src/api/api/fleet.ts | 10 + src/api/api/get.ts | 4 + src/api/api/get_script.ts | 4 + src/api/api/get_script_context.ts | 4 + src/api/api/get_script_languages.ts | 4 + src/api/api/get_source.ts | 4 + src/api/api/graph.ts | 4 + src/api/api/health_report.ts | 4 + src/api/api/ilm.ts | 44 + src/api/api/index.ts | 4 + src/api/api/indices.ts | 324 +- src/api/api/info.ts | 4 + src/api/api/ingest.ts | 24 + src/api/api/knn_search.ts | 4 + src/api/api/license.ts | 28 + src/api/api/logstash.ts | 12 + src/api/api/mget.ts | 4 + src/api/api/migration.ts | 12 + src/api/api/ml.ts | 292 ++ src/api/api/monitoring.ts | 4 + src/api/api/msearch.ts | 4 + src/api/api/msearch_template.ts | 4 + src/api/api/mtermvectors.ts | 4 + src/api/api/nodes.ts | 28 + src/api/api/open_point_in_time.ts | 4 + src/api/api/ping.ts | 4 + src/api/api/put_script.ts | 4 + src/api/api/rank_eval.ts | 4 + src/api/api/reindex.ts | 6 + src/api/api/reindex_rethrottle.ts | 4 + src/api/api/render_search_template.ts | 4 + src/api/api/rollup.ts | 32 + src/api/api/scripts_painless_execute.ts | 4 + src/api/api/scroll.ts | 4 + src/api/api/search.ts | 6 +- src/api/api/search_application.ts | 93 +- src/api/api/search_mvt.ts | 4 + src/api/api/search_shards.ts | 4 + src/api/api/search_template.ts | 4 + src/api/api/searchable_snapshots.ts | 16 + src/api/api/security.ts | 272 + src/api/api/shutdown.ts | 12 + src/api/api/slm.ts | 36 + src/api/api/snapshot.ts | 48 + src/api/api/sql.ts | 24 + src/api/api/ssl.ts | 4 + src/api/api/synonyms.ts | 123 + src/api/api/tasks.ts | 12 + src/api/api/terms_enum.ts | 4 + src/api/api/termvectors.ts | 4 + src/api/api/text_structure.ts | 4 + src/api/api/transform.ts | 44 + src/api/api/update.ts | 4 + src/api/api/update_by_query.ts | 5 + src/api/api/update_by_query_rethrottle.ts | 4 + src/api/api/watcher.ts | 96 + src/api/api/xpack.ts | 8 + src/api/index.ts | 8 + src/api/types.ts | 174 +- src/api/typesWithBodyKey.ts | 177 +- 83 files changed, 7779 insertions(+), 495 deletions(-) create mode 100644 src/api/api/synonyms.ts diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 240a4fa72..19ffd139a 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -32,8 +32,22 @@ Allows to perform multiple index/update/delete operations in a single request. {ref}/docs-bulk.html[Endpoint documentation] [source,ts] ---- -client.bulk(...) +client.bulk({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string)*: Default index for items which don't provide one +** *`pipeline` (Optional, string)*: The pipeline id to preprocess incoming documents with +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. +** *`routing` (Optional, string)*: Specific routing value +** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request +** *`_source_excludes` (Optional, string | string[])*: Default list of fields to exclude from the returned _source field, can be overridden on each sub-request +** *`_source_includes` (Optional, string | string[])*: Default list of fields to extract and return from the _source field, can be overridden on each sub-request +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) +** *`require_alias` (Optional, boolean)*: Sets require_alias for all incoming documents. Defaults to unset (false) [discrete] === clear_scroll @@ -42,8 +56,13 @@ Explicitly clears the search context for a scroll. {ref}/clear-scroll-api.html[Endpoint documentation] [source,ts] ---- -client.clearScroll(...) +client.clearScroll({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`scroll_id` (Optional, string | string[])*: A list of scroll IDs to clear [discrete] === close_point_in_time @@ -52,8 +71,13 @@ Close a point in time {ref}/point-in-time-api.html[Endpoint documentation] [source,ts] ---- -client.closePointInTime(...) +client.closePointInTime({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)* [discrete] === count @@ -62,8 +86,28 @@ Returns number of documents matching a query. {ref}/search-count.html[Endpoint documentation] [source,ts] ---- -client.count(...) +client.count({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of indices to restrict the results +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`analyzer` (Optional, string)*: The analyzer to use for the query string +** *`analyze_wildcard` (Optional, boolean)*: Specify whether wildcard and prefix queries should be analyzed (default: false) +** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query (AND or OR) +** *`df` (Optional, string)*: The field to use as default where no field prefix is given in the query string +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_throttled` (Optional, boolean)*: Whether specified concrete, expanded or aliased indices should be ignored when throttled +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +** *`min_score` (Optional, number)*: Include only documents with a specific `_score` value in the result +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`routing` (Optional, string)*: A list of specific routing values +** *`terminate_after` (Optional, number)*: The maximum count for each shard, upon reaching which the query execution will terminate early +** *`q` (Optional, string)*: Query in the Lucene query string syntax +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* [discrete] === create @@ -74,8 +118,21 @@ Returns a 409 response when a document with a same ID already exists in the inde {ref}/docs-index_.html[Endpoint documentation] [source,ts] ---- -client.create(...) +client.create({ id, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Document ID +** *`index` (string)*: The name of the index +** *`pipeline` (Optional, string)*: The pipeline id to preprocess incoming documents with +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. +** *`routing` (Optional, string)*: Specific routing value +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`version` (Optional, number)*: Explicit version number for concurrency control +** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) [discrete] === delete @@ -84,8 +141,22 @@ Removes a document from the index. {ref}/docs-delete.html[Endpoint documentation] [source,ts] ---- -client.delete(...) +client.delete({ id, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The document ID +** *`index` (string)*: The name of the index +** *`if_primary_term` (Optional, number)*: only perform the delete operation if the last operation that has changed the document has the specified primary term +** *`if_seq_no` (Optional, number)*: only perform the delete operation if the last operation that has changed the document has the specified sequence number +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. +** *`routing` (Optional, string)*: Specific routing value +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`version` (Optional, number)*: Explicit version number for concurrency control +** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) [discrete] === delete_by_query @@ -94,8 +165,44 @@ Deletes documents matching the provided query. {ref}/docs-delete-by-query.html[Endpoint documentation] [source,ts] ---- -client.deleteByQuery(...) +client.deleteByQuery({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names to search; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`analyzer` (Optional, string)*: The analyzer to use for the query string +** *`analyze_wildcard` (Optional, boolean)*: Specify whether wildcard and prefix queries should be analyzed (default: false) +** *`conflicts` (Optional, Enum("abort" | "proceed"))*: What to do when the delete by query hits version conflicts? +** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query (AND or OR) +** *`df` (Optional, string)*: The field to use as default where no field prefix is given in the query string +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`from` (Optional, number)*: Starting offset (default: 0) +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +** *`max_docs` (Optional, number)*: Maximum number of documents to process (default: all documents) +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`refresh` (Optional, boolean)*: Should the affected indexes be refreshed? +** *`request_cache` (Optional, boolean)*: Specify if request cache should be used for this request or not, defaults to index level setting +** *`requests_per_second` (Optional, float)*: The throttle for this request in sub-requests per second. -1 means no throttle. +** *`routing` (Optional, string)*: A list of specific routing values +** *`q` (Optional, string)*: Query in the Lucene query string syntax +** *`scroll` (Optional, string | -1 | 0)*: Specify how long a consistent view of the index should be maintained for scrolled search +** *`scroll_size` (Optional, number)*: Size on the scroll request powering the delete by query +** *`search_timeout` (Optional, string | -1 | 0)*: Explicit timeout for each search request. Defaults to no timeout. +** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Search operation type +** *`slices` (Optional, number | Enum("auto"))*: The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`. +** *`sort` (Optional, string[])*: A list of : pairs +** *`stats` (Optional, string[])*: Specific 'tag' of the request for logging and statistical purposes +** *`terminate_after` (Optional, number)*: The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +** *`timeout` (Optional, string | -1 | 0)*: Time each individual bulk request should wait for shards that are unavailable. +** *`version` (Optional, boolean)*: Specify whether to return document version as part of a hit +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) +** *`wait_for_completion` (Optional, boolean)*: Should the request should block until the delete by query is complete. +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* +** *`slice` (Optional, { field, id, max })* [discrete] === delete_by_query_rethrottle @@ -104,8 +211,14 @@ Changes the number of requests per second for a particular Delete By Query opera {ref}/docs-delete-by-query.html[Endpoint documentation] [source,ts] ---- -client.deleteByQueryRethrottle(...) +client.deleteByQueryRethrottle({ task_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`task_id` (string | number)*: The task id to rethrottle +** *`requests_per_second` (Optional, float)*: The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. [discrete] === delete_script @@ -114,8 +227,15 @@ Deletes a script. {ref}/modules-scripting.html[Endpoint documentation] [source,ts] ---- -client.deleteScript(...) +client.deleteScript({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Script ID +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout [discrete] === exists @@ -124,8 +244,24 @@ Returns information about whether a document exists in an index. {ref}/docs-get.html[Endpoint documentation] [source,ts] ---- -client.exists(...) +client.exists({ id, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The document ID +** *`index` (string)*: The name of the index +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`realtime` (Optional, boolean)*: Specify whether to perform the operation in realtime or search mode +** *`refresh` (Optional, boolean)*: Refresh the shard containing the document before performing the operation +** *`routing` (Optional, string)*: Specific routing value +** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or a list of fields to return +** *`_source_excludes` (Optional, string | string[])*: A list of fields to exclude from the returned _source field +** *`_source_includes` (Optional, string | string[])*: A list of fields to extract and return from the _source field +** *`stored_fields` (Optional, string | string[])*: A list of stored fields to return in the response +** *`version` (Optional, number)*: Explicit version number for concurrency control +** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type [discrete] === exists_source @@ -134,8 +270,23 @@ Returns information about whether a document source exists in an index. {ref}/docs-get.html[Endpoint documentation] [source,ts] ---- -client.existsSource(...) +client.existsSource({ id, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The document ID +** *`index` (string)*: The name of the index +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`realtime` (Optional, boolean)*: Specify whether to perform the operation in realtime or search mode +** *`refresh` (Optional, boolean)*: Refresh the shard containing the document before performing the operation +** *`routing` (Optional, string)*: Specific routing value +** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or a list of fields to return +** *`_source_excludes` (Optional, string | string[])*: A list of fields to exclude from the returned _source field +** *`_source_includes` (Optional, string | string[])*: A list of fields to extract and return from the _source field +** *`version` (Optional, number)*: Explicit version number for concurrency control +** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type [discrete] === explain @@ -144,8 +295,27 @@ Returns information about why a specific matches (or doesn't match) a query. {ref}/search-explain.html[Endpoint documentation] [source,ts] ---- -client.explain(...) +client.explain({ id, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The document ID +** *`index` (string)*: The name of the index +** *`analyzer` (Optional, string)*: The analyzer for the query string query +** *`analyze_wildcard` (Optional, boolean)*: Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false) +** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query (AND or OR) +** *`df` (Optional, string)*: The default field for query string query (default: _all) +** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`routing` (Optional, string)*: Specific routing value +** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or a list of fields to return +** *`_source_excludes` (Optional, string | string[])*: A list of fields to exclude from the returned _source field +** *`_source_includes` (Optional, string | string[])*: A list of fields to extract and return from the _source field +** *`stored_fields` (Optional, string | string[])*: A list of stored fields to return in the response +** *`q` (Optional, string)*: Query in the Lucene query string syntax +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* [discrete] === field_caps @@ -154,8 +324,25 @@ Returns the information about the capabilities of fields among multiple indices. {ref}/search-field-caps.html[Endpoint documentation] [source,ts] ---- -client.fieldCaps(...) +client.fieldCaps({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: 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. +** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, +or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request +targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports a list of values, such as `open,hidden`. +** *`fields` (Optional, string | string[])*: List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. +** *`ignore_unavailable` (Optional, boolean)*: If `true`, missing or closed indices are not included in the response. +** *`include_unmapped` (Optional, boolean)*: If true, unmapped fields are included in the response. +** *`filters` (Optional, string)*: An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent +** *`types` (Optional, string[])*: Only return results for fields that have one of the types in the list +** *`index_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Allows to filter indices if the provided query rewrites to match_none on every shard. +** *`runtime_mappings` (Optional, Record)*: Defines ad-hoc runtime fields in the request similar to the way it is done in search requests. +These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings. [discrete] === get @@ -164,8 +351,24 @@ Returns a document. {ref}/docs-get.html[Endpoint documentation] [source,ts] ---- -client.get(...) +client.get({ id, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Unique identifier of the document. +** *`index` (string)*: Name of the index that contains the document. +** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default. +** *`realtime` (Optional, boolean)*: Boolean) If true, the request is real-time as opposed to near-real-time. +** *`refresh` (Optional, boolean)*: If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. +** *`routing` (Optional, string)*: Target the specified primary shard. +** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or a list of fields to return. +** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude in the response. +** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response. +** *`stored_fields` (Optional, string | string[])*: A list of stored fields to return in the response +** *`version` (Optional, number)*: Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. +** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type: internal, external, external_gte. [discrete] === get_script @@ -174,8 +377,14 @@ Returns a script. {ref}/modules-scripting.html[Endpoint documentation] [source,ts] ---- -client.getScript(...) +client.getScript({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Script ID +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master [discrete] === get_script_context @@ -184,8 +393,12 @@ Returns all script contexts. {painless}/painless-contexts.html[Endpoint documentation] [source,ts] ---- -client.getScriptContext(...) +client.getScriptContext() ---- +[discrete] +==== Arguments + +* *Request (object):* [discrete] === get_script_languages @@ -194,8 +407,12 @@ Returns available script types, languages and contexts {ref}/modules-scripting.html[Endpoint documentation] [source,ts] ---- -client.getScriptLanguages(...) +client.getScriptLanguages() ---- +[discrete] +==== Arguments + +* *Request (object):* [discrete] === get_source @@ -204,8 +421,24 @@ Returns the source of a document. {ref}/docs-get.html[Endpoint documentation] [source,ts] ---- -client.getSource(...) +client.getSource({ id, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Unique identifier of the document. +** *`index` (string)*: Name of the index that contains the document. +** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default. +** *`realtime` (Optional, boolean)*: Boolean) If true, the request is real-time as opposed to near-real-time. +** *`refresh` (Optional, boolean)*: If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. +** *`routing` (Optional, string)*: Target the specified primary shard. +** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or a list of fields to return. +** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude in the response. +** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response. +** *`stored_fields` (Optional, string | string[])* +** *`version` (Optional, number)*: Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. +** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type: internal, external, external_gte. [discrete] === health_report @@ -214,8 +447,16 @@ Returns the health of the cluster. {ref}/health-api.html[Endpoint documentation] [source,ts] ---- -client.healthReport(...) +client.healthReport({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`feature` (Optional, string | string[])*: A feature of the cluster, as returned by the top-level health report API. +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout. +** *`verbose` (Optional, boolean)*: Opt-in for more information about the health of the system. +** *`size` (Optional, number)*: Limit the number of affected resources the health report API returns. [discrete] === index @@ -224,8 +465,25 @@ Creates or updates a document in an index. {ref}/docs-index_.html[Endpoint documentation] [source,ts] ---- -client.index(...) +client.index({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the index +** *`id` (Optional, string)*: Document ID +** *`if_primary_term` (Optional, number)*: only perform the index operation if the last operation that has changed the document has the specified primary term +** *`if_seq_no` (Optional, number)*: only perform the index operation if the last operation that has changed the document has the specified sequence number +** *`op_type` (Optional, Enum("index" | "create"))*: Explicit operation type. Defaults to `index` for requests with an explicit document ID, and to `create`for requests without an explicit document ID +** *`pipeline` (Optional, string)*: The pipeline id to preprocess incoming documents with +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. +** *`routing` (Optional, string)*: Specific routing value +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`version` (Optional, number)*: Explicit version number for concurrency control +** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) +** *`require_alias` (Optional, boolean)*: When true, requires destination to be an alias. Default is false [discrete] === info @@ -234,8 +492,12 @@ Returns basic information about the cluster. {ref}/index.html[Endpoint documentation] [source,ts] ---- -client.info(...) +client.info() ---- +[discrete] +==== Arguments + +* *Request (object):* [discrete] === knn_search @@ -244,8 +506,29 @@ Performs a kNN search. {ref}/search-search.html[Endpoint documentation] [source,ts] ---- -client.knnSearch(...) +client.knnSearch({ index, knn }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names to search; +use `_all` or to perform the operation on all indices +** *`knn` ({ field, query_vector, k, num_candidates })*: kNN query to execute +** *`routing` (Optional, string)*: A list of specific routing values +** *`_source` (Optional, boolean | { excludes, includes })*: Indicates which source fields are returned for matching documents. These +fields are returned in the hits._source property of the search response. +** *`docvalue_fields` (Optional, { field, format, include_unmapped }[])*: The request returns doc values for field names matching these patterns +in the hits.fields property of the response. Accepts wildcard (*) patterns. +** *`stored_fields` (Optional, string | string[])*: List of stored fields to return as part of a hit. If no fields are specified, +no stored fields are included in the response. If this field is specified, the _source +parameter defaults to false. You can pass _source: true to return both source fields +and stored fields in the search response. +** *`fields` (Optional, string | string[])*: The request returns values for field names matching these patterns +in the hits.fields property of the response. Accepts wildcard (*) patterns. +** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type } | { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type }[])*: Query to filter the documents that can match. The kNN search will return the top +`k` documents that also match this filter. The value can be a single query or a +list of queries. If `filter` isn't provided, all documents are allowed to match. [discrete] === mget @@ -254,8 +537,26 @@ Allows to get multiple documents in one request. {ref}/docs-multi-get.html[Endpoint documentation] [source,ts] ---- -client.mget(...) +client.mget({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string)*: Name of the index to retrieve documents from when `ids` are specified, or when a document in the `docs` array does not specify an index. +** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on. Random by default. +** *`realtime` (Optional, boolean)*: If `true`, the request is real-time as opposed to near-real-time. +** *`refresh` (Optional, boolean)*: If `true`, the request refreshes relevant shards before retrieving documents. +** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard. +** *`_source` (Optional, boolean | string | string[])*: True or false to return the `_source` field or not, or a list of fields to return. +** *`_source_excludes` (Optional, string | string[])*: A list of source fields to exclude from the response. +You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. +** *`_source_includes` (Optional, string | string[])*: A list of source fields to include in the response. +If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. +If the `_source` parameter is `false`, this parameter is ignored. +** *`stored_fields` (Optional, string | string[])*: If `true`, retrieves the document fields stored in the index rather than the document `_source`. +** *`docs` (Optional, { _id, _index, routing, _source, stored_fields, version, version_type }[])*: The documents you want to retrieve. Required if no index is specified in the request URI. +** *`ids` (Optional, string | string[])*: The IDs of the documents you want to retrieve. Allowed when the index is specified in the request URI. [discrete] === msearch @@ -264,8 +565,25 @@ Allows to execute several search operations in one request. {ref}/search-multi-search.html[Endpoint documentation] [source,ts] ---- -client.msearch(...) +client.msearch({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: List of data streams, indices, and index aliases to search. +** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. +** *`ccs_minimize_roundtrips` (Optional, boolean)*: If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. +** *`ignore_throttled` (Optional, boolean)*: If true, concrete, expanded or aliased indices are ignored when frozen. +** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response. +** *`max_concurrent_searches` (Optional, number)*: Maximum number of concurrent searches the multi search API can execute. +** *`max_concurrent_shard_requests` (Optional, number)*: Maximum number of concurrent shard requests that each sub-search request executes per node. +** *`pre_filter_shard_size` (Optional, number)*: Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. +** *`rest_total_hits_as_int` (Optional, boolean)*: If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. +** *`routing` (Optional, string)*: Custom routing value used to route search operations to a specific shard. +** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Indicates whether global term and document frequencies should be used when scoring returned documents. +** *`typed_keys` (Optional, boolean)*: Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. [discrete] === msearch_template @@ -274,8 +592,18 @@ Allows to execute several search template operations in one request. {ref}/search-multi-search.html[Endpoint documentation] [source,ts] ---- -client.msearchTemplate(...) +client.msearchTemplate({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names to use as default +** *`ccs_minimize_roundtrips` (Optional, boolean)*: Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution +** *`max_concurrent_searches` (Optional, number)*: Controls the maximum number of concurrent searches the multi search api will execute +** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Search operation type +** *`rest_total_hits_as_int` (Optional, boolean)*: Indicates whether hits.total should be rendered as an integer or an object in the rest search response +** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response [discrete] === mtermvectors @@ -284,8 +612,26 @@ Returns multiple termvectors in one request. {ref}/docs-multi-termvectors.html[Endpoint documentation] [source,ts] ---- -client.mtermvectors(...) +client.mtermvectors({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string)*: The index in which the document resides. +** *`ids` (Optional, string[])*: A list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body +** *`fields` (Optional, string | string[])*: A list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs". +** *`field_statistics` (Optional, boolean)*: Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +** *`offsets` (Optional, boolean)*: Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +** *`payloads` (Optional, boolean)*: Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +** *`positions` (Optional, boolean)*: Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs". +** *`realtime` (Optional, boolean)*: Specifies if requests are real-time as opposed to near-real-time (default: true). +** *`routing` (Optional, string)*: Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs". +** *`term_statistics` (Optional, boolean)*: Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs". +** *`version` (Optional, number)*: Explicit version number for concurrency control +** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type +** *`docs` (Optional, { _id, _index, routing, _source, stored_fields, version, version_type }[])* [discrete] === open_point_in_time @@ -294,8 +640,18 @@ Open a point in time that can be used in subsequent searches {ref}/point-in-time-api.html[Endpoint documentation] [source,ts] ---- -client.openPointInTime(...) +client.openPointInTime({ index, keep_alive }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names to open point in time; use `_all` or empty string to perform the operation on all indices +** *`keep_alive` (string | -1 | 0)*: Specific the time to live for the point in time +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`routing` (Optional, string)*: Specific routing value +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. [discrete] === ping @@ -304,8 +660,12 @@ Returns whether the cluster is running. {ref}/index.html[Endpoint documentation] [source,ts] ---- -client.ping(...) +client.ping() ---- +[discrete] +==== Arguments + +* *Request (object):* [discrete] === put_script @@ -314,8 +674,17 @@ Creates or updates a script. {ref}/modules-scripting.html[Endpoint documentation] [source,ts] ---- -client.putScript(...) +client.putScript({ id, script }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Script ID +** *`script` ({ lang, options, source })* +** *`context` (Optional, string)*: Script context +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout [discrete] === rank_eval @@ -324,8 +693,20 @@ Allows to evaluate the quality of ranked search results over a set of typical se {ref}/search-rank-eval.html[Endpoint documentation] [source,ts] ---- -client.rankEval(...) +client.rankEval({ requests }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`requests` ({ id, request, ratings, template_id, params }[])*: A set of typical search requests, together with their provided ratings. +** *`index` (Optional, string | string[])*: List of data streams, indices, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. +To target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`. +** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: If `true`, missing or closed indices are not included in the response. +** *`search_type` (Optional, string)*: Search operation type +** *`metric` (Optional, { precision, recall, mean_reciprocal_rank, dcg, expected_reciprocal_rank })*: Definition of the evaluation metric to calculate. [discrete] === reindex @@ -336,8 +717,26 @@ documents from a remote cluster. {ref}/docs-reindex.html[Endpoint documentation] [source,ts] ---- -client.reindex(...) +client.reindex({ dest, source }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`dest` ({ index, op_type, pipeline, routing, version_type })* +** *`source` ({ index, query, remote, size, slice, sort, _source, runtime_mappings })* +** *`refresh` (Optional, boolean)*: Should the affected indexes be refreshed? +** *`requests_per_second` (Optional, float)*: The throttle to set on this request in sub-requests per second. -1 means no throttle. +** *`scroll` (Optional, string | -1 | 0)*: Control how long to keep the search context alive +** *`slices` (Optional, number | Enum("auto"))*: The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`. +** *`timeout` (Optional, string | -1 | 0)*: Time each individual bulk request should wait for shards that are unavailable. +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) +** *`wait_for_completion` (Optional, boolean)*: Should the request should block until the reindex is complete. +** *`require_alias` (Optional, boolean)* +** *`conflicts` (Optional, Enum("abort" | "proceed"))* +** *`max_docs` (Optional, number)* +** *`script` (Optional, { lang, options, source } | { id })* +** *`size` (Optional, number)* [discrete] === reindex_rethrottle @@ -346,8 +745,14 @@ Changes the number of requests per second for a particular Reindex operation. {ref}/docs-reindex.html[Endpoint documentation] [source,ts] ---- -client.reindexRethrottle(...) +client.reindexRethrottle({ task_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`task_id` (string)*: The task id to rethrottle +** *`requests_per_second` (Optional, float)*: The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. [discrete] === render_search_template @@ -356,8 +761,16 @@ Allows to use the Mustache language to pre-render a search definition. {ref}/render-search-template-api.html[Endpoint documentation] [source,ts] ---- -client.renderSearchTemplate(...) +client.renderSearchTemplate({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: The id of the stored search template +** *`file` (Optional, string)* +** *`params` (Optional, Record)* +** *`source` (Optional, string)* [discrete] === scripts_painless_execute @@ -366,8 +779,15 @@ Allows an arbitrary script to be executed and a result to be returned {painless}/painless-execute-api.html[Endpoint documentation] [source,ts] ---- -client.scriptsPainlessExecute(...) +client.scriptsPainlessExecute({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`context` (Optional, string)* +** *`context_setup` (Optional, { document, index, query })* +** *`script` (Optional, { lang, options, source })* [discrete] === scroll @@ -376,8 +796,15 @@ Allows to retrieve a large numbers of results from a single search request. {ref}/search-request-body.html[Endpoint documentation] [source,ts] ---- -client.scroll(...) +client.scroll({ scroll_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`scroll_id` (string)*: Scroll ID of the search. +** *`scroll` (Optional, string | -1 | 0)*: Period to retain the search context for scrolling. +** *`rest_total_hits_as_int` (Optional, boolean)*: If true, the API response’s hit.total property is returned as an integer. If false, the API response’s hit.total property is returned as an object. [discrete] === search @@ -386,8 +813,79 @@ Returns results matching a query. {ref}/search-search.html[Endpoint documentation] [source,ts] ---- -client.search(...) +client.search({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names to search; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`allow_partial_search_results` (Optional, boolean)*: Indicate if an error should be returned if there is a partial search failure or timeout +** *`analyzer` (Optional, string)*: The analyzer to use for the query string +** *`analyze_wildcard` (Optional, boolean)*: Specify whether wildcard and prefix queries should be analyzed (default: false) +** *`batched_reduce_size` (Optional, number)*: The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. +** *`ccs_minimize_roundtrips` (Optional, boolean)*: Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution +** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query (AND or OR) +** *`df` (Optional, string)*: The field to use as default where no field prefix is given in the query string +** *`docvalue_fields` (Optional, string | string[])*: A list of fields to return as the docvalue representation of a field for each hit +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`explain` (Optional, boolean)*: Specify whether to return detailed information about score computation as part of a hit +** *`ignore_throttled` (Optional, boolean)*: Whether specified concrete, expanded or aliased indices should be ignored when throttled +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +** *`max_concurrent_shard_requests` (Optional, number)*: The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests +** *`min_compatible_shard_node` (Optional, string)*: The minimum compatible version that all shards involved in search should have for this request to be successful +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`pre_filter_shard_size` (Optional, number)*: A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. +** *`request_cache` (Optional, boolean)*: Specify if request cache should be used for this request or not, defaults to index level setting +** *`routing` (Optional, string)*: A list of specific routing values +** *`scroll` (Optional, string | -1 | 0)*: Specify how long a consistent view of the index should be maintained for scrolled search +** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Search operation type +** *`stats` (Optional, string[])*: Specific 'tag' of the request for logging and statistical purposes +** *`stored_fields` (Optional, string | string[])*: A list of stored fields to return as part of a hit +** *`suggest_field` (Optional, string)*: Specifies which field to use for suggestions. +** *`suggest_mode` (Optional, Enum("missing" | "popular" | "always"))*: Specify suggest mode +** *`suggest_size` (Optional, number)*: How many suggestions to return in response +** *`suggest_text` (Optional, string)*: The source text for which the suggestions should be returned. +** *`terminate_after` (Optional, number)*: The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`track_total_hits` (Optional, boolean | number)*: Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number. +** *`track_scores` (Optional, boolean)*: Whether to calculate and return scores even if they are not used for sorting +** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response +** *`rest_total_hits_as_int` (Optional, boolean)*: Indicates whether hits.total should be rendered as an integer or an object in the rest search response +** *`version` (Optional, boolean)*: Specify whether to return document version as part of a hit +** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or a list of fields to return +** *`_source_excludes` (Optional, string | string[])*: A list of fields to exclude from the returned _source field +** *`_source_includes` (Optional, string | string[])*: A list of fields to extract and return from the _source field +** *`seq_no_primary_term` (Optional, boolean)*: Specify whether to return sequence number and primary term of the last modification of each hit +** *`q` (Optional, string)*: Query in the Lucene query string syntax +** *`size` (Optional, number)*: Number of hits to return (default: 10) +** *`from` (Optional, number)*: Starting offset (default: 0) +** *`sort` (Optional, string | string[])*: A list of : pairs +** *`aggregations` (Optional, Record)* +** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })* +** *`ext` (Optional, Record)*: Configuration of search extensions defined by Elasticsearch plugins. +** *`highlight` (Optional, { encoder, fields })* +** *`indices_boost` (Optional, Record[])*: Boosts the _score of documents from specified indices. +** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter }[])*: Defines the approximate kNN search to run. +** *`rank` (Optional, { rrf })*: Defines the Reciprocal Rank Fusion (RRF) to use +** *`min_score` (Optional, number)*: Minimum _score for matching documents. Documents with a lower _score are +not included in the search results. +** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* +** *`profile` (Optional, boolean)* +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Defines the search definition using the Query DSL. +** *`rescore` (Optional, { query, window_size } | { query, window_size }[])* +** *`script_fields` (Optional, Record)*: Retrieve a script evaluation (based on different fields) for each hit. +** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])* +** *`slice` (Optional, { field, id, max })* +** *`fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns values for field names +matching these patterns in the hits.fields property of the response. +** *`suggest` (Optional, { text })* +** *`pit` (Optional, { id, keep_alive })*: Limits the search to a point in time (PIT). If you provide a PIT, you +cannot specify an in the request path. +** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request. These fields take +precedence over mapped fields with the same name. [discrete] === search_mvt @@ -396,8 +894,57 @@ Searches a vector tile for geospatial values. Returns results as a binary Mapbox {ref}/search-vector-tile-api.html[Endpoint documentation] [source,ts] ---- -client.searchMvt(...) +client.searchMvt({ index, field, zoom, x, y }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: List of data streams, indices, or aliases to search +** *`field` (string)*: Field containing geospatial data to return +** *`zoom` (number)*: Zoom level for the vector tile to search +** *`x` (number)*: X coordinate for the vector tile to search +** *`y` (number)*: Y coordinate for the vector tile to search +** *`exact_bounds` (Optional, boolean)*: If false, the meta layer’s feature is the bounding box of the tile. +If true, the meta layer’s feature is a bounding box resulting from a +geo_bounds aggregation. The aggregation runs on values that intersect +the // tile with wrap_longitude set to false. The resulting +bounding box may be larger than the vector tile. +** *`extent` (Optional, number)*: Size, in pixels, of a side of the tile. Vector tiles are square with equal sides. +** *`grid_agg` (Optional, Enum("geotile" | "geohex"))*: Aggregation used to create a grid for `field`. +** *`grid_precision` (Optional, number)*: Additional zoom levels available through the aggs layer. For example, if is 7 +and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results +don’t include the aggs layer. +** *`grid_type` (Optional, Enum("grid" | "point" | "centroid"))*: Determines the geometry type for features in the aggs layer. In the aggs layer, +each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon +of the cells bounding box. If 'point' each feature is a Point that is the centroid +of the cell. +** *`size` (Optional, number)*: Maximum number of features to return in the hits layer. Accepts 0-10000. +If 0, results don’t include the hits layer. +** *`with_labels` (Optional, boolean)*: If `true`, the hits and aggs layers will contain additional point features representing +suggested label positions for the original features. +** *`aggs` (Optional, Record)*: Sub-aggregations for the geotile_grid. + +Supports the following aggregation types: +- avg +- cardinality +- max +- min +- sum +** *`buffer` (Optional, number)*: Size, in pixels, of a clipping buffer outside the tile. This allows renderers +to avoid outline artifacts from geometries that extend past the extent of the tile. +** *`fields` (Optional, string | string[])*: Fields to return in the `hits` layer. Supports wildcards (`*`). +This parameter does not support fields with array values. Fields with array +values may return inconsistent results. +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Query DSL used to filter documents for the search. +** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request. These fields take +precedence over mapped fields with the same name. +** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*: Sorts features in the hits layer. By default, the API calculates a bounding +box for each feature. It sorts features based on this box’s diagonal length, +from longest to shortest. +** *`track_total_hits` (Optional, boolean | number)*: Number of hits matching the query to count accurately. If `true`, the exact number +of hits is returned at the cost of some performance. If `false`, the response does +not include the total number of hits matching the query. [discrete] === search_shards @@ -406,8 +953,19 @@ Returns information about the indices and shards that a search request would be {ref}/search-shards.html[Endpoint documentation] [source,ts] ---- -client.searchShards(...) +client.searchShards({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names to search; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`routing` (Optional, string)*: Specific routing value [discrete] === search_template @@ -416,8 +974,34 @@ Allows to use the Mustache language to pre-render a search definition. {ref}/search-template.html[Endpoint documentation] [source,ts] ---- -client.searchTemplate(...) +client.searchTemplate({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: List of data streams, indices, +and aliases to search. Supports wildcards (*). +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`ccs_minimize_roundtrips` (Optional, boolean)*: Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`explain` (Optional, boolean)*: Specify whether to return detailed information about score computation as part of a hit +** *`ignore_throttled` (Optional, boolean)*: Whether specified concrete, expanded or aliased indices should be ignored when throttled +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`profile` (Optional, boolean)*: Specify whether to profile the query execution +** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard. +** *`scroll` (Optional, string | -1 | 0)*: Specifies how long a consistent view of the index +should be maintained for scrolled search. +** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: The type of the search operation. +** *`rest_total_hits_as_int` (Optional, boolean)*: If true, hits.total are rendered as an integer in the response. +** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response +** *`id` (Optional, string)*: ID of the search template to use. If no source is specified, +this parameter is required. +** *`params` (Optional, Record)* +** *`source` (Optional, string)*: An inline search template. Supports the same parameters as the search API's +request body. Also supports Mustache variables. If no id is specified, this +parameter is required. [discrete] === terms_enum @@ -426,8 +1010,20 @@ The terms enum API can be used to discover terms in the index that begin with t {ref}/search-terms-enum.html[Endpoint documentation] [source,ts] ---- -client.termsEnum(...) +client.termsEnum({ index, field }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: List of data streams, indices, and index aliases to search. Wildcard (*) expressions are supported. +** *`field` (string)*: The string to match at the start of indexed terms. If not provided, all terms in the field are considered. +** *`size` (Optional, number)*: How many matching terms to return. +** *`timeout` (Optional, string | -1 | 0)*: The maximum length of time to spend collecting results. Defaults to "1s" (one second). If the timeout is exceeded the complete flag set to false in the response and the results may be partial or empty. +** *`case_insensitive` (Optional, boolean)*: When true the provided search string is matched against index terms without case sensitivity. +** *`index_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Allows to filter an index shard if the provided query rewrites to match_none. +** *`string` (Optional, string)*: The string after which terms in the index should be returned. Allows for a form of pagination if the last result from one request is passed as the search_after parameter for a subsequent request. +** *`search_after` (Optional, string)* [discrete] === termvectors @@ -436,8 +1032,28 @@ Returns information and statistics about terms in the fields of a particular doc {ref}/docs-termvectors.html[Endpoint documentation] [source,ts] ---- -client.termvectors(...) +client.termvectors({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The index in which the document resides. +** *`id` (Optional, string)*: The id of the document, when not specified a doc param should be supplied. +** *`fields` (Optional, string | string[])*: A list of fields to return. +** *`field_statistics` (Optional, boolean)*: Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. +** *`offsets` (Optional, boolean)*: Specifies if term offsets should be returned. +** *`payloads` (Optional, boolean)*: Specifies if term payloads should be returned. +** *`positions` (Optional, boolean)*: Specifies if term positions should be returned. +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random). +** *`realtime` (Optional, boolean)*: Specifies if request is real-time as opposed to near-real-time (default: true). +** *`routing` (Optional, string)*: Specific routing value. +** *`term_statistics` (Optional, boolean)*: Specifies if total term frequency and document frequency should be returned. +** *`version` (Optional, number)*: Explicit version number for concurrency control +** *`version_type` (Optional, Enum("internal" | "external" | "external_gte" | "force"))*: Specific version type +** *`doc` (Optional, document object)* +** *`filter` (Optional, { max_doc_freq, max_num_terms, max_term_freq, max_word_length, min_doc_freq, min_term_freq, min_word_length })* +** *`per_field_analyzer` (Optional, Record)* [discrete] === update @@ -446,8 +1062,41 @@ Updates a document with a script or partial document. {ref}/docs-update.html[Endpoint documentation] [source,ts] ---- -client.update(...) +client.update({ id, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Document ID +** *`index` (string)*: The name of the index +** *`if_primary_term` (Optional, number)*: Only perform the operation if the document has this primary term. +** *`if_seq_no` (Optional, number)*: Only perform the operation if the document has this sequence number. +** *`lang` (Optional, string)*: The script language. +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If 'true', Elasticsearch refreshes the affected shards to make this operation +visible to search, if 'wait_for' then wait for a refresh to make this operation +visible to search, if 'false' do nothing with refreshes. +** *`require_alias` (Optional, boolean)*: If true, the destination must be an index alias. +** *`retry_on_conflict` (Optional, number)*: Specify how many times should the operation be retried when a conflict occurs. +** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for dynamic mapping updates and active shards. +This guarantees Elasticsearch waits for at least the timeout before failing. +The actual wait time could be longer, particularly when multiple waits occur. +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: The number of shard copies that must be active before proceeding with the operations. +Set to 'all' or any positive integer up to the total number of shards in the index +(number_of_replicas+1). Defaults to 1 meaning the primary shard. +** *`_source` (Optional, boolean | string | string[])*: Set to false to disable source retrieval. You can also specify a comma-separated +list of the fields you want to retrieve. +** *`_source_excludes` (Optional, string | string[])*: Specify the source fields you want to exclude. +** *`_source_includes` (Optional, string | string[])*: Specify the source fields you want to retrieve. +** *`detect_noop` (Optional, boolean)*: Set to false to disable setting 'result' in the response +to 'noop' if no change to the document occurred. +** *`doc` (Optional, partial document object)*: A partial update to an existing document. +** *`doc_as_upsert` (Optional, boolean)*: Set to true to use the contents of 'doc' as the value of 'upsert' +** *`script` (Optional, { lang, options, source } | { id })*: Script to execute to update the document. +** *`scripted_upsert` (Optional, boolean)*: Set to true to execute the script whether or not the document exists. +** *`upsert` (Optional, document object)*: If the document does not already exist, the contents of 'upsert' are inserted as a +new document. If the document exists, the 'script' is executed. [discrete] === update_by_query @@ -457,8 +1106,46 @@ for example to pick up a mapping change. {ref}/docs-update-by-query.html[Endpoint documentation] [source,ts] ---- -client.updateByQuery(...) +client.updateByQuery({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names to search; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`analyzer` (Optional, string)*: The analyzer to use for the query string +** *`analyze_wildcard` (Optional, boolean)*: Specify whether wildcard and prefix queries should be analyzed (default: false) +** *`conflicts` (Optional, Enum("abort" | "proceed"))*: What to do when the update by query hits version conflicts? +** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query (AND or OR) +** *`df` (Optional, string)*: The field to use as default where no field prefix is given in the query string +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`from` (Optional, number)*: Starting offset (default: 0) +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +** *`max_docs` (Optional, number)*: Maximum number of documents to process (default: all documents) +** *`pipeline` (Optional, string)*: Ingest pipeline to set on index requests made by this action. (default: none) +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`refresh` (Optional, boolean)*: Should the affected indexes be refreshed? +** *`request_cache` (Optional, boolean)*: Specify if request cache should be used for this request or not, defaults to index level setting +** *`requests_per_second` (Optional, float)*: The throttle to set on this request in sub-requests per second. -1 means no throttle. +** *`routing` (Optional, string)*: A list of specific routing values +** *`scroll` (Optional, string | -1 | 0)*: Specify how long a consistent view of the index should be maintained for scrolled search +** *`scroll_size` (Optional, number)*: Size on the scroll request powering the update by query +** *`search_timeout` (Optional, string | -1 | 0)*: Explicit timeout for each search request. Defaults to no timeout. +** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Search operation type +** *`slices` (Optional, number | Enum("auto"))*: The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`. +** *`sort` (Optional, string[])*: A list of : pairs +** *`stats` (Optional, string[])*: Specific 'tag' of the request for logging and statistical purposes +** *`terminate_after` (Optional, number)*: The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +** *`timeout` (Optional, string | -1 | 0)*: Time each individual bulk request should wait for shards that are unavailable. +** *`version` (Optional, boolean)*: Specify whether to return document version as part of a hit +** *`version_type` (Optional, boolean)*: Should the document increment the version number (internal) on hit or not (reindex) +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) +** *`wait_for_completion` (Optional, boolean)*: Should the request should block until the update by query operation is complete. +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* +** *`script` (Optional, { lang, options, source } | { id })* +** *`slice` (Optional, { field, id, max })* [discrete] === update_by_query_rethrottle @@ -467,8 +1154,14 @@ Changes the number of requests per second for a particular Update By Query opera {ref}/docs-update-by-query.html[Endpoint documentation] [source,ts] ---- -client.updateByQueryRethrottle(...) +client.updateByQueryRethrottle({ task_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`task_id` (string)*: The task id to rethrottle +** *`requests_per_second` (Optional, float)*: The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. [discrete] === async_search @@ -479,9 +1172,15 @@ Deletes an async search by ID. If the search is still running, the search reques {ref}/async-search.html[Endpoint documentation] [source,ts] ---- -client.asyncSearch.delete(...) +client.asyncSearch.delete({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: A unique identifier for the async search. + [discrete] ==== get Retrieves the results of a previously submitted async search request given its ID. @@ -489,9 +1188,24 @@ Retrieves the results of a previously submitted async search request given its I {ref}/async-search.html[Endpoint documentation] [source,ts] ---- -client.asyncSearch.get(...) +client.asyncSearch.get({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: A unique identifier for the async search. +** *`keep_alive` (Optional, string | -1 | 0)*: 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. +** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response +** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Specifies to wait for the search to be completed up until the provided timeout. +Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires. +By default no timeout is set meaning that the currently available results will be returned without any additional wait. + [discrete] ==== status Retrieves the status of a previously submitted async search request given its ID. @@ -499,9 +1213,15 @@ Retrieves the status of a previously submitted async search request given its ID {ref}/async-search.html[Endpoint documentation] [source,ts] ---- -client.asyncSearch.status(...) +client.asyncSearch.status({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: A unique identifier for the async search. + [discrete] ==== submit Executes a search request asynchronously. @@ -509,9 +1229,86 @@ Executes a search request asynchronously. {ref}/async-search.html[Endpoint documentation] [source,ts] ---- -client.asyncSearch.submit(...) +client.asyncSearch.submit({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names to search; use `_all` or empty string to perform the operation on all indices +** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: 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. +** *`keep_on_completion` (Optional, boolean)*: If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`. +** *`keep_alive` (Optional, string | -1 | 0)*: Specifies how long the async search needs to be available. +Ongoing async searches and any saved search results are deleted after this period. +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`allow_partial_search_results` (Optional, boolean)*: Indicate if an error should be returned if there is a partial search failure or timeout +** *`analyzer` (Optional, string)*: The analyzer to use for the query string +** *`analyze_wildcard` (Optional, boolean)*: Specify whether wildcard and prefix queries should be analyzed (default: false) +** *`batched_reduce_size` (Optional, number)*: Affects how often partial results become available, which happens whenever shard results are reduced. +A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default). +** *`ccs_minimize_roundtrips` (Optional, boolean)*: The default value is the only supported value. +** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query (AND or OR) +** *`df` (Optional, string)*: The field to use as default where no field prefix is given in the query string +** *`docvalue_fields` (Optional, string | string[])*: A list of fields to return as the docvalue representation of a field for each hit +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`explain` (Optional, boolean)*: Specify whether to return detailed information about score computation as part of a hit +** *`ignore_throttled` (Optional, boolean)*: Whether specified concrete, expanded or aliased indices should be ignored when throttled +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +** *`max_concurrent_shard_requests` (Optional, number)*: The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests +** *`min_compatible_shard_node` (Optional, string)* +** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random) +** *`pre_filter_shard_size` (Optional, number)*: The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped. +** *`request_cache` (Optional, boolean)*: Specify if request cache should be used for this request or not, defaults to true +** *`routing` (Optional, string)*: A list of specific routing values +** *`scroll` (Optional, string | -1 | 0)* +** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Search operation type +** *`stats` (Optional, string[])*: Specific 'tag' of the request for logging and statistical purposes +** *`stored_fields` (Optional, string | string[])*: A list of stored fields to return as part of a hit +** *`suggest_field` (Optional, string)*: Specifies which field to use for suggestions. +** *`suggest_mode` (Optional, Enum("missing" | "popular" | "always"))*: Specify suggest mode +** *`suggest_size` (Optional, number)*: How many suggestions to return in response +** *`suggest_text` (Optional, string)*: The source text for which the suggestions should be returned. +** *`terminate_after` (Optional, number)*: The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`track_total_hits` (Optional, boolean | number)*: Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number. +** *`track_scores` (Optional, boolean)*: Whether to calculate and return scores even if they are not used for sorting +** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response +** *`rest_total_hits_as_int` (Optional, boolean)* +** *`version` (Optional, boolean)*: Specify whether to return document version as part of a hit +** *`_source` (Optional, boolean | string | string[])*: True or false to return the _source field or not, or a list of fields to return +** *`_source_excludes` (Optional, string | string[])*: A list of fields to exclude from the returned _source field +** *`_source_includes` (Optional, string | string[])*: A list of fields to extract and return from the _source field +** *`seq_no_primary_term` (Optional, boolean)*: Specify whether to return sequence number and primary term of the last modification of each hit +** *`q` (Optional, string)*: Query in the Lucene query string syntax +** *`size` (Optional, number)*: Number of hits to return (default: 10) +** *`from` (Optional, number)*: Starting offset (default: 0) +** *`sort` (Optional, string | string[])*: A list of : pairs +** *`aggregations` (Optional, Record)* +** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })* +** *`ext` (Optional, Record)*: Configuration of search extensions defined by Elasticsearch plugins. +** *`highlight` (Optional, { encoder, fields })* +** *`indices_boost` (Optional, Record[])*: Boosts the _score of documents from specified indices. +** *`knn` (Optional, { field, query_vector, query_vector_builder, k, num_candidates, boost, filter } | { field, query_vector, query_vector_builder, k, num_candidates, boost, filter }[])*: Defines the approximate kNN search to run. +** *`min_score` (Optional, number)*: Minimum _score for matching documents. Documents with a lower _score are +not included in the search results. +** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* +** *`profile` (Optional, boolean)* +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Defines the search definition using the Query DSL. +** *`rescore` (Optional, { query, window_size } | { query, window_size }[])* +** *`script_fields` (Optional, Record)*: Retrieve a script evaluation (based on different fields) for each hit. +** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])* +** *`slice` (Optional, { field, id, max })* +** *`fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns values for field names +matching these patterns in the hits.fields property of the response. +** *`suggest` (Optional, { text })* +** *`pit` (Optional, { id, keep_alive })*: Limits the search to a point in time (PIT). If you provide a PIT, you +cannot specify an in the request path. +** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request. These fields take +precedence over mapped fields with the same name. + [discrete] === cat [discrete] @@ -521,9 +1318,16 @@ Shows information about currently configured aliases to indices including filter {ref}/cat-alias.html[Endpoint documentation] [source,ts] ---- -client.cat.aliases(...) +client.cat.aliases({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string | string[])*: A list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. + [discrete] ==== allocation Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. @@ -531,9 +1335,16 @@ Provides a snapshot of how many shards are allocated to each data node and how m {ref}/cat-allocation.html[Endpoint documentation] [source,ts] ---- -client.cat.allocation(...) +client.cat.allocation({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (Optional, string | string[])*: List of node identifiers or names used to limit the returned information. +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values. + [discrete] ==== component_templates Returns information about existing component_templates templates. @@ -541,9 +1352,15 @@ Returns information about existing component_templates templates. {ref}/cat-component-templates.html[Endpoint documentation] [source,ts] ---- -client.cat.componentTemplates(...) +client.cat.componentTemplates({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string)*: The name of the component template. Accepts wildcard expressions. If omitted, all component templates are returned. + [discrete] ==== count Provides quick access to the document count of the entire cluster, or individual indices. @@ -551,9 +1368,16 @@ Provides quick access to the document count of the entire cluster, or individual {ref}/cat-count.html[Endpoint documentation] [source,ts] ---- -client.cat.count(...) +client.cat.count({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: 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`. + [discrete] ==== fielddata Shows how much heap memory is currently being used by fielddata on every data node in the cluster. @@ -561,9 +1385,17 @@ Shows how much heap memory is currently being used by fielddata on every data no {ref}/cat-fielddata.html[Endpoint documentation] [source,ts] ---- -client.cat.fielddata(...) +client.cat.fielddata({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`fields` (Optional, string | string[])*: List of fields used to limit returned information. +To retrieve all fields, omit this parameter. +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values. + [discrete] ==== health Returns a concise representation of the cluster health. @@ -571,9 +1403,16 @@ Returns a concise representation of the cluster health. {ref}/cat-health.html[Endpoint documentation] [source,ts] ---- -client.cat.health(...) +client.cat.health({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values. +** *`ts` (Optional, boolean)*: If true, returns `HH:MM:SS` and Unix epoch timestamps. + [discrete] ==== help Returns help for the Cat APIs. @@ -581,9 +1420,14 @@ Returns help for the Cat APIs. {ref}/cat.html[Endpoint documentation] [source,ts] ---- -client.cat.help(...) +client.cat.help() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== indices Returns information about indices: number of primaries and replicas, document counts, disk size, ... @@ -591,9 +1435,22 @@ Returns information about indices: number of primaries and replicas, document co {ref}/cat-indices.html[Endpoint documentation] [source,ts] ---- -client.cat.indices(...) +client.cat.indices({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: 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`. +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: The type of index that wildcard patterns can match. +** *`health` (Optional, Enum("green" | "yellow" | "red"))*: The health status used to limit returned indices. By default, the response includes indices of any health status. +** *`include_unloaded_segments` (Optional, boolean)*: If true, the response includes information from segments that are not loaded into memory. +** *`pri` (Optional, boolean)*: If true, the response only includes information from primary shards. +** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values. + [discrete] ==== master Returns information about the master node. @@ -601,9 +1458,14 @@ Returns information about the master node. {ref}/cat-master.html[Endpoint documentation] [source,ts] ---- -client.cat.master(...) +client.cat.master() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== ml_data_frame_analytics Gets configuration and usage information about data frame analytics jobs. @@ -611,9 +1473,21 @@ Gets configuration and usage information about data frame analytics jobs. {ref}/cat-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.cat.mlDataFrameAnalytics(...) +client.cat.mlDataFrameAnalytics({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: The ID of the data frame analytics to fetch +** *`allow_no_match` (Optional, boolean)*: Whether to ignore if a wildcard expression matches no configs. (This includes `_all` string or when no configs have been specified) +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit in which to display byte values +** *`h` (Optional, Enum("assignment_explanation" | "create_time" | "description" | "dest_index" | "failure_reason" | "id" | "model_memory_limit" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "progress" | "source_index" | "state" | "type" | "version") | Enum("assignment_explanation" | "create_time" | "description" | "dest_index" | "failure_reason" | "id" | "model_memory_limit" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "progress" | "source_index" | "state" | "type" | "version")[])*: List of column names to display. +** *`s` (Optional, Enum("assignment_explanation" | "create_time" | "description" | "dest_index" | "failure_reason" | "id" | "model_memory_limit" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "progress" | "source_index" | "state" | "type" | "version") | Enum("assignment_explanation" | "create_time" | "description" | "dest_index" | "failure_reason" | "id" | "model_memory_limit" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "progress" | "source_index" | "state" | "type" | "version")[])*: List of column names or column aliases used to sort the +response. +** *`time` (Optional, string | -1 | 0)*: Unit used to display time values. + [discrete] ==== ml_datafeeds Gets configuration and usage information about datafeeds. @@ -621,9 +1495,27 @@ Gets configuration and usage information about datafeeds. {ref}/cat-datafeeds.html[Endpoint documentation] [source,ts] ---- -client.cat.mlDatafeeds(...) +client.cat.mlDatafeeds({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`datafeed_id` (Optional, string)*: A numerical character string that uniquely identifies the datafeed. +** *`allow_no_match` (Optional, boolean)*: 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. +** *`h` (Optional, Enum("ae" | "bc" | "id" | "na" | "ne" | "ni" | "nn" | "sba" | "sc" | "seah" | "st" | "s") | Enum("ae" | "bc" | "id" | "na" | "ne" | "ni" | "nn" | "sba" | "sc" | "seah" | "st" | "s")[])*: List of column names to display. +** *`s` (Optional, Enum("ae" | "bc" | "id" | "na" | "ne" | "ni" | "nn" | "sba" | "sc" | "seah" | "st" | "s") | Enum("ae" | "bc" | "id" | "na" | "ne" | "ni" | "nn" | "sba" | "sc" | "seah" | "st" | "s")[])*: List of column names or column aliases used to sort the response. +** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values. + [discrete] ==== ml_jobs Gets configuration and usage information about anomaly detection jobs. @@ -631,9 +1523,28 @@ Gets configuration and usage information about anomaly detection jobs. {ref}/cat-anomaly-detectors.html[Endpoint documentation] [source,ts] ---- -client.cat.mlJobs(...) +client.cat.mlJobs({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (Optional, string)*: Identifier for the anomaly detection job. +** *`allow_no_match` (Optional, boolean)*: 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. +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values. +** *`h` (Optional, Enum("assignment_explanation" | "buckets.count" | "buckets.time.exp_avg" | "buckets.time.exp_avg_hour" | "buckets.time.max" | "buckets.time.min" | "buckets.time.total" | "data.buckets" | "data.earliest_record" | "data.empty_buckets" | "data.input_bytes" | "data.input_fields" | "data.input_records" | "data.invalid_dates" | "data.last" | "data.last_empty_bucket" | "data.last_sparse_bucket" | "data.latest_record" | "data.missing_fields" | "data.out_of_order_timestamps" | "data.processed_fields" | "data.processed_records" | "data.sparse_buckets" | "forecasts.memory.avg" | "forecasts.memory.max" | "forecasts.memory.min" | "forecasts.memory.total" | "forecasts.records.avg" | "forecasts.records.max" | "forecasts.records.min" | "forecasts.records.total" | "forecasts.time.avg" | "forecasts.time.max" | "forecasts.time.min" | "forecasts.time.total" | "forecasts.total" | "id" | "model.bucket_allocation_failures" | "model.by_fields" | "model.bytes" | "model.bytes_exceeded" | "model.categorization_status" | "model.categorized_doc_count" | "model.dead_category_count" | "model.failed_category_count" | "model.frequent_category_count" | "model.log_time" | "model.memory_limit" | "model.memory_status" | "model.over_fields" | "model.partition_fields" | "model.rare_category_count" | "model.timestamp" | "model.total_category_count" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "opened_time" | "state") | Enum("assignment_explanation" | "buckets.count" | "buckets.time.exp_avg" | "buckets.time.exp_avg_hour" | "buckets.time.max" | "buckets.time.min" | "buckets.time.total" | "data.buckets" | "data.earliest_record" | "data.empty_buckets" | "data.input_bytes" | "data.input_fields" | "data.input_records" | "data.invalid_dates" | "data.last" | "data.last_empty_bucket" | "data.last_sparse_bucket" | "data.latest_record" | "data.missing_fields" | "data.out_of_order_timestamps" | "data.processed_fields" | "data.processed_records" | "data.sparse_buckets" | "forecasts.memory.avg" | "forecasts.memory.max" | "forecasts.memory.min" | "forecasts.memory.total" | "forecasts.records.avg" | "forecasts.records.max" | "forecasts.records.min" | "forecasts.records.total" | "forecasts.time.avg" | "forecasts.time.max" | "forecasts.time.min" | "forecasts.time.total" | "forecasts.total" | "id" | "model.bucket_allocation_failures" | "model.by_fields" | "model.bytes" | "model.bytes_exceeded" | "model.categorization_status" | "model.categorized_doc_count" | "model.dead_category_count" | "model.failed_category_count" | "model.frequent_category_count" | "model.log_time" | "model.memory_limit" | "model.memory_status" | "model.over_fields" | "model.partition_fields" | "model.rare_category_count" | "model.timestamp" | "model.total_category_count" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "opened_time" | "state")[])*: List of column names to display. +** *`s` (Optional, Enum("assignment_explanation" | "buckets.count" | "buckets.time.exp_avg" | "buckets.time.exp_avg_hour" | "buckets.time.max" | "buckets.time.min" | "buckets.time.total" | "data.buckets" | "data.earliest_record" | "data.empty_buckets" | "data.input_bytes" | "data.input_fields" | "data.input_records" | "data.invalid_dates" | "data.last" | "data.last_empty_bucket" | "data.last_sparse_bucket" | "data.latest_record" | "data.missing_fields" | "data.out_of_order_timestamps" | "data.processed_fields" | "data.processed_records" | "data.sparse_buckets" | "forecasts.memory.avg" | "forecasts.memory.max" | "forecasts.memory.min" | "forecasts.memory.total" | "forecasts.records.avg" | "forecasts.records.max" | "forecasts.records.min" | "forecasts.records.total" | "forecasts.time.avg" | "forecasts.time.max" | "forecasts.time.min" | "forecasts.time.total" | "forecasts.total" | "id" | "model.bucket_allocation_failures" | "model.by_fields" | "model.bytes" | "model.bytes_exceeded" | "model.categorization_status" | "model.categorized_doc_count" | "model.dead_category_count" | "model.failed_category_count" | "model.frequent_category_count" | "model.log_time" | "model.memory_limit" | "model.memory_status" | "model.over_fields" | "model.partition_fields" | "model.rare_category_count" | "model.timestamp" | "model.total_category_count" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "opened_time" | "state") | Enum("assignment_explanation" | "buckets.count" | "buckets.time.exp_avg" | "buckets.time.exp_avg_hour" | "buckets.time.max" | "buckets.time.min" | "buckets.time.total" | "data.buckets" | "data.earliest_record" | "data.empty_buckets" | "data.input_bytes" | "data.input_fields" | "data.input_records" | "data.invalid_dates" | "data.last" | "data.last_empty_bucket" | "data.last_sparse_bucket" | "data.latest_record" | "data.missing_fields" | "data.out_of_order_timestamps" | "data.processed_fields" | "data.processed_records" | "data.sparse_buckets" | "forecasts.memory.avg" | "forecasts.memory.max" | "forecasts.memory.min" | "forecasts.memory.total" | "forecasts.records.avg" | "forecasts.records.max" | "forecasts.records.min" | "forecasts.records.total" | "forecasts.time.avg" | "forecasts.time.max" | "forecasts.time.min" | "forecasts.time.total" | "forecasts.total" | "id" | "model.bucket_allocation_failures" | "model.by_fields" | "model.bytes" | "model.bytes_exceeded" | "model.categorization_status" | "model.categorized_doc_count" | "model.dead_category_count" | "model.failed_category_count" | "model.frequent_category_count" | "model.log_time" | "model.memory_limit" | "model.memory_status" | "model.over_fields" | "model.partition_fields" | "model.rare_category_count" | "model.timestamp" | "model.total_category_count" | "node.address" | "node.ephemeral_id" | "node.id" | "node.name" | "opened_time" | "state")[])*: List of column names or column aliases used to sort the response. +** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values. + [discrete] ==== ml_trained_models Gets configuration and usage information about inference trained models. @@ -641,9 +1552,23 @@ Gets configuration and usage information about inference trained models. {ref}/cat-trained-model.html[Endpoint documentation] [source,ts] ---- -client.cat.mlTrainedModels(...) +client.cat.mlTrainedModels({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (Optional, string)*: A unique identifier for the trained model. +** *`allow_no_match` (Optional, boolean)*: 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. +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values. +** *`h` (Optional, Enum("create_time" | "created_by" | "data_frame_analytics_id" | "description" | "heap_size" | "id" | "ingest.count" | "ingest.current" | "ingest.failed" | "ingest.pipelines" | "ingest.time" | "license" | "operations" | "version") | Enum("create_time" | "created_by" | "data_frame_analytics_id" | "description" | "heap_size" | "id" | "ingest.count" | "ingest.current" | "ingest.failed" | "ingest.pipelines" | "ingest.time" | "license" | "operations" | "version")[])*: A list of column names to display. +** *`s` (Optional, Enum("create_time" | "created_by" | "data_frame_analytics_id" | "description" | "heap_size" | "id" | "ingest.count" | "ingest.current" | "ingest.failed" | "ingest.pipelines" | "ingest.time" | "license" | "operations" | "version") | Enum("create_time" | "created_by" | "data_frame_analytics_id" | "description" | "heap_size" | "id" | "ingest.count" | "ingest.current" | "ingest.failed" | "ingest.pipelines" | "ingest.time" | "license" | "operations" | "version")[])*: A list of column names or aliases used to sort the response. +** *`from` (Optional, number)*: Skips the specified number of transforms. +** *`size` (Optional, number)*: The maximum number of transforms to display. + [discrete] ==== nodeattrs Returns information about custom node attributes. @@ -651,9 +1576,14 @@ Returns information about custom node attributes. {ref}/cat-nodeattrs.html[Endpoint documentation] [source,ts] ---- -client.cat.nodeattrs(...) +client.cat.nodeattrs() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== nodes Returns basic statistics about performance of cluster nodes. @@ -661,9 +1591,17 @@ Returns basic statistics about performance of cluster nodes. {ref}/cat-nodes.html[Endpoint documentation] [source,ts] ---- -client.cat.nodes(...) +client.cat.nodes({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values. +** *`full_id` (Optional, boolean | string)*: If `true`, return the full node ID. If `false`, return the shortened node ID. +** *`include_unloaded_segments` (Optional, boolean)*: If true, the response includes information from segments that are not loaded into memory. + [discrete] ==== pending_tasks Returns a concise representation of the cluster pending tasks. @@ -671,9 +1609,14 @@ Returns a concise representation of the cluster pending tasks. {ref}/cat-pending-tasks.html[Endpoint documentation] [source,ts] ---- -client.cat.pendingTasks(...) +client.cat.pendingTasks() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== plugins Returns information about installed plugins across nodes node. @@ -681,9 +1624,14 @@ Returns information about installed plugins across nodes node. {ref}/cat-plugins.html[Endpoint documentation] [source,ts] ---- -client.cat.plugins(...) +client.cat.plugins() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== recovery Returns information about index shard recoveries, both on-going completed. @@ -691,9 +1639,19 @@ Returns information about index shard recoveries, both on-going completed. {ref}/cat-recovery.html[Endpoint documentation] [source,ts] ---- -client.cat.recovery(...) +client.cat.recovery({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A 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`. +** *`active_only` (Optional, boolean)*: If `true`, the response only includes ongoing shard recoveries. +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values. +** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries. + [discrete] ==== repositories Returns information about snapshot repositories registered in the cluster. @@ -701,9 +1659,14 @@ Returns information about snapshot repositories registered in the cluster. {ref}/cat-repositories.html[Endpoint documentation] [source,ts] ---- -client.cat.repositories(...) +client.cat.repositories() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== segments Provides low-level information about the segments in the shards of an index. @@ -711,9 +1674,18 @@ Provides low-level information about the segments in the shards of an index. {ref}/cat-segments.html[Endpoint documentation] [source,ts] ---- -client.cat.segments(...) +client.cat.segments({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A 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`. +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values. + [discrete] ==== shards Provides a detailed view of shard allocation on nodes. @@ -721,9 +1693,18 @@ Provides a detailed view of shard allocation on nodes. {ref}/cat-shards.html[Endpoint documentation] [source,ts] ---- -client.cat.shards(...) +client.cat.shards({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A 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`. +** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values. + [discrete] ==== snapshots Returns all snapshots in a specific repository. @@ -731,9 +1712,19 @@ Returns all snapshots in a specific repository. {ref}/cat-snapshots.html[Endpoint documentation] [source,ts] ---- -client.cat.snapshots(...) +client.cat.snapshots({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (Optional, string | string[])*: A list of snapshot repositories used to limit the request. +Accepts wildcard expressions. +`_all` returns all repositories. +If any repository fails during the request, Elasticsearch returns an error. +** *`ignore_unavailable` (Optional, boolean)*: If `true`, the response does not include information from unavailable snapshots. + [discrete] ==== tasks Returns information about the tasks currently executing on one or more nodes in the cluster. @@ -741,9 +1732,18 @@ Returns information about the tasks currently executing on one or more nodes in {ref}/tasks.html[Endpoint documentation] [source,ts] ---- -client.cat.tasks(...) +client.cat.tasks({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`actions` (Optional, string[])*: The task action names, which are used to limit the response. +** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries. +** *`node_id` (Optional, string[])*: Unique node identifiers, which are used to limit the response. +** *`parent_task_id` (Optional, string)*: The parent task identifier, which is used to limit the response. + [discrete] ==== templates Returns information about existing templates. @@ -751,9 +1751,16 @@ Returns information about existing templates. {ref}/cat-templates.html[Endpoint documentation] [source,ts] ---- -client.cat.templates(...) +client.cat.templates({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string)*: The name of the template to return. +Accepts wildcard expressions. If omitted, all templates are returned. + [discrete] ==== thread_pool Returns cluster-wide thread pool statistics per node. @@ -762,9 +1769,17 @@ By default the active, queue and rejected statistics are returned for all thread {ref}/cat-thread-pool.html[Endpoint documentation] [source,ts] ---- -client.cat.threadPool(...) +client.cat.threadPool({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`thread_pool_patterns` (Optional, string | string[])*: A list of thread pool names used to limit the request. +Accepts wildcard expressions. +** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values. + [discrete] ==== transforms Gets configuration and usage information about transforms. @@ -772,9 +1787,24 @@ Gets configuration and usage information about transforms. {ref}/cat-transforms.html[Endpoint documentation] [source,ts] ---- -client.cat.transforms(...) +client.cat.transforms({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (Optional, string)*: A transform identifier or a wildcard expression. +If you do not specify one of these options, the API returns information for all transforms. +** *`allow_no_match` (Optional, boolean)*: 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. +** *`from` (Optional, number)*: Skips the specified number of transforms. +** *`h` (Optional, Enum("changes_last_detection_time" | "checkpoint" | "checkpoint_duration_time_exp_avg" | "checkpoint_progress" | "create_time" | "delete_time" | "description" | "dest_index" | "documents_deleted" | "documents_indexed" | "docs_per_second" | "documents_processed" | "frequency" | "id" | "index_failure" | "index_time" | "index_total" | "indexed_documents_exp_avg" | "last_search_time" | "max_page_search_size" | "pages_processed" | "pipeline" | "processed_documents_exp_avg" | "processing_time" | "reason" | "search_failure" | "search_time" | "search_total" | "source_index" | "state" | "transform_type" | "trigger_count" | "version") | Enum("changes_last_detection_time" | "checkpoint" | "checkpoint_duration_time_exp_avg" | "checkpoint_progress" | "create_time" | "delete_time" | "description" | "dest_index" | "documents_deleted" | "documents_indexed" | "docs_per_second" | "documents_processed" | "frequency" | "id" | "index_failure" | "index_time" | "index_total" | "indexed_documents_exp_avg" | "last_search_time" | "max_page_search_size" | "pages_processed" | "pipeline" | "processed_documents_exp_avg" | "processing_time" | "reason" | "search_failure" | "search_time" | "search_total" | "source_index" | "state" | "transform_type" | "trigger_count" | "version")[])*: List of column names to display. +** *`s` (Optional, Enum("changes_last_detection_time" | "checkpoint" | "checkpoint_duration_time_exp_avg" | "checkpoint_progress" | "create_time" | "delete_time" | "description" | "dest_index" | "documents_deleted" | "documents_indexed" | "docs_per_second" | "documents_processed" | "frequency" | "id" | "index_failure" | "index_time" | "index_total" | "indexed_documents_exp_avg" | "last_search_time" | "max_page_search_size" | "pages_processed" | "pipeline" | "processed_documents_exp_avg" | "processing_time" | "reason" | "search_failure" | "search_time" | "search_total" | "source_index" | "state" | "transform_type" | "trigger_count" | "version") | Enum("changes_last_detection_time" | "checkpoint" | "checkpoint_duration_time_exp_avg" | "checkpoint_progress" | "create_time" | "delete_time" | "description" | "dest_index" | "documents_deleted" | "documents_indexed" | "docs_per_second" | "documents_processed" | "frequency" | "id" | "index_failure" | "index_time" | "index_total" | "indexed_documents_exp_avg" | "last_search_time" | "max_page_search_size" | "pages_processed" | "pipeline" | "processed_documents_exp_avg" | "processing_time" | "reason" | "search_failure" | "search_time" | "search_total" | "source_index" | "state" | "transform_type" | "trigger_count" | "version")[])*: List of column names or column aliases used to sort the response. +** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values. +** *`size` (Optional, number)*: The maximum number of transforms to obtain. + [discrete] === ccr [discrete] @@ -784,9 +1814,15 @@ Deletes auto-follow patterns. {ref}/ccr-delete-auto-follow-pattern.html[Endpoint documentation] [source,ts] ---- -client.ccr.deleteAutoFollowPattern(...) +client.ccr.deleteAutoFollowPattern({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the auto follow pattern. + [discrete] ==== follow Creates a new follower index configured to follow the referenced leader index. @@ -794,9 +1830,28 @@ Creates a new follower index configured to follow the referenced leader index. {ref}/ccr-put-follow.html[Endpoint documentation] [source,ts] ---- -client.ccr.follow(...) +client.ccr.follow({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the follower index +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of shard copies that must be active before returning. Defaults to 0. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) +** *`leader_index` (Optional, string)* +** *`max_outstanding_read_requests` (Optional, number)* +** *`max_outstanding_write_requests` (Optional, number)* +** *`max_read_request_operation_count` (Optional, number)* +** *`max_read_request_size` (Optional, string)* +** *`max_retry_delay` (Optional, string | -1 | 0)* +** *`max_write_buffer_count` (Optional, number)* +** *`max_write_buffer_size` (Optional, string)* +** *`max_write_request_operation_count` (Optional, number)* +** *`max_write_request_size` (Optional, string)* +** *`read_poll_timeout` (Optional, string | -1 | 0)* +** *`remote_cluster` (Optional, string)* + [discrete] ==== follow_info Retrieves information about all follower indices, including parameters and status for each follower index @@ -804,9 +1859,15 @@ Retrieves information about all follower indices, including parameters and statu {ref}/ccr-get-follow-info.html[Endpoint documentation] [source,ts] ---- -client.ccr.followInfo(...) +client.ccr.followInfo({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index patterns; use `_all` to perform the operation on all indices + [discrete] ==== follow_stats Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices. @@ -814,9 +1875,15 @@ Retrieves follower stats. return shard-level stats about the following tasks ass {ref}/ccr-get-follow-stats.html[Endpoint documentation] [source,ts] ---- -client.ccr.followStats(...) +client.ccr.followStats({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index patterns; use `_all` to perform the operation on all indices + [discrete] ==== forget_follower Removes the follower retention leases from the leader. @@ -824,9 +1891,19 @@ Removes the follower retention leases from the leader. {ref}/ccr-post-forget-follower.html[Endpoint documentation] [source,ts] ---- -client.ccr.forgetFollower(...) +client.ccr.forgetFollower({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: the name of the leader index for which specified follower retention leases should be removed +** *`follower_cluster` (Optional, string)* +** *`follower_index` (Optional, string)* +** *`follower_index_uuid` (Optional, string)* +** *`leader_remote_cluster` (Optional, string)* + [discrete] ==== get_auto_follow_pattern Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection. @@ -834,9 +1911,15 @@ Gets configured auto-follow patterns. Returns the specified auto-follow pattern {ref}/ccr-get-auto-follow-pattern.html[Endpoint documentation] [source,ts] ---- -client.ccr.getAutoFollowPattern(...) +client.ccr.getAutoFollowPattern({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string)*: Specifies the auto-follow pattern collection that you want to retrieve. If you do not specify a name, the API returns information for all collections. + [discrete] ==== pause_auto_follow_pattern Pauses an auto-follow pattern @@ -844,9 +1927,15 @@ Pauses an auto-follow pattern {ref}/ccr-pause-auto-follow-pattern.html[Endpoint documentation] [source,ts] ---- -client.ccr.pauseAutoFollowPattern(...) +client.ccr.pauseAutoFollowPattern({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the auto follow pattern that should pause discovering new indices to follow. + [discrete] ==== pause_follow Pauses a follower index. The follower index will not fetch any additional operations from the leader index. @@ -854,9 +1943,15 @@ Pauses a follower index. The follower index will not fetch any additional operat {ref}/ccr-post-pause-follow.html[Endpoint documentation] [source,ts] ---- -client.ccr.pauseFollow(...) +client.ccr.pauseFollow({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the follower index that should pause following its leader index. + [discrete] ==== put_auto_follow_pattern Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices. @@ -864,9 +1959,30 @@ Creates a new named collection of auto-follow patterns against a specified remot {ref}/ccr-put-auto-follow-pattern.html[Endpoint documentation] [source,ts] ---- -client.ccr.putAutoFollowPattern(...) +client.ccr.putAutoFollowPattern({ name, remote_cluster }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the collection of auto-follow patterns. +** *`remote_cluster` (string)*: The remote cluster containing the leader indices to match against. +** *`follow_index_pattern` (Optional, string)*: The name of follower index. The template {{leader_index}} can be used to derive the name of the follower index from the name of the leader index. When following a data stream, use {{leader_index}}; CCR does not support changes to the names of a follower data stream’s backing indices. +** *`leader_index_patterns` (Optional, string[])*: An array of simple index patterns to match against indices in the remote cluster specified by the remote_cluster field. +** *`leader_index_exclusion_patterns` (Optional, string[])*: An array of simple index patterns that can be used to exclude indices from being auto-followed. Indices in the remote cluster whose names are matching one or more leader_index_patterns and one or more leader_index_exclusion_patterns won’t be followed. +** *`max_outstanding_read_requests` (Optional, number)*: The maximum number of outstanding reads requests from the remote cluster. +** *`settings` (Optional, Record)*: Settings to override from the leader index. Note that certain settings can not be overrode (e.g., index.number_of_shards). +** *`max_outstanding_write_requests` (Optional, number)*: The maximum number of outstanding reads requests from the remote cluster. +** *`read_poll_timeout` (Optional, string | -1 | 0)*: The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index. When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics. Then the follower will immediately attempt to read from the leader again. +** *`max_read_request_operation_count` (Optional, number)*: The maximum number of operations to pull per read from the remote cluster. +** *`max_read_request_size` (Optional, number | string)*: The maximum size in bytes of per read of a batch of operations pulled from the remote cluster. +** *`max_retry_delay` (Optional, string | -1 | 0)*: The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when retrying. +** *`max_write_buffer_count` (Optional, number)*: The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be deferred until the number of queued operations goes below the limit. +** *`max_write_buffer_size` (Optional, number | string)*: The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be deferred until the total bytes of queued operations goes below the limit. +** *`max_write_request_operation_count` (Optional, number)*: The maximum number of operations per bulk write request executed on the follower. +** *`max_write_request_size` (Optional, number | string)*: The maximum total bytes of operations per bulk write request executed on the follower. + [discrete] ==== resume_auto_follow_pattern Resumes an auto-follow pattern that has been paused @@ -874,9 +1990,15 @@ Resumes an auto-follow pattern that has been paused {ref}/ccr-resume-auto-follow-pattern.html[Endpoint documentation] [source,ts] ---- -client.ccr.resumeAutoFollowPattern(...) +client.ccr.resumeAutoFollowPattern({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the auto follow pattern to resume discovering new indices to follow. + [discrete] ==== resume_follow Resumes a follower index that has been paused @@ -884,9 +2006,25 @@ Resumes a follower index that has been paused {ref}/ccr-post-resume-follow.html[Endpoint documentation] [source,ts] ---- -client.ccr.resumeFollow(...) +client.ccr.resumeFollow({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the follow index to resume following. +** *`max_outstanding_read_requests` (Optional, number)* +** *`max_outstanding_write_requests` (Optional, number)* +** *`max_read_request_operation_count` (Optional, number)* +** *`max_read_request_size` (Optional, string)* +** *`max_retry_delay` (Optional, string | -1 | 0)* +** *`max_write_buffer_count` (Optional, number)* +** *`max_write_buffer_size` (Optional, string)* +** *`max_write_request_operation_count` (Optional, number)* +** *`max_write_request_size` (Optional, string)* +** *`read_poll_timeout` (Optional, string | -1 | 0)* + [discrete] ==== stats Gets all stats related to cross-cluster replication. @@ -894,9 +2032,14 @@ Gets all stats related to cross-cluster replication. {ref}/ccr-get-stats.html[Endpoint documentation] [source,ts] ---- -client.ccr.stats(...) +client.ccr.stats() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== unfollow Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. @@ -904,9 +2047,15 @@ Stops the following task associated with a follower index and removes index meta {ref}/ccr-post-unfollow.html[Endpoint documentation] [source,ts] ---- -client.ccr.unfollow(...) +client.ccr.unfollow({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the follower index that should be turned into a regular index. + [discrete] === cluster [discrete] @@ -916,9 +2065,20 @@ Provides explanations for shard allocations in the cluster. {ref}/cluster-allocation-explain.html[Endpoint documentation] [source,ts] ---- -client.cluster.allocationExplain(...) +client.cluster.allocationExplain({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`include_disk_info` (Optional, boolean)*: If true, returns information about disk usage and shard sizes. +** *`include_yes_decisions` (Optional, boolean)*: If true, returns YES decisions in explanation. +** *`current_node` (Optional, string)*: Specifies the node ID or the name of the node to only explain a shard that is currently located on the specified node. +** *`index` (Optional, string)*: Specifies the name of the index that you would like an explanation for. +** *`primary` (Optional, boolean)*: If true, returns explanation for the primary shard for the given shard ID. +** *`shard` (Optional, number)*: Specifies the ID of the shard that you would like an explanation for. + [discrete] ==== delete_component_template Deletes a component template @@ -926,9 +2086,17 @@ Deletes a component template {ref}/indices-component-template.html[Endpoint documentation] [source,ts] ---- -client.cluster.deleteComponentTemplate(...) +client.cluster.deleteComponentTemplate({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: List or wildcard expression of component template names used to limit the request. +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== delete_voting_config_exclusions Clears cluster voting config exclusions. @@ -936,9 +2104,20 @@ Clears cluster voting config exclusions. {ref}/voting-config-exclusions.html[Endpoint documentation] [source,ts] ---- -client.cluster.deleteVotingConfigExclusions(...) +client.cluster.deleteVotingConfigExclusions({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`wait_for_removal` (Optional, boolean)*: Specifies whether to wait for all excluded nodes to be removed from the +cluster before clearing the voting configuration exclusions list. +Defaults to true, meaning that all excluded nodes must be removed from +the cluster before this API takes any action. If set to false then the +voting configuration exclusions list is cleared even if some excluded +nodes are still in the cluster. + [discrete] ==== exists_component_template Returns information about whether a particular component template exist @@ -946,9 +2125,21 @@ Returns information about whether a particular component template exist {ref}/indices-component-template.html[Endpoint documentation] [source,ts] ---- -client.cluster.existsComponentTemplate(...) +client.cluster.existsComponentTemplate({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: List of component template names used to limit the request. +Wildcard (*) expressions are supported. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`local` (Optional, boolean)*: If true, the request retrieves information from the local node only. +Defaults to false, which means information is retrieved from the master node. + [discrete] ==== get_component_template Returns one or more component templates @@ -956,9 +2147,19 @@ Returns one or more component templates {ref}/indices-component-template.html[Endpoint documentation] [source,ts] ---- -client.cluster.getComponentTemplate(...) +client.cluster.getComponentTemplate({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string)*: The comma separated names of the component templates +** *`flat_settings` (Optional, boolean)* +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`include_defaults` (Optional, boolean)*: Return all default configurations for the component template (default: false) + [discrete] ==== get_settings Returns cluster settings. @@ -966,9 +2167,18 @@ Returns cluster settings. {ref}/cluster-get-settings.html[Endpoint documentation] [source,ts] ---- -client.cluster.getSettings(...) +client.cluster.getSettings({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false) +** *`include_defaults` (Optional, boolean)*: Whether to return all default clusters setting. +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== health Returns basic information about the health of the cluster. @@ -976,9 +2186,42 @@ Returns basic information about the health of the cluster. {ref}/cluster-health.html[Endpoint documentation] [source,ts] ---- -client.cluster.health(...) +client.cluster.health({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: List of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use _all or *. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`level` (Optional, Enum("cluster" | "indices" | "shards"))*: Can be one of cluster, indices or shards. Controls the details level of the health information returned. +** *`local` (Optional, boolean)*: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait. +** *`wait_for_events` (Optional, Enum("immediate" | "urgent" | "high" | "normal" | "low" | "languid"))*: Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed. +** *`wait_for_nodes` (Optional, string | number)*: The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and yellow > red. By default, will not wait for any status. + +[discrete] +==== info +Returns different information about the cluster. + +{ref}/cluster-info.html[Endpoint documentation] +[source,ts] +---- +client.cluster.info({ target }) +---- + +[discrete] +==== Arguments + +* *Request (object):* +** *`target` (Enum("_all" | "http" | "ingest" | "thread_pool" | "script") | Enum("_all" | "http" | "ingest" | "thread_pool" | "script")[])*: Limits the information returned to the specific target. Supports a list, such as http,ingest. + [discrete] ==== pending_tasks Returns a list of any cluster-level changes (e.g. create index, update mapping, @@ -987,9 +2230,18 @@ allocate or fail shard) which have not yet been executed. {ref}/cluster-pending.html[Endpoint documentation] [source,ts] ---- -client.cluster.pendingTasks(...) +client.cluster.pendingTasks({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`local` (Optional, boolean)*: If `true`, the request retrieves information from the local node only. +If `false`, information is retrieved from the master node. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. + [discrete] ==== post_voting_config_exclusions Updates the cluster voting config exclusions by node ids or node names. @@ -997,9 +2249,22 @@ Updates the cluster voting config exclusions by node ids or node names. {ref}/voting-config-exclusions.html[Endpoint documentation] [source,ts] ---- -client.cluster.postVotingConfigExclusions(...) +client.cluster.postVotingConfigExclusions({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_names` (Optional, string | string[])*: A list of the names of the nodes to exclude from the +voting configuration. If specified, you may not also specify node_ids. +** *`node_ids` (Optional, string | string[])*: A list of the persistent ids of the nodes to exclude +from the voting configuration. If specified, you may not also specify node_names. +** *`timeout` (Optional, string | -1 | 0)*: When adding a voting configuration exclusion, the API waits for the +specified nodes to be excluded from the voting configuration before +returning. If the timeout expires before the appropriate condition +is satisfied, the request fails and returns an error. + [discrete] ==== put_component_template Creates or updates a component template @@ -1007,9 +2272,26 @@ Creates or updates a component template {ref}/indices-component-template.html[Endpoint documentation] [source,ts] ---- -client.cluster.putComponentTemplate(...) +client.cluster.putComponentTemplate({ name, template }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the template +** *`template` ({ aliases, mappings, settings, defaults, data_stream, lifecycle })*: The template to be applied which includes mappings, settings, or aliases configuration. +** *`create` (Optional, boolean)*: Whether the index template should only be added if new or can also replace an existing one +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`version` (Optional, number)*: Version number used to manage component templates externally. +This number isn't automatically generated or incremented by Elasticsearch. +** *`_meta` (Optional, Record)*: Optional user metadata about the component template. +May have any contents. This map is not automatically generated by Elasticsearch. +** *`allow_auto_create` (Optional, boolean)*: This setting overrides the value of the `action.auto_create_index` cluster setting. +If set to `true` in a template, then indices can be automatically created using that +template even if auto-creation of indices is disabled via `actions.auto_create_index`. +If set to `false` then data streams matching the template must always be explicitly created. + [discrete] ==== put_settings Updates the cluster settings. @@ -1017,9 +2299,19 @@ Updates the cluster settings. {ref}/cluster-update-settings.html[Endpoint documentation] [source,ts] ---- -client.cluster.putSettings(...) +client.cluster.putSettings({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false) +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`persistent` (Optional, Record)* +** *`transient` (Optional, Record)* + [discrete] ==== remote_info Returns the information about configured remote clusters. @@ -1027,9 +2319,14 @@ Returns the information about configured remote clusters. {ref}/cluster-remote-info.html[Endpoint documentation] [source,ts] ---- -client.cluster.remoteInfo(...) +client.cluster.remoteInfo() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== reroute Allows to manually change the allocation of individual shards in the cluster. @@ -1037,9 +2334,21 @@ Allows to manually change the allocation of individual shards in the cluster. {ref}/cluster-reroute.html[Endpoint documentation] [source,ts] ---- -client.cluster.reroute(...) +client.cluster.reroute({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`dry_run` (Optional, boolean)*: If true, then the request simulates the operation only and returns the resulting state. +** *`explain` (Optional, boolean)*: If true, then the response contains an explanation of why the commands can or cannot be executed. +** *`metric` (Optional, string | string[])*: Limits the information returned to the specified metrics. +** *`retry_failed` (Optional, boolean)*: If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. +** *`commands` (Optional, { cancel, move, allocate_replica, allocate_stale_primary, allocate_empty_primary }[])*: Defines the commands to perform. + [discrete] ==== state Returns a comprehensive information about the state of the cluster. @@ -1047,9 +2356,24 @@ Returns a comprehensive information about the state of the cluster. {ref}/cluster-state.html[Endpoint documentation] [source,ts] ---- -client.cluster.state(...) +client.cluster.state({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`metric` (Optional, string | string[])*: Limit the information returned to the specified metrics +** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false) +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`wait_for_metadata_version` (Optional, number)*: Wait for the metadata version to be equal or greater than the specified metadata version +** *`wait_for_timeout` (Optional, string | -1 | 0)*: The maximum time to wait for wait_for_metadata_version before timing out + [discrete] ==== stats Returns high-level overview of cluster statistics. @@ -1057,9 +2381,17 @@ Returns high-level overview of cluster statistics. {ref}/cluster-stats.html[Endpoint documentation] [source,ts] ---- -client.cluster.stats(...) +client.cluster.stats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (Optional, string | string[])*: List of node filters used to limit returned information. Defaults to all nodes in the cluster. +** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false) +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response’s _nodes.failed property. Defaults to no timeout. + [discrete] === dangling_indices [discrete] @@ -1069,9 +2401,18 @@ Deletes the specified dangling index {ref}/modules-gateway-dangling-indices.html[Endpoint documentation] [source,ts] ---- -client.danglingIndices.deleteDanglingIndex(...) +client.danglingIndices.deleteDanglingIndex({ index_uuid, accept_data_loss }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index_uuid` (string)*: The UUID of the dangling index +** *`accept_data_loss` (boolean)*: Must be set to true in order to delete the dangling index +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== import_dangling_index Imports the specified dangling index @@ -1079,9 +2420,18 @@ Imports the specified dangling index {ref}/modules-gateway-dangling-indices.html[Endpoint documentation] [source,ts] ---- -client.danglingIndices.importDanglingIndex(...) +client.danglingIndices.importDanglingIndex({ index_uuid, accept_data_loss }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index_uuid` (string)*: The UUID of the dangling index +** *`accept_data_loss` (boolean)*: Must be set to true in order to import the dangling index +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== list_dangling_indices Returns all dangling indices. @@ -1089,9 +2439,14 @@ Returns all dangling indices. {ref}/modules-gateway-dangling-indices.html[Endpoint documentation] [source,ts] ---- -client.danglingIndices.listDanglingIndices(...) +client.danglingIndices.listDanglingIndices() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] === enrich [discrete] @@ -1101,9 +2456,15 @@ Deletes an existing enrich policy and its enrich index. {ref}/delete-enrich-policy-api.html[Endpoint documentation] [source,ts] ---- -client.enrich.deletePolicy(...) +client.enrich.deletePolicy({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the enrich policy + [discrete] ==== execute_policy Creates the enrich index for an existing enrich policy. @@ -1111,9 +2472,16 @@ Creates the enrich index for an existing enrich policy. {ref}/execute-enrich-policy-api.html[Endpoint documentation] [source,ts] ---- -client.enrich.executePolicy(...) +client.enrich.executePolicy({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the enrich policy +** *`wait_for_completion` (Optional, boolean)*: Should the request should block until the execution is complete. + [discrete] ==== get_policy Gets information about an enrich policy. @@ -1121,9 +2489,15 @@ Gets information about an enrich policy. {ref}/get-enrich-policy-api.html[Endpoint documentation] [source,ts] ---- -client.enrich.getPolicy(...) +client.enrich.getPolicy({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string | string[])*: A list of enrich policy names + [discrete] ==== put_policy Creates a new enrich policy. @@ -1131,9 +2505,18 @@ Creates a new enrich policy. {ref}/put-enrich-policy-api.html[Endpoint documentation] [source,ts] ---- -client.enrich.putPolicy(...) +client.enrich.putPolicy({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the enrich policy +** *`geo_match` (Optional, { enrich_fields, indices, match_field, query, name, elasticsearch_version })* +** *`match` (Optional, { enrich_fields, indices, match_field, query, name, elasticsearch_version })* +** *`range` (Optional, { enrich_fields, indices, match_field, query, name, elasticsearch_version })* + [discrete] ==== stats Gets enrich coordinator statistics and information about enrich policies that are currently executing. @@ -1141,9 +2524,14 @@ Gets enrich coordinator statistics and information about enrich policies that ar {ref}/enrich-stats-api.html[Endpoint documentation] [source,ts] ---- -client.enrich.stats(...) +client.enrich.stats() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] === eql [discrete] @@ -1153,9 +2541,15 @@ Deletes an async EQL search by ID. If the search is still running, the search re {ref}/eql-search-api.html[Endpoint documentation] [source,ts] ---- -client.eql.delete(...) +client.eql.delete({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Identifier for the search to delete. + [discrete] ==== get Returns async results from previously executed Event Query Language (EQL) search @@ -1163,9 +2557,17 @@ Returns async results from previously executed Event Query Language (EQL) search {ref}/eql-search-api.html[Endpoint documentation] [source,ts] ---- -client.eql.get(...) +client.eql.get({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Identifier for the search. +** *`keep_alive` (Optional, string | -1 | 0)*: Period for which the search and its results are stored on the cluster. Defaults to the keep_alive value set by the search’s EQL search API request. +** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results. + [discrete] ==== get_status Returns the status of a previously submitted async or stored Event Query Language (EQL) search @@ -1173,9 +2575,15 @@ Returns the status of a previously submitted async or stored Event Query Languag {ref}/eql-search-api.html[Endpoint documentation] [source,ts] ---- -client.eql.getStatus(...) +client.eql.getStatus({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Identifier for the search. + [discrete] ==== search Returns results matching a query expressed in Event Query Language (EQL) @@ -1183,9 +2591,32 @@ Returns results matching a query expressed in Event Query Language (EQL) {ref}/eql-search-api.html[Endpoint documentation] [source,ts] ---- -client.eql.search(...) +client.eql.search({ index, query }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: The name of the index to scope the operation +** *`query` (string)*: EQL query you wish to run. +** *`allow_no_indices` (Optional, boolean)* +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])* +** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response. +** *`keep_alive` (Optional, string | -1 | 0)*: Period for which the search and its results are stored on the cluster. +** *`keep_on_completion` (Optional, boolean)*: If true, the search and its results are stored on the cluster. +** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results. +** *`case_sensitive` (Optional, boolean)* +** *`event_category_field` (Optional, string)*: Field containing the event classification, such as process, file, or network. +** *`tiebreaker_field` (Optional, string)*: Field used to sort hits with the same timestamp in ascending order +** *`timestamp_field` (Optional, string)*: Field containing event timestamp. Default "@timestamp" +** *`fetch_size` (Optional, number)*: Maximum number of events to search at a time for sequence queries. +** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type } | { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type }[])*: Query, written in Query DSL, used to filter the events on which the EQL query runs. +** *`size` (Optional, number)*: For basic queries, the maximum number of matching events to return. Defaults to 10 +** *`fields` (Optional, { field, format, include_unmapped } | { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The response returns values for field names matching these patterns in the fields property of each hit. +** *`result_position` (Optional, Enum("tail" | "head"))* +** *`runtime_mappings` (Optional, Record)* + [discrete] === features [discrete] @@ -1195,9 +2626,14 @@ Gets a list of features which can be included in snapshots using the feature_sta {ref}/get-features-api.html[Endpoint documentation] [source,ts] ---- -client.features.getFeatures(...) +client.features.getFeatures() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== reset_features Resets the internal state of features, usually by deleting system indices @@ -1205,9 +2641,14 @@ Resets the internal state of features, usually by deleting system indices {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.features.resetFeatures(...) +client.features.resetFeatures() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] === fleet [discrete] @@ -1217,25 +2658,137 @@ Returns the current global checkpoints for an index. This API is design for inte {ref}/get-global-checkpoints.html[Endpoint documentation] [source,ts] ---- -client.fleet.globalCheckpoints(...) +client.fleet.globalCheckpoints({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string)*: A single index or index alias that resolves to a single index. +** *`wait_for_advance` (Optional, boolean)*: A boolean value which controls whether to wait (until the timeout) for the global checkpoints +to advance past the provided `checkpoints`. +** *`wait_for_index` (Optional, boolean)*: A boolean value which controls whether to wait (until the timeout) for the target index to exist +and all primary shards be active. Can only be true when `wait_for_advance` is true. +** *`checkpoints` (Optional, number[])*: A comma separated list of previous global checkpoints. When used in combination with `wait_for_advance`, +the API will only return once the global checkpoints advances past the checkpoints. Providing an empty list +will cause Elasticsearch to immediately return the current global checkpoints. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a global checkpoints to advance past `checkpoints`. + [discrete] ==== msearch Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. [source,ts] ---- -client.fleet.msearch(...) +client.fleet.msearch({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string)*: A single target to search. If the target is an index alias, it must resolve to a single index. +** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. +** *`ccs_minimize_roundtrips` (Optional, boolean)*: If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. +** *`ignore_throttled` (Optional, boolean)*: If true, concrete, expanded or aliased indices are ignored when frozen. +** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response. +** *`max_concurrent_searches` (Optional, number)*: Maximum number of concurrent searches the multi search API can execute. +** *`max_concurrent_shard_requests` (Optional, number)*: Maximum number of concurrent shard requests that each sub-search request executes per node. +** *`pre_filter_shard_size` (Optional, number)*: Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. +** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Indicates whether global term and document frequencies should be used when scoring returned documents. +** *`rest_total_hits_as_int` (Optional, boolean)*: If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. +** *`typed_keys` (Optional, boolean)*: Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. +** *`wait_for_checkpoints` (Optional, number[])*: A comma separated list of checkpoints. When configured, the search API will only be executed on a shard +after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause +Elasticsearch to immediately execute the search. +** *`allow_partial_search_results` (Optional, boolean)*: If true, returns partial results if there are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). If false, returns +an error with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results` +which is true by default. + [discrete] ==== search Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. [source,ts] ---- -client.fleet.search(...) +client.fleet.search({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string)*: A single target to search. If the target is an index alias, it must resolve to a single index. +** *`allow_no_indices` (Optional, boolean)* +** *`analyzer` (Optional, string)* +** *`analyze_wildcard` (Optional, boolean)* +** *`batched_reduce_size` (Optional, number)* +** *`ccs_minimize_roundtrips` (Optional, boolean)* +** *`default_operator` (Optional, Enum("and" | "or"))* +** *`df` (Optional, string)* +** *`docvalue_fields` (Optional, string | string[])* +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])* +** *`explain` (Optional, boolean)* +** *`ignore_throttled` (Optional, boolean)* +** *`ignore_unavailable` (Optional, boolean)* +** *`lenient` (Optional, boolean)* +** *`max_concurrent_shard_requests` (Optional, number)* +** *`min_compatible_shard_node` (Optional, string)* +** *`preference` (Optional, string)* +** *`pre_filter_shard_size` (Optional, number)* +** *`request_cache` (Optional, boolean)* +** *`routing` (Optional, string)* +** *`scroll` (Optional, string | -1 | 0)* +** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))* +** *`stats` (Optional, string[])* +** *`stored_fields` (Optional, string | string[])* +** *`suggest_field` (Optional, string)*: Specifies which field to use for suggestions. +** *`suggest_mode` (Optional, Enum("missing" | "popular" | "always"))* +** *`suggest_size` (Optional, number)* +** *`suggest_text` (Optional, string)*: The source text for which the suggestions should be returned. +** *`terminate_after` (Optional, number)* +** *`timeout` (Optional, string | -1 | 0)* +** *`track_total_hits` (Optional, boolean | number)* +** *`track_scores` (Optional, boolean)* +** *`typed_keys` (Optional, boolean)* +** *`rest_total_hits_as_int` (Optional, boolean)* +** *`version` (Optional, boolean)* +** *`_source` (Optional, boolean | string | string[])* +** *`_source_excludes` (Optional, string | string[])* +** *`_source_includes` (Optional, string | string[])* +** *`seq_no_primary_term` (Optional, boolean)* +** *`q` (Optional, string)* +** *`size` (Optional, number)* +** *`from` (Optional, number)* +** *`sort` (Optional, string | string[])* +** *`wait_for_checkpoints` (Optional, number[])*: A comma separated list of checkpoints. When configured, the search API will only be executed on a shard +after the relevant checkpoint has become visible for search. Defaults to an empty list which will cause +Elasticsearch to immediately execute the search. +** *`allow_partial_search_results` (Optional, boolean)*: If true, returns partial results if there are shard request timeouts or [shard failures](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-replication.html#shard-failures). If false, returns +an error with no partial results. Defaults to the configured cluster setting `search.default_allow_partial_results` +which is true by default. +** *`aggregations` (Optional, Record)* +** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })* +** *`ext` (Optional, Record)*: Configuration of search extensions defined by Elasticsearch plugins. +** *`highlight` (Optional, { encoder, fields })* +** *`indices_boost` (Optional, Record[])*: Boosts the _score of documents from specified indices. +** *`min_score` (Optional, number)*: Minimum _score for matching documents. Documents with a lower _score are +not included in the search results. +** *`post_filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* +** *`profile` (Optional, boolean)* +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Defines the search definition using the Query DSL. +** *`rescore` (Optional, { query, window_size } | { query, window_size }[])* +** *`script_fields` (Optional, Record)*: Retrieve a script evaluation (based on different fields) for each hit. +** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])* +** *`slice` (Optional, { field, id, max })* +** *`fields` (Optional, { field, format, include_unmapped }[])*: Array of wildcard (*) patterns. The request returns values for field names +matching these patterns in the hits.fields property of the response. +** *`suggest` (Optional, { text })* +** *`pit` (Optional, { id, keep_alive })*: Limits the search to a point in time (PIT). If you provide a PIT, you +cannot specify an in the request path. +** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request. These fields take +precedence over mapped fields with the same name. + [discrete] === graph [discrete] @@ -1245,9 +2798,21 @@ Explore extracted and summarized information about the documents and terms in an {ref}/graph-explore-api.html[Endpoint documentation] [source,ts] ---- -client.graph.explore(...) +client.graph.explore({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names to search; use `_all` or empty string to perform the operation on all indices +** *`routing` (Optional, string)*: Specific routing value +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`connections` (Optional, { connections, query, vertices })* +** *`controls` (Optional, { sample_diversity, sample_size, timeout, use_significance })* +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* +** *`vertices` (Optional, { exclude, field, include, min_doc_count, shard_min_doc_count, size }[])* + [discrete] === ilm [discrete] @@ -1257,9 +2822,17 @@ Deletes the specified lifecycle policy definition. A currently used policy canno {ref}/ilm-delete-lifecycle.html[Endpoint documentation] [source,ts] ---- -client.ilm.deleteLifecycle(...) +client.ilm.deleteLifecycle({ policy }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`policy` (string)*: Identifier for the policy. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + [discrete] ==== explain_lifecycle Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step. @@ -1267,9 +2840,20 @@ Retrieves information about the index's current lifecycle state, such as the cur {ref}/ilm-explain-lifecycle.html[Endpoint documentation] [source,ts] ---- -client.ilm.explainLifecycle(...) +client.ilm.explainLifecycle({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: List of data streams, indices, and aliases to target. Supports wildcards (`*`). +To target all data streams and indices, use `*` or `_all`. +** *`only_errors` (Optional, boolean)*: Filters the returned indices to only indices that are managed by ILM and are in an error state, either due to an encountering an error while executing the policy, or attempting to use a policy that does not exist. +** *`only_managed` (Optional, boolean)*: Filters the returned indices to only indices that are managed by ILM. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + [discrete] ==== get_lifecycle Returns the specified policy definition. Includes the policy version and last modified date. @@ -1277,9 +2861,17 @@ Returns the specified policy definition. Includes the policy version and last mo {ref}/ilm-get-lifecycle.html[Endpoint documentation] [source,ts] ---- -client.ilm.getLifecycle(...) +client.ilm.getLifecycle({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`policy` (Optional, string)*: Identifier for the policy. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + [discrete] ==== get_status Retrieves the current index lifecycle management (ILM) status. @@ -1287,9 +2879,14 @@ Retrieves the current index lifecycle management (ILM) status. {ref}/ilm-get-status.html[Endpoint documentation] [source,ts] ---- -client.ilm.getStatus(...) +client.ilm.getStatus() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== migrate_to_data_tiers Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing @@ -1297,9 +2894,18 @@ Migrates the indices and ILM policies away from custom node attribute allocation {ref}/ilm-migrate-to-data-tiers.html[Endpoint documentation] [source,ts] ---- -client.ilm.migrateToDataTiers(...) +client.ilm.migrateToDataTiers({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`dry_run` (Optional, boolean)*: If true, simulates the migration from node attributes based allocation filters to data tiers, but does not perform the migration. +This provides a way to retrieve the indices and ILM policies that need to be migrated. +** *`legacy_template_to_delete` (Optional, string)* +** *`node_attribute` (Optional, string)* + [discrete] ==== move_to_step Manually moves an index into the specified step and executes that step. @@ -1307,9 +2913,17 @@ Manually moves an index into the specified step and executes that step. {ref}/ilm-move-to-step.html[Endpoint documentation] [source,ts] ---- -client.ilm.moveToStep(...) +client.ilm.moveToStep({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the index whose lifecycle step is to change +** *`current_step` (Optional, { action, name, phase })* +** *`next_step` (Optional, { action, name, phase })* + [discrete] ==== put_lifecycle Creates a lifecycle policy @@ -1317,9 +2931,17 @@ Creates a lifecycle policy {ref}/ilm-put-lifecycle.html[Endpoint documentation] [source,ts] ---- -client.ilm.putLifecycle(...) +client.ilm.putLifecycle({ policy }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`policy` (string)*: Identifier for the policy. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + [discrete] ==== remove_policy Removes the assigned lifecycle policy and stops managing the specified index @@ -1327,9 +2949,15 @@ Removes the assigned lifecycle policy and stops managing the specified index {ref}/ilm-remove-policy.html[Endpoint documentation] [source,ts] ---- -client.ilm.removePolicy(...) +client.ilm.removePolicy({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the index to remove policy on + [discrete] ==== retry Retries executing the policy for an index that is in the ERROR step. @@ -1337,9 +2965,15 @@ Retries executing the policy for an index that is in the ERROR step. {ref}/ilm-retry-policy.html[Endpoint documentation] [source,ts] ---- -client.ilm.retry(...) +client.ilm.retry({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the indices (comma-separated) whose failed lifecycle step is to be retry + [discrete] ==== start Start the index lifecycle management (ILM) plugin. @@ -1347,9 +2981,16 @@ Start the index lifecycle management (ILM) plugin. {ref}/ilm-start.html[Endpoint documentation] [source,ts] ---- -client.ilm.start(...) +client.ilm.start({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`master_timeout` (Optional, string | -1 | 0)* +** *`timeout` (Optional, string | -1 | 0)* + [discrete] ==== stop Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin @@ -1357,9 +2998,16 @@ Halts all lifecycle management operations and stops the index lifecycle manageme {ref}/ilm-stop.html[Endpoint documentation] [source,ts] ---- -client.ilm.stop(...) +client.ilm.stop({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`master_timeout` (Optional, string | -1 | 0)* +** *`timeout` (Optional, string | -1 | 0)* + [discrete] === indices [discrete] @@ -1369,9 +3017,21 @@ Adds a block to an index. {ref}/index-modules-blocks.html[Endpoint documentation] [source,ts] ---- -client.indices.addBlock(...) +client.indices.addBlock({ index, block }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: A comma separated list of indices to add a block to +** *`block` (Enum("metadata" | "read" | "read_only" | "write"))*: The block to add (one of read, write, read_only or metadata) +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== analyze Performs the analysis process on a text and return the tokens breakdown of the text. @@ -1379,9 +3039,24 @@ Performs the analysis process on a text and return the tokens breakdown of the t {ref}/indices-analyze.html[Endpoint documentation] [source,ts] ---- -client.indices.analyze(...) +client.indices.analyze({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string)*: The name of the index to scope the operation +** *`analyzer` (Optional, string)* +** *`attributes` (Optional, string[])* +** *`char_filter` (Optional, string | { type } | { type, mappings, mappings_path } | { type, flags, pattern, replacement } | { type, mode, name } | { type, normalize_kana, normalize_kanji }[])* +** *`explain` (Optional, boolean)* +** *`field` (Optional, string)* +** *`filter` (Optional, string | { type, preserve_original } | { type, common_words, common_words_path, ignore_case, query_mode } | { type, filter, script } | { type, delimiter, encoding } | { type, max_gram, min_gram, side, preserve_original } | { type, articles, articles_path, articles_case } | { type, max_output_size, separator } | { type, dedup, dictionary, locale, longest_only } | { type } | { type, mode, types } | { type, keep_words, keep_words_case, keep_words_path } | { type, ignore_case, keywords, keywords_path, keywords_pattern } | { type } | { type, max, min } | { type, consume_all_tokens, max_token_count } | { type, language } | { type, filters, preserve_original } | { type, max_gram, min_gram, preserve_original } | { type, stoptags } | { type, patterns, preserve_original } | { type, all, flags, pattern, replacement } | { type } | { type, script } | { type } | { type } | { type, filler_token, max_shingle_size, min_shingle_size, output_unigrams, output_unigrams_if_no_shingles, token_separator } | { type, language } | { type, rules, rules_path } | { type, language } | { type, ignore_case, remove_trailing, stopwords, stopwords_path } | { type, expand, format, lenient, synonyms, synonyms_path, tokenizer, updateable } | { type, expand, format, lenient, synonyms, synonyms_path, tokenizer, updateable } | { type } | { type, length } | { type, only_on_same_position } | { type } | { type, adjust_offsets, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, ignore_keywords, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, catenate_all, catenate_numbers, catenate_words, generate_number_parts, generate_word_parts, preserve_original, protected_words, protected_words_path, split_on_case_change, split_on_numerics, stem_english_possessive, type_table, type_table_path } | { type, minimum_length } | { type, use_romaji } | { type, stoptags } | { type, rule_files } | { type, alternate, caseFirst, caseLevel, country, decomposition, hiraganaQuaternaryMode, language, numeric, rules, strength, variableTop, variant } | { type, unicode_set_filter } | { type, name } | { type, dir, id } | { type, encoder, languageset, max_code_len, name_type, replace, rule_type } | { type }[])* +** *`normalizer` (Optional, string)* +** *`text` (Optional, string | string[])* +** *`tokenizer` (Optional, string | { type, tokenize_on_chars, max_token_length } | { type, custom_token_chars, max_gram, min_gram, token_chars } | { type, buffer_size } | { type } | { type } | { type, custom_token_chars, max_gram, min_gram, token_chars } | { type, decompound_mode, discard_punctuation, user_dictionary, user_dictionary_rules } | { type, buffer_size, delimiter, replacement, reverse, skip } | { type, max_token_length } | { type, max_token_length } | { type, max_token_length } | { type, discard_punctuation, mode, nbest_cost, nbest_examples, user_dictionary, user_dictionary_rules, discard_compound_token } | { type, flags, group, pattern } | { type, rule_files })* + [discrete] ==== clear_cache Clears all or specific caches for one or more indices. @@ -1389,9 +3064,22 @@ Clears all or specific caches for one or more indices. {ref}/indices-clearcache.html[Endpoint documentation] [source,ts] ---- -client.indices.clearCache(...) +client.indices.clearCache({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index name to limit the operation +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`fielddata` (Optional, boolean)*: Clear field data +** *`fields` (Optional, string | string[])*: A list of fields to clear when using the `fielddata` parameter (default: all) +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`query` (Optional, boolean)*: Clear query caches +** *`request` (Optional, boolean)*: Clear request cache + [discrete] ==== clone Clones an index @@ -1399,9 +3087,21 @@ Clones an index {ref}/indices-clone-index.html[Endpoint documentation] [source,ts] ---- -client.indices.clone(...) +client.indices.clone({ index, target }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the source index to clone +** *`target` (string)*: The name of the target index to clone into +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Set the number of active shards to wait for on the cloned index before the operation returns. +** *`aliases` (Optional, Record)* +** *`settings` (Optional, Record)* + [discrete] ==== close Closes an index. @@ -1409,9 +3109,21 @@ Closes an index. {ref}/indices-open-close.html[Endpoint documentation] [source,ts] ---- -client.indices.close(...) +client.indices.close({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A comma separated list of indices to close +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of active shards to wait for before the operation returns. + [discrete] ==== create Creates an index with optional settings and mappings. @@ -1419,9 +3131,24 @@ Creates an index with optional settings and mappings. {ref}/indices-create-index.html[Endpoint documentation] [source,ts] ---- -client.indices.create(...) +client.indices.create({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the index +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Set the number of active shards to wait for before the operation returns. +** *`aliases` (Optional, Record)* +** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, _data_stream_timestamp })*: Mapping for fields in the index. If specified, this mapping can include: +- Field names +- Field data types +- Mapping parameters +** *`settings` (Optional, { index, mode, routing_path, soft_deletes, sort, number_of_shards, number_of_replicas, number_of_routing_shards, check_on_startup, codec, routing_partition_size, load_fixed_bitset_filters_eagerly, hidden, auto_expand_replicas, merge, search, refresh_interval, max_result_window, max_inner_result_window, max_rescore_window, max_docvalue_fields_search, max_script_fields, max_ngram_diff, max_shingle_diff, blocks, max_refresh_listeners, analyze, highlight, max_terms_count, max_regex_length, routing, gc_deletes, default_pipeline, final_pipeline, lifecycle, provided_name, creation_date, creation_date_string, uuid, version, verified_before_close, format, max_slices_per_scroll, translog, query_string, priority, top_metrics_max_size, analysis, settings, time_series, shards, queries, similarity, mapping, indexing.slowlog, indexing_pressure, store })* + [discrete] ==== create_data_stream Creates a data stream @@ -1429,9 +3156,15 @@ Creates a data stream {ref}/data-streams.html[Endpoint documentation] [source,ts] ---- -client.indices.createDataStream(...) +client.indices.createDataStream({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the data stream + [discrete] ==== data_streams_stats Provides statistics on operations happening in a data stream. @@ -1439,9 +3172,16 @@ Provides statistics on operations happening in a data stream. {ref}/data-streams.html[Endpoint documentation] [source,ts] ---- -client.indices.dataStreamsStats(...) +client.indices.dataStreamsStats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string)*: A list of data stream names; use `_all` or empty string to perform the operation on all data streams +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])* + [discrete] ==== delete Deletes an index. @@ -1449,9 +3189,20 @@ Deletes an index. {ref}/indices-delete-index.html[Endpoint documentation] [source,ts] ---- -client.indices.delete(...) +client.indices.delete({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of indices to delete; use `_all` or `*` string to delete all indices +** *`allow_no_indices` (Optional, boolean)*: Ignore if a wildcard expression resolves to no concrete indices (default: false) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether wildcard expressions should get expanded to open, closed, or hidden indices +** *`ignore_unavailable` (Optional, boolean)*: Ignore unavailable indexes (default: false) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== delete_alias Deletes an alias. @@ -1459,9 +3210,18 @@ Deletes an alias. {ref}/indices-aliases.html[Endpoint documentation] [source,ts] ---- -client.indices.deleteAlias(...) +client.indices.deleteAlias({ index, name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names (supports wildcards); use `_all` for all indices +** *`name` (string | string[])*: A list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit timestamp for the document + [discrete] ==== delete_data_lifecycle Deletes the data lifecycle of the selected data streams. @@ -1469,9 +3229,18 @@ Deletes the data lifecycle of the selected data streams. {ref}/dlm-delete-lifecycle.html[Endpoint documentation] [source,ts] ---- -client.indices.deleteDataLifecycle(...) +client.indices.deleteDataLifecycle({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: A list of data streams of which the data lifecycle will be deleted; use `*` to get all data streams +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether wildcard expressions should get expanded to open or closed indices (default: open) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit timestamp for the document + [discrete] ==== delete_data_stream Deletes a data stream. @@ -1479,9 +3248,16 @@ Deletes a data stream. {ref}/data-streams.html[Endpoint documentation] [source,ts] ---- -client.indices.deleteDataStream(...) +client.indices.deleteDataStream({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: A list of data streams to delete; use `*` to delete all data streams +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether wildcard expressions should get expanded to open or closed indices (default: open) + [discrete] ==== delete_index_template Deletes an index template. @@ -1489,9 +3265,17 @@ Deletes an index template. {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.deleteIndexTemplate(...) +client.indices.deleteIndexTemplate({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: List of index template names used to limit the request. Wildcard (*) expressions are supported. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + [discrete] ==== delete_template Deletes an index template. @@ -1499,9 +3283,17 @@ Deletes an index template. {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.deleteTemplate(...) +client.indices.deleteTemplate({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the template +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== disk_usage Analyzes the disk usage of each field of an index or data stream @@ -1509,9 +3301,20 @@ Analyzes the disk usage of each field of an index or data stream {ref}/indices-disk-usage.html[Endpoint documentation] [source,ts] ---- -client.indices.diskUsage(...) +client.indices.diskUsage({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: List of data streams, indices, and aliases used to limit the request. It’s recommended to execute this API with a single index (or the latest backing index of a data stream) as the API consumes resources significantly. +** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports a list of values, such as open,hidden. +** *`flush` (Optional, boolean)*: If true, the API performs a flush before analysis. If false, the response may not include uncommitted data. +** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response. +** *`run_expensive_tasks` (Optional, boolean)*: Analyzing field disk usage is resource-intensive. To use the API, this parameter must be set to true. + [discrete] ==== downsample Downsample an index @@ -1519,9 +3322,16 @@ Downsample an index {ref}/xpack-rollup.html[Endpoint documentation] [source,ts] ---- -client.indices.downsample(...) +client.indices.downsample({ index, target_index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The index to downsample +** *`target_index` (string)*: The name of the target index to store downsampled data + [discrete] ==== exists Returns information about whether a particular index exists. @@ -1529,9 +3339,21 @@ Returns information about whether a particular index exists. {ref}/indices-exists.html[Endpoint documentation] [source,ts] ---- -client.indices.exists(...) +client.indices.exists({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names +** *`allow_no_indices` (Optional, boolean)*: Ignore if a wildcard expression resolves to no concrete indices (default: false) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether wildcard expressions should get expanded to open or closed indices (default: open) +** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false) +** *`ignore_unavailable` (Optional, boolean)*: Ignore unavailable indexes (default: false) +** *`include_defaults` (Optional, boolean)*: Whether to return all default setting for each of the indices. +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) + [discrete] ==== exists_alias Returns information about whether a particular alias exists. @@ -1539,9 +3361,20 @@ Returns information about whether a particular alias exists. {ref}/indices-aliases.html[Endpoint documentation] [source,ts] ---- -client.indices.existsAlias(...) +client.indices.existsAlias({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: A list of alias names to return +** *`index` (Optional, string | string[])*: A list of index names to filter aliases +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) + [discrete] ==== exists_index_template Returns information about whether a particular index template exists. @@ -1549,9 +3382,16 @@ Returns information about whether a particular index template exists. {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.existsIndexTemplate(...) +client.indices.existsIndexTemplate({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: List of index template names used to limit the request. Wildcard (*) expressions are supported. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. + [discrete] ==== exists_template Returns information about whether a particular index template exists. @@ -1559,9 +3399,18 @@ Returns information about whether a particular index template exists. {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.existsTemplate(...) +client.indices.existsTemplate({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: The comma separated names of the index templates +** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false) +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node + [discrete] ==== explain_data_lifecycle Retrieves information about the index's current DLM lifecycle, such as any potential encountered error, time since creation etc. @@ -1569,9 +3418,17 @@ Retrieves information about the index's current DLM lifecycle, such as any poten {ref}/dlm-explain-lifecycle.html[Endpoint documentation] [source,ts] ---- -client.indices.explainDataLifecycle(...) +client.indices.explainDataLifecycle({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: The name of the index to explain +** *`include_defaults` (Optional, boolean)*: indicates if the API should return the default values the system uses for the index's lifecycle +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master + [discrete] ==== field_usage_stats Returns the field usage stats for each field of an index @@ -1579,9 +3436,30 @@ Returns the field usage stats for each field of an index {ref}/field-usage-stats.html[Endpoint documentation] [source,ts] ---- -client.indices.fieldUsageStats(...) +client.indices.fieldUsageStats({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: List or wildcard expression of index names used to limit the request. +** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all value targets +only missing or closed indices. This behavior applies even if the request targets other open indices. +For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index +starts with `bar`. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument +determines whether wildcard expressions match hidden data streams. Supports a list of values, +such as `open,hidden`. +** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response. +** *`fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in the statistics. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails +and returns an error. +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: 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`). + [discrete] ==== flush Performs the flush operation on one or more indices. @@ -1589,9 +3467,20 @@ Performs the flush operation on one or more indices. {ref}/indices-flush.html[Endpoint documentation] [source,ts] ---- -client.indices.flush(...) +client.indices.flush({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string for all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`force` (Optional, boolean)*: Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`wait_if_ongoing` (Optional, boolean)*: If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running. + [discrete] ==== forcemerge Performs the force merge operation on one or more indices. @@ -1599,9 +3488,22 @@ Performs the force merge operation on one or more indices. {ref}/indices-forcemerge.html[Endpoint documentation] [source,ts] ---- -client.indices.forcemerge(...) +client.indices.forcemerge({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`flush` (Optional, boolean)*: Specify whether the index should be flushed after performing the operation (default: true) +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`max_num_segments` (Optional, number)*: The number of segments the index should be merged into (default: dynamic) +** *`only_expunge_deletes` (Optional, boolean)*: Specify whether the operation should only expunge deleted documents +** *`wait_for_completion` (Optional, boolean)*: Should the request wait until the force merge is completed. + [discrete] ==== get Returns information about one or more indices. @@ -1609,9 +3511,28 @@ Returns information about one or more indices. {ref}/indices-get-index.html[Endpoint documentation] [source,ts] ---- -client.indices.get(...) +client.indices.get({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: List of data streams, indices, and index aliases used to limit the request. +Wildcard expressions (*) are supported. +** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all value targets only +missing or closed indices. This behavior applies even if the request targets other open indices. For example, +a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard expressions can match. If the request can target data streams, this argument +determines whether wildcard expressions match hidden data streams. Supports a list of values, +such as open,hidden. +** *`flat_settings` (Optional, boolean)*: If true, returns settings in flat format. +** *`ignore_unavailable` (Optional, boolean)*: If false, requests that target a missing index return an error. +** *`include_defaults` (Optional, boolean)*: If true, return all default settings in the response. +** *`local` (Optional, boolean)*: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`features` (Optional, { name, description } | { name, description }[])*: Return only information on specified index features + [discrete] ==== get_alias Returns an alias. @@ -1619,9 +3540,20 @@ Returns an alias. {ref}/indices-aliases.html[Endpoint documentation] [source,ts] ---- -client.indices.getAlias(...) +client.indices.getAlias({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string | string[])*: A list of alias names to return +** *`index` (Optional, string | string[])*: A list of index names to filter aliases +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) + [discrete] ==== get_data_lifecycle Returns the data lifecycle of the selected data streams. @@ -1629,9 +3561,17 @@ Returns the data lifecycle of the selected data streams. {ref}/dlm-get-lifecycle.html[Endpoint documentation] [source,ts] ---- -client.indices.getDataLifecycle(...) +client.indices.getDataLifecycle({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: A list of data streams to get; use `*` to get all data streams +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether wildcard expressions should get expanded to open or closed indices (default: open) +** *`include_defaults` (Optional, boolean)*: Return all relevant default configurations for the data stream (default: false) + [discrete] ==== get_data_stream Returns data streams. @@ -1639,9 +3579,17 @@ Returns data streams. {ref}/data-streams.html[Endpoint documentation] [source,ts] ---- -client.indices.getDataStream(...) +client.indices.getDataStream({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string | string[])*: A list of data streams to get; use `*` to get all data streams +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether wildcard expressions should get expanded to open or closed indices (default: open) +** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template. + [discrete] ==== get_field_mapping Returns mapping for one or more fields. @@ -1649,9 +3597,21 @@ Returns mapping for one or more fields. {ref}/indices-get-field-mapping.html[Endpoint documentation] [source,ts] ---- -client.indices.getFieldMapping(...) +client.indices.getFieldMapping({ fields }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`fields` (string | string[])*: A list of fields +** *`index` (Optional, string | string[])*: A list of index names +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`include_defaults` (Optional, boolean)*: Whether the default mapping values should be returned as well +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) + [discrete] ==== get_index_template Returns an index template. @@ -1659,9 +3619,19 @@ Returns an index template. {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.getIndexTemplate(...) +client.indices.getIndexTemplate({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string)*: List of index template names used to limit the request. Wildcard (*) expressions are supported. +** *`local` (Optional, boolean)*: If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. +** *`flat_settings` (Optional, boolean)*: If true, returns settings in flat format. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template. + [discrete] ==== get_mapping Returns mappings for one or more indices. @@ -1669,9 +3639,20 @@ Returns mappings for one or more indices. {ref}/indices-get-mapping.html[Endpoint documentation] [source,ts] ---- -client.indices.getMapping(...) +client.indices.getMapping({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master + [discrete] ==== get_settings Returns settings for one or more indices. @@ -1679,9 +3660,23 @@ Returns settings for one or more indices. {ref}/indices-get-settings.html[Endpoint documentation] [source,ts] ---- -client.indices.getSettings(...) +client.indices.getSettings({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices +** *`name` (Optional, string | string[])*: The name of the settings that should be included +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false) +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`include_defaults` (Optional, boolean)*: Whether to return all default setting for each of the indices. +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master + [discrete] ==== get_template Returns an index template. @@ -1689,9 +3684,18 @@ Returns an index template. {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.getTemplate(...) +client.indices.getTemplate({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string | string[])*: The comma separated names of the index templates +** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false) +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node + [discrete] ==== migrate_to_data_stream Migrates an alias to a data stream @@ -1699,9 +3703,15 @@ Migrates an alias to a data stream {ref}/data-streams.html[Endpoint documentation] [source,ts] ---- -client.indices.migrateToDataStream(...) +client.indices.migrateToDataStream({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the alias to migrate + [discrete] ==== modify_data_stream Modifies a data stream @@ -1709,9 +3719,15 @@ Modifies a data stream {ref}/data-streams.html[Endpoint documentation] [source,ts] ---- -client.indices.modifyDataStream(...) +client.indices.modifyDataStream({ actions }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`actions` ({ add_backing_index, remove_backing_index }[])*: Actions to perform. + [discrete] ==== open Opens an index. @@ -1719,9 +3735,21 @@ Opens an index. {ref}/indices-open-close.html[Endpoint documentation] [source,ts] ---- -client.indices.open(...) +client.indices.open({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A comma separated list of indices to open +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Sets the number of active shards to wait for before the operation returns. + [discrete] ==== promote_data_stream Promotes a data stream from a replicated data stream managed by CCR to a regular data stream @@ -1729,9 +3757,15 @@ Promotes a data stream from a replicated data stream managed by CCR to a regular {ref}/data-streams.html[Endpoint documentation] [source,ts] ---- -client.indices.promoteDataStream(...) +client.indices.promoteDataStream({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the data stream + [discrete] ==== put_alias Creates or updates an alias. @@ -1739,9 +3773,23 @@ Creates or updates an alias. {ref}/indices-aliases.html[Endpoint documentation] [source,ts] ---- -client.indices.putAlias(...) +client.indices.putAlias({ index, name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. +** *`name` (string)*: The name of the alias to be created or updated +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit timestamp for the document +** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* +** *`index_routing` (Optional, string)* +** *`is_write_index` (Optional, boolean)* +** *`routing` (Optional, string)* +** *`search_routing` (Optional, string)* + [discrete] ==== put_data_lifecycle Updates the data lifecycle of the selected data streams. @@ -1749,9 +3797,19 @@ Updates the data lifecycle of the selected data streams. {ref}/dlm-put-lifecycle.html[Endpoint documentation] [source,ts] ---- -client.indices.putDataLifecycle(...) +client.indices.putDataLifecycle({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: A list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether wildcard expressions should get expanded to open or closed indices (default: open) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit timestamp for the document +** *`data_retention` (Optional, string | -1 | 0)* + [discrete] ==== put_index_template Creates or updates an index template. @@ -1759,9 +3817,23 @@ Creates or updates an index template. {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.putIndexTemplate(...) +client.indices.putIndexTemplate({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: Index or template name +** *`create` (Optional, boolean)*: Whether the index template should only be added if new or can also replace an existing one +** *`index_patterns` (Optional, string | string[])* +** *`composed_of` (Optional, string[])* +** *`template` (Optional, { aliases, mappings, settings, lifecycle })* +** *`data_stream` (Optional, { hidden })* +** *`priority` (Optional, number)* +** *`version` (Optional, number)* +** *`_meta` (Optional, Record)* + [discrete] ==== put_mapping Updates the index mappings. @@ -1769,9 +3841,40 @@ Updates the index mappings. {ref}/indices-put-mapping.html[Endpoint documentation] [source,ts] ---- -client.indices.putMapping(...) +client.indices.putMapping({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`write_index_only` (Optional, boolean)*: When true, applies mappings only to the write index of an alias or data stream +** *`date_detection` (Optional, boolean)*: Controls whether dynamic date detection is enabled. +** *`dynamic` (Optional, Enum("strict" | "runtime" | true | false))*: Controls whether new fields are added dynamically. +** *`dynamic_date_formats` (Optional, string[])*: If date detection is enabled then new string fields are checked +against 'dynamic_date_formats' and if the value matches then +a new date field is added instead of string. +** *`dynamic_templates` (Optional, Record | Record[])*: Specify dynamic templates for the mapping. +** *`_field_names` (Optional, { enabled })*: Control whether field names are enabled for the index. +** *`_meta` (Optional, Record)*: A mapping type can have custom meta data associated with it. These are +not used at all by Elasticsearch, but can be used to store +application-specific metadata. +** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields. +** *`properties` (Optional, Record)*: Mapping for a field. For new fields, this mapping can include: + +- Field name +- Field data type +- Mapping parameters +** *`_routing` (Optional, { required })*: Enable making a routing value required on indexed documents. +** *`_source` (Optional, { compress, compress_threshold, enabled, excludes, includes, mode })*: Control whether the _source field is enabled on the index. +** *`runtime` (Optional, Record)*: Mapping of runtime fields for the index. + [discrete] ==== put_settings Updates the index settings. @@ -1779,9 +3882,22 @@ Updates the index settings. {ref}/indices-update-settings.html[Endpoint documentation] [source,ts] ---- -client.indices.putSettings(...) +client.indices.putSettings({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`flat_settings` (Optional, boolean)*: Return settings in flat format (default: false) +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`preserve_existing` (Optional, boolean)*: Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false` +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== put_template Creates or updates an index template. @@ -1789,9 +3905,32 @@ Creates or updates an index template. {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.putTemplate(...) +client.indices.putTemplate({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the template +** *`create` (Optional, boolean)*: If true, this request cannot replace or update existing index templates. +** *`flat_settings` (Optional, boolean)* +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)* +** *`order` (Optional, number)*: Order in which Elasticsearch applies this template if index +matches multiple templates. + +Templates with lower 'order' values are merged first. Templates with higher +'order' values are merged later, overriding templates with lower values. +** *`aliases` (Optional, Record)*: Aliases for the index. +** *`index_patterns` (Optional, string | string[])*: Array of wildcard expressions used to match the names +of indices during creation. +** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, _data_stream_timestamp })*: Mapping for fields in the index. +** *`settings` (Optional, Record)*: Configuration options for the index. +** *`version` (Optional, number)*: Version number used to manage index templates externally. This number +is not automatically generated by Elasticsearch. + [discrete] ==== recovery Returns information about ongoing index shard recoveries. @@ -1799,9 +3938,17 @@ Returns information about ongoing index shard recoveries. {ref}/indices-recovery.html[Endpoint documentation] [source,ts] ---- -client.indices.recovery(...) +client.indices.recovery({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices +** *`active_only` (Optional, boolean)*: Display only those recoveries that are currently on-going +** *`detailed` (Optional, boolean)*: Whether to display detailed information about shard recovery + [discrete] ==== refresh Performs the refresh operation in one or more indices. @@ -1809,9 +3956,18 @@ Performs the refresh operation in one or more indices. {ref}/indices-refresh.html[Endpoint documentation] [source,ts] ---- -client.indices.refresh(...) +client.indices.refresh({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) + [discrete] ==== reload_search_analyzers Reloads an index's search analyzers and their resources. @@ -1819,9 +3975,18 @@ Reloads an index's search analyzers and their resources. {ref}/indices-reload-analyzers.html[Endpoint documentation] [source,ts] ---- -client.indices.reloadSearchAnalyzers(...) +client.indices.reloadSearchAnalyzers({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: A list of index names to reload analyzers for +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) + [discrete] ==== resolve_index Returns information about any matching indices, aliases, and data streams @@ -1829,9 +3994,16 @@ Returns information about any matching indices, aliases, and data streams {ref}/indices-resolve-index-api.html[Endpoint documentation] [source,ts] ---- -client.indices.resolveIndex(...) +client.indices.resolveIndex({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: A list of names or wildcard expressions +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether wildcard expressions should get expanded to open or closed indices (default: open) + [discrete] ==== rollover Updates an alias to point to a new index when the existing index @@ -1840,9 +4012,24 @@ is considered to be too large or too old. {ref}/indices-rollover-index.html[Endpoint documentation] [source,ts] ---- -client.indices.rollover(...) +client.indices.rollover({ alias }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`alias` (string)*: The name of the alias to rollover +** *`new_index` (Optional, string)*: The name of the rollover index +** *`dry_run` (Optional, boolean)*: If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Set the number of active shards to wait for on the newly created rollover index before the operation returns. +** *`aliases` (Optional, Record)* +** *`conditions` (Optional, { min_age, max_age, max_age_millis, min_docs, max_docs, max_size, max_size_bytes, min_size, min_size_bytes, max_primary_shard_size, max_primary_shard_size_bytes, min_primary_shard_size, min_primary_shard_size_bytes, max_primary_shard_docs, min_primary_shard_docs })* +** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, _data_stream_timestamp })* +** *`settings` (Optional, Record)* + [discrete] ==== segments Provides low-level information about segments in a Lucene index. @@ -1850,9 +4037,19 @@ Provides low-level information about segments in a Lucene index. {ref}/indices-segments.html[Endpoint documentation] [source,ts] ---- -client.indices.segments(...) +client.indices.segments({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`verbose` (Optional, boolean)*: Includes detailed memory usage by Lucene. + [discrete] ==== shard_stores Provides store information for shard copies of indices. @@ -1860,9 +4057,22 @@ Provides store information for shard copies of indices. {ref}/indices-shards-stores.html[Endpoint documentation] [source,ts] ---- -client.indices.shardStores(...) +client.indices.shardStores({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases used to limit the request. +** *`allow_no_indices` (Optional, boolean)*: If false, the request returns an error if any wildcard expression, index alias, or _all +value targets only missing or closed indices. This behavior applies even if the request +targets other open indices. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, +this argument determines whether wildcard expressions match hidden data streams. +** *`ignore_unavailable` (Optional, boolean)*: If true, missing or closed indices are not included in the response. +** *`status` (Optional, Enum("green" | "yellow" | "red" | "all") | Enum("green" | "yellow" | "red" | "all")[])*: List of shard health statuses used to limit the request. + [discrete] ==== shrink Allow to shrink an existing index into a new index with fewer primary shards. @@ -1870,9 +4080,21 @@ Allow to shrink an existing index into a new index with fewer primary shards. {ref}/indices-shrink-index.html[Endpoint documentation] [source,ts] ---- -client.indices.shrink(...) +client.indices.shrink({ index, target }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the source index to shrink +** *`target` (string)*: The name of the target index to shrink into +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Set the number of active shards to wait for on the shrunken index before the operation returns. +** *`aliases` (Optional, Record)* +** *`settings` (Optional, Record)* + [discrete] ==== simulate_index_template Simulate matching the given index name against the index templates in the system @@ -1880,9 +4102,31 @@ Simulate matching the given index name against the index templates in the system {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.simulateIndexTemplate(...) +client.indices.simulateIndexTemplate({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: Index or template name to simulate +** *`create` (Optional, boolean)*: If `true`, the template passed in the body is only used if no existing +templates match the same index patterns. If `false`, the simulation uses +the template with the highest priority. Note that the template is not +permanently added or updated in either case; it is only used for the +simulation. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template. +** *`allow_auto_create` (Optional, boolean)* +** *`index_patterns` (Optional, string | string[])* +** *`composed_of` (Optional, string[])* +** *`template` (Optional, { aliases, mappings, settings, lifecycle })* +** *`data_stream` (Optional, { hidden })* +** *`priority` (Optional, number)* +** *`version` (Optional, number)* +** *`_meta` (Optional, Record)* + [discrete] ==== simulate_template Simulate resolving the given template name or body @@ -1890,9 +4134,19 @@ Simulate resolving the given template name or body {ref}/indices-templates.html[Endpoint documentation] [source,ts] ---- -client.indices.simulateTemplate(...) +client.indices.simulateTemplate({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string)*: Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit +this parameter and specify the template configuration in the request body. +** *`create` (Optional, boolean)*: If true, the template passed in the body is only used if no existing templates match the same index patterns. If false, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`include_defaults` (Optional, boolean)*: If true, returns all relevant default configurations for the index template. + [discrete] ==== split Allows you to split an existing index into a new index with more primary shards. @@ -1900,9 +4154,21 @@ Allows you to split an existing index into a new index with more primary shards. {ref}/indices-split-index.html[Endpoint documentation] [source,ts] ---- -client.indices.split(...) +client.indices.split({ index, target }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the source index to split +** *`target` (string)*: The name of the target index to split into +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_active_shards` (Optional, number | Enum("all" | "index-setting"))*: Set the number of active shards to wait for on the shrunken index before the operation returns. +** *`aliases` (Optional, Record)* +** *`settings` (Optional, Record)* + [discrete] ==== stats Provides statistics on operations happening in an index. @@ -1910,9 +4176,27 @@ Provides statistics on operations happening in an index. {ref}/indices-stats.html[Endpoint documentation] [source,ts] ---- -client.indices.stats(...) +client.indices.stats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`metric` (Optional, string | string[])*: Limit the information returned the specific metrics. +** *`index` (Optional, string | string[])*: A list of index names; use `_all` or empty string to perform the operation on all indices +** *`completion_fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in fielddata and suggest statistics. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument +determines whether wildcard expressions match hidden data streams. Supports a list of values, +such as `open,hidden`. +** *`fielddata_fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in fielddata statistics. +** *`fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in the statistics. +** *`forbid_closed_indices` (Optional, boolean)*: If true, statistics are not collected from closed indices. +** *`groups` (Optional, string | string[])*: List of search groups to include in the search statistics. +** *`include_segment_file_sizes` (Optional, boolean)*: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). +** *`include_unloaded_segments` (Optional, boolean)*: If true, the response includes information from segments that are not loaded into memory. +** *`level` (Optional, Enum("cluster" | "indices" | "shards"))*: Indicates whether statistics are aggregated at the cluster, index, or shard level. + [discrete] ==== unfreeze Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again. @@ -1920,9 +4204,21 @@ Unfreezes an index. When a frozen index is unfrozen, the index goes through the {ref}/unfreeze-index-api.html[Endpoint documentation] [source,ts] ---- -client.indices.unfreeze(...) +client.indices.unfreeze({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string)*: The name of the index to unfreeze +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_active_shards` (Optional, string)*: Sets the number of active shards to wait for before the operation returns. + [discrete] ==== update_aliases Updates index aliases. @@ -1930,9 +4226,17 @@ Updates index aliases. {ref}/indices-aliases.html[Endpoint documentation] [source,ts] ---- -client.indices.updateAliases(...) +client.indices.updateAliases({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`master_timeout` (Optional, string | -1 | 0)*: Specify timeout for connection to master +** *`timeout` (Optional, string | -1 | 0)*: Request timeout +** *`actions` (Optional, { add_backing_index, remove_backing_index }[])* + [discrete] ==== validate_query Allows a user to validate a potentially expensive query without executing it. @@ -1940,9 +4244,28 @@ Allows a user to validate a potentially expensive query without executing it. {ref}/search-validate.html[Endpoint documentation] [source,ts] ---- -client.indices.validateQuery(...) +client.indices.validateQuery({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`all_shards` (Optional, boolean)*: Execute validation on all shards instead of one random shard per index +** *`analyzer` (Optional, string)*: The analyzer to use for the query string +** *`analyze_wildcard` (Optional, boolean)*: Specify whether wildcard and prefix queries should be analyzed (default: false) +** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query (AND or OR) +** *`df` (Optional, string)*: The field to use as default where no field prefix is given in the query string +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`explain` (Optional, boolean)*: Return detailed information about the error +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored +** *`rewrite` (Optional, boolean)*: Provide a more detailed explanation showing the actual Lucene query that will be executed. +** *`q` (Optional, string)*: Query in the Lucene query string syntax +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* + [discrete] === ingest [discrete] @@ -1952,9 +4275,17 @@ Deletes a pipeline. {ref}/delete-pipeline-api.html[Endpoint documentation] [source,ts] ---- -client.ingest.deletePipeline(...) +client.ingest.deletePipeline({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Pipeline ID +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== geo_ip_stats Returns statistical information about geoip databases @@ -1962,9 +4293,14 @@ Returns statistical information about geoip databases {ref}/geoip-stats-api.html[Endpoint documentation] [source,ts] ---- -client.ingest.geoIpStats(...) +client.ingest.geoIpStats() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== get_pipeline Returns a pipeline. @@ -1972,9 +4308,17 @@ Returns a pipeline. {ref}/get-pipeline-api.html[Endpoint documentation] [source,ts] ---- -client.ingest.getPipeline(...) +client.ingest.getPipeline({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: Comma separated list of pipeline ids. Wildcards supported +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`summary` (Optional, boolean)*: Return pipelines without their definitions (default: false) + [discrete] ==== processor_grok Returns a list of the built-in patterns. @@ -1982,9 +4326,14 @@ Returns a list of the built-in patterns. {ref}/grok-processor.html[Endpoint documentation] [source,ts] ---- -client.ingest.processorGrok(...) +client.ingest.processorGrok() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== put_pipeline Creates or updates a pipeline. @@ -1992,9 +4341,23 @@ Creates or updates a pipeline. {ref}/put-pipeline-api.html[Endpoint documentation] [source,ts] ---- -client.ingest.putPipeline(...) +client.ingest.putPipeline({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: ID of the ingest pipeline to create or update. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. +** *`if_version` (Optional, number)*: Required version for optimistic concurrency control for pipeline updates +** *`_meta` (Optional, Record)*: Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch. +** *`description` (Optional, string)*: Description of the ingest pipeline. +** *`on_failure` (Optional, { attachment, append, csv, convert, date, date_index_name, dot_expander, enrich, fail, foreach, json, user_agent, kv, geoip, grok, gsub, join, lowercase, remove, rename, script, set, sort, split, trim, uppercase, urldecode, bytes, dissect, set_security_user, pipeline, drop, circle, inference }[])*: Processors to run immediately after a processor failure. Each processor supports a processor-level `on_failure` value. If a processor without an `on_failure` value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline's remaining processors. +** *`processors` (Optional, { attachment, append, csv, convert, date, date_index_name, dot_expander, enrich, fail, foreach, json, user_agent, kv, geoip, grok, gsub, join, lowercase, remove, rename, script, set, sort, split, trim, uppercase, urldecode, bytes, dissect, set_security_user, pipeline, drop, circle, inference }[])*: Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified. +** *`version` (Optional, number)*: Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers. + [discrete] ==== simulate Allows to simulate a pipeline with example documents. @@ -2002,9 +4365,18 @@ Allows to simulate a pipeline with example documents. {ref}/simulate-pipeline-api.html[Endpoint documentation] [source,ts] ---- -client.ingest.simulate(...) +client.ingest.simulate({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: Pipeline ID +** *`verbose` (Optional, boolean)*: Verbose mode. Display data output for each processor in executed pipeline +** *`docs` (Optional, { _id, _index, _source }[])* +** *`pipeline` (Optional, { description, on_failure, processors, version })* + [discrete] === license [discrete] @@ -2014,9 +4386,14 @@ Deletes licensing information for the cluster {ref}/delete-license.html[Endpoint documentation] [source,ts] ---- -client.license.delete(...) +client.license.delete() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== get Retrieves licensing information for the cluster @@ -2024,9 +4401,17 @@ Retrieves licensing information for the cluster {ref}/get-license.html[Endpoint documentation] [source,ts] ---- -client.license.get(...) +client.license.get({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`accept_enterprise` (Optional, boolean)*: If `true`, this parameter returns enterprise for Enterprise license types. If `false`, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility. +This parameter is deprecated and will always be set to true in 8.x. +** *`local` (Optional, boolean)*: Specifies whether to retrieve local information. The default value is `false`, which means the information is retrieved from the master node. + [discrete] ==== get_basic_status Retrieves information about the status of the basic license. @@ -2034,9 +4419,14 @@ Retrieves information about the status of the basic license. {ref}/get-basic-status.html[Endpoint documentation] [source,ts] ---- -client.license.getBasicStatus(...) +client.license.getBasicStatus() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== get_trial_status Retrieves information about the status of the trial license. @@ -2044,9 +4434,14 @@ Retrieves information about the status of the trial license. {ref}/get-trial-status.html[Endpoint documentation] [source,ts] ---- -client.license.getTrialStatus(...) +client.license.getTrialStatus() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== post Updates the license for the cluster. @@ -2054,9 +4449,17 @@ Updates the license for the cluster. {ref}/update-license.html[Endpoint documentation] [source,ts] ---- -client.license.post(...) +client.license.post({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`acknowledge` (Optional, boolean)*: Specifies whether you acknowledge the license changes. +** *`license` (Optional, { expiry_date_in_millis, issue_date_in_millis, start_date_in_millis, issued_to, issuer, max_nodes, max_resource_units, signature, type, uid })* +** *`licenses` (Optional, { expiry_date_in_millis, issue_date_in_millis, start_date_in_millis, issued_to, issuer, max_nodes, max_resource_units, signature, type, uid }[])*: A sequence of one or more JSON documents containing the license information. + [discrete] ==== post_start_basic Starts an indefinite basic license. @@ -2064,9 +4467,15 @@ Starts an indefinite basic license. {ref}/start-basic.html[Endpoint documentation] [source,ts] ---- -client.license.postStartBasic(...) +client.license.postStartBasic({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`acknowledge` (Optional, boolean)*: whether the user has acknowledged acknowledge messages (default: false) + [discrete] ==== post_start_trial starts a limited time trial license. @@ -2074,9 +4483,16 @@ starts a limited time trial license. {ref}/start-trial.html[Endpoint documentation] [source,ts] ---- -client.license.postStartTrial(...) +client.license.postStartTrial({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`acknowledge` (Optional, boolean)*: whether the user has acknowledged acknowledge messages (default: false) +** *`type_query_string` (Optional, string)* + [discrete] === logstash [discrete] @@ -2086,9 +4502,15 @@ Deletes Logstash Pipelines used by Central Management {ref}/logstash-api-delete-pipeline.html[Endpoint documentation] [source,ts] ---- -client.logstash.deletePipeline(...) +client.logstash.deletePipeline({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The ID of the Pipeline + [discrete] ==== get_pipeline Retrieves Logstash Pipelines used by Central Management @@ -2096,9 +4518,15 @@ Retrieves Logstash Pipelines used by Central Management {ref}/logstash-api-get-pipeline.html[Endpoint documentation] [source,ts] ---- -client.logstash.getPipeline(...) +client.logstash.getPipeline({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string | string[])*: A list of Pipeline IDs + [discrete] ==== put_pipeline Adds and updates Logstash Pipelines used for Central Management @@ -2106,9 +4534,15 @@ Adds and updates Logstash Pipelines used for Central Management {ref}/logstash-api-put-pipeline.html[Endpoint documentation] [source,ts] ---- -client.logstash.putPipeline(...) +client.logstash.putPipeline({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The ID of the Pipeline + [discrete] === migration [discrete] @@ -2118,9 +4552,15 @@ Retrieves information about different cluster, node, and index level settings th {ref}/migration-api-deprecation.html[Endpoint documentation] [source,ts] ---- -client.migration.deprecations(...) +client.migration.deprecations({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string)*: Comma-separate list of data streams or indices to check. Wildcard (*) expressions are supported. + [discrete] ==== get_feature_upgrade_status Find out whether system features need to be upgraded or not @@ -2128,9 +4568,14 @@ Find out whether system features need to be upgraded or not {ref}/migration-api-feature-upgrade.html[Endpoint documentation] [source,ts] ---- -client.migration.getFeatureUpgradeStatus(...) +client.migration.getFeatureUpgradeStatus() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== post_feature_upgrade Begin upgrades for system features @@ -2138,9 +4583,14 @@ Begin upgrades for system features {ref}/migration-api-feature-upgrade.html[Endpoint documentation] [source,ts] ---- -client.migration.postFeatureUpgrade(...) +client.migration.postFeatureUpgrade() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] === ml [discrete] @@ -2150,9 +4600,15 @@ Clear the cached results from a trained model deployment {ref}/clear-trained-model-deployment-cache.html[Endpoint documentation] [source,ts] ---- -client.ml.clearTrainedModelDeploymentCache(...) +client.ml.clearTrainedModelDeploymentCache({ model_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (string)*: The unique identifier of the trained model. + [discrete] ==== close_job Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. @@ -2160,9 +4616,20 @@ Closes one or more anomaly detection jobs. A job can be opened and closed multip {ref}/ml-close-job.html[Endpoint documentation] [source,ts] ---- -client.ml.closeJob(...) +client.ml.closeJob({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. It can be a job identifier, a group name, or a wildcard expression. You can close multiple anomaly detection jobs in a single API request by using a group name, a list of jobs, or a wildcard expression. You can close all jobs by using `_all` or by specifying `*` as the job identifier. +** *`allow_no_match` (Optional, boolean)*: 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; or contains wildcard expressions and there are only partial matches. By default, it returns an empty jobs 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. +** *`force` (Optional, boolean)*: Use to close a failed job, or to forcefully close a job which has not responded to its initial close request; the request returns without performing the associated actions such as flushing buffers and persisting the model snapshots. +If you want the job to be in a consistent state after the close job API returns, do not set to `true`. This parameter should be used only in situations where the job has already failed or where you are not interested in results the job might have recently produced or might produce in the future. +** *`timeout` (Optional, string | -1 | 0)*: Controls the time to wait until a job has closed. + [discrete] ==== delete_calendar Deletes a calendar. @@ -2170,9 +4637,15 @@ Deletes a calendar. {ref}/ml-delete-calendar.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteCalendar(...) +client.ml.deleteCalendar({ calendar_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`calendar_id` (string)*: A string that uniquely identifies a calendar. + [discrete] ==== delete_calendar_event Deletes scheduled events from a calendar. @@ -2180,9 +4653,16 @@ Deletes scheduled events from a calendar. {ref}/ml-delete-calendar-event.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteCalendarEvent(...) +client.ml.deleteCalendarEvent({ calendar_id, event_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`calendar_id` (string)*: The ID of the calendar to modify +** *`event_id` (string)*: The ID of the event to remove from the calendar + [discrete] ==== delete_calendar_job Deletes anomaly detection jobs from a calendar. @@ -2190,9 +4670,17 @@ Deletes anomaly detection jobs from a calendar. {ref}/ml-delete-calendar-job.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteCalendarJob(...) +client.ml.deleteCalendarJob({ calendar_id, job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`calendar_id` (string)*: A string that uniquely identifies a calendar. +** *`job_id` (string | string[])*: An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a +list of jobs or groups. + [discrete] ==== delete_data_frame_analytics Deletes an existing data frame analytics job. @@ -2200,9 +4688,17 @@ Deletes an existing data frame analytics job. {ref}/delete-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteDataFrameAnalytics(...) +client.ml.deleteDataFrameAnalytics({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Identifier for the data frame analytics job. +** *`force` (Optional, boolean)*: If `true`, it deletes a job that is not stopped; this method is quicker than stopping and deleting the job. +** *`timeout` (Optional, string | -1 | 0)*: The time to wait for the job to be deleted. + [discrete] ==== delete_datafeed Deletes an existing datafeed. @@ -2210,9 +4706,20 @@ Deletes an existing datafeed. {ref}/ml-delete-datafeed.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteDatafeed(...) +client.ml.deleteDatafeed({ datafeed_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed. This +identifier can contain lowercase alphanumeric characters (a-z and 0-9), +hyphens, and underscores. It must start and end with alphanumeric +characters. +** *`force` (Optional, boolean)*: Use to forcefully delete a started datafeed; this method is quicker than +stopping and deleting the datafeed. + [discrete] ==== delete_expired_data Deletes expired and unused machine learning data. @@ -2220,9 +4727,19 @@ Deletes expired and unused machine learning data. {ref}/ml-delete-expired-data.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteExpiredData(...) +client.ml.deleteExpiredData({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (Optional, string)*: Identifier for an anomaly detection job. It can be a job identifier, a +group name, or a wildcard expression. +** *`requests_per_second` (Optional, float)*: The desired requests per second for the deletion processes. The default +behavior is no throttling. +** *`timeout` (Optional, string | -1 | 0)*: How long can the underlying delete processes run until they are canceled. + [discrete] ==== delete_filter Deletes a filter. @@ -2230,9 +4747,15 @@ Deletes a filter. {ref}/ml-delete-filter.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteFilter(...) +client.ml.deleteFilter({ filter_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`filter_id` (string)*: A string that uniquely identifies a filter. + [discrete] ==== delete_forecast Deletes forecasts from a machine learning job. @@ -2240,9 +4763,25 @@ Deletes forecasts from a machine learning job. {ref}/ml-delete-forecast.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteForecast(...) +client.ml.deleteForecast({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`forecast_id` (Optional, string)*: A list of forecast identifiers. If you do not specify +this optional parameter or if you specify `_all` or `*` the API deletes +all forecasts from the job. +** *`allow_no_forecasts` (Optional, boolean)*: Specifies whether an error occurs when there are no forecasts. In +particular, if this parameter is set to `false` and there are no +forecasts associated with the job, attempts to delete all forecasts +return an error. +** *`timeout` (Optional, string | -1 | 0)*: Specifies the period of time to wait for the completion of the delete +operation. When this period of time elapses, the API fails and returns an +error. + [discrete] ==== delete_job Deletes an existing anomaly detection job. @@ -2250,9 +4789,22 @@ Deletes an existing anomaly detection job. {ref}/ml-delete-job.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteJob(...) +client.ml.deleteJob({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`force` (Optional, boolean)*: Use to forcefully delete an opened job; this method is quicker than +closing and deleting the job. +** *`delete_user_annotations` (Optional, boolean)*: Specifies whether annotations that have been added by the +user should be deleted along with any auto-generated annotations when the job is +reset. +** *`wait_for_completion` (Optional, boolean)*: Specifies whether the request should return immediately or wait until the +job deletion completes. + [discrete] ==== delete_model_snapshot Deletes an existing model snapshot. @@ -2260,9 +4812,16 @@ Deletes an existing model snapshot. {ref}/ml-delete-snapshot.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteModelSnapshot(...) +client.ml.deleteModelSnapshot({ job_id, snapshot_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`snapshot_id` (string)*: Identifier for the model snapshot. + [discrete] ==== delete_trained_model Deletes an existing trained inference model that is currently not referenced by an ingest pipeline. @@ -2270,9 +4829,16 @@ Deletes an existing trained inference model that is currently not referenced by {ref}/delete-trained-models.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteTrainedModel(...) +client.ml.deleteTrainedModel({ model_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (string)*: The unique identifier of the trained model. +** *`force` (Optional, boolean)*: Forcefully deletes a trained model that is referenced by ingest pipelines or has a started deployment. + [discrete] ==== delete_trained_model_alias Deletes a model alias that refers to the trained model @@ -2280,9 +4846,16 @@ Deletes a model alias that refers to the trained model {ref}/delete-trained-models-aliases.html[Endpoint documentation] [source,ts] ---- -client.ml.deleteTrainedModelAlias(...) +client.ml.deleteTrainedModelAlias({ model_alias, model_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_alias` (string)*: The model alias to delete. +** *`model_id` (string)*: The trained model ID to which the model alias refers. + [discrete] ==== estimate_model_memory Estimates the model memory @@ -2290,9 +4863,28 @@ Estimates the model memory {ref}/ml-apis.html[Endpoint documentation] [source,ts] ---- -client.ml.estimateModelMemory(...) +client.ml.estimateModelMemory({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`analysis_config` (Optional, { bucket_span, categorization_analyzer, categorization_field_name, categorization_filters, detectors, influencers, latency, model_prune_window, multivariate_by_fields, per_partition_categorization, summary_count_field_name })*: For a list of the properties that you can specify in the +`analysis_config` component of the body of this API. +** *`max_bucket_cardinality` (Optional, Record)*: Estimates of the highest cardinality in a single bucket that is observed +for influencer fields over the time period that the job analyzes data. +To produce a good answer, values must be provided for all influencer +fields. Providing values for fields that are not listed as `influencers` +has no effect on the estimation. +** *`overall_cardinality` (Optional, Record)*: Estimates of the cardinality that is observed for fields over the whole +time period that the job analyzes data. To produce a good answer, values +must be provided for fields referenced in the `by_field_name`, +`over_field_name` and `partition_field_name` of any detectors. Providing +values for other fields has no effect on the estimation. It can be +omitted from the request if no detectors have a `by_field_name`, +`over_field_name` or `partition_field_name`. + [discrete] ==== evaluate_data_frame Evaluates the data frame analytics for an annotated index. @@ -2300,9 +4892,17 @@ Evaluates the data frame analytics for an annotated index. {ref}/evaluate-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.ml.evaluateDataFrame(...) +client.ml.evaluateDataFrame({ evaluation, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`evaluation` ({ classification, outlier_detection, regression })*: Defines the type of evaluation you want to perform. +** *`index` (string)*: Defines the `index` in which the evaluation will be performed. +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: A query clause that retrieves a subset of data from the source index. + [discrete] ==== explain_data_frame_analytics Explains a data frame analytics config. @@ -2310,9 +4910,41 @@ Explains a data frame analytics config. {ref}/explain-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.ml.explainDataFrameAnalytics(...) +client.ml.explainDataFrameAnalytics({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: Identifier for the data frame analytics job. This identifier can contain +lowercase alphanumeric characters (a-z and 0-9), hyphens, and +underscores. It must start and end with alphanumeric characters. +** *`source` (Optional, { index, query, runtime_mappings, _source })*: The configuration of how to source the analysis data. It requires an +index. Optionally, query and _source may be specified. +** *`dest` (Optional, { index, results_field })*: The destination configuration, consisting of index and optionally +results_field (ml by default). +** *`analysis` (Optional, { classification, outlier_detection, regression })*: The analysis configuration, which contains the information necessary to +perform one of the following types of analysis: classification, outlier +detection, or regression. +** *`description` (Optional, string)*: A description of the job. +** *`model_memory_limit` (Optional, string)*: The approximate maximum amount of memory resources that are permitted for +analytical processing. If your `elasticsearch.yml` file contains an +`xpack.ml.max_model_memory_limit` setting, an error occurs when you try to +create data frame analytics jobs that have `model_memory_limit` values +greater than that setting. +** *`max_num_threads` (Optional, number)*: The maximum number of threads to be used by the analysis. Using more +threads may decrease the time necessary to complete the analysis at the +cost of using more CPU. Note that the process may use additional threads +for operational functionality other than the analysis itself. +** *`analyzed_fields` (Optional, { includes, excludes })*: Specify includes and/or excludes patterns to select which fields will be +included in the analysis. The patterns specified in excludes are applied +last, therefore excludes takes precedence. In other words, if the same +field is specified in both includes and excludes, then the field will not +be included in the analysis. +** *`allow_lazy_start` (Optional, boolean)*: Specifies whether this job can start when there is insufficient machine +learning node capacity for it to be immediately assigned to a node. + [discrete] ==== flush_job Forces any buffered data to be processed by the job. @@ -2320,9 +4952,25 @@ Forces any buffered data to be processed by the job. {ref}/ml-flush-job.html[Endpoint documentation] [source,ts] ---- -client.ml.flushJob(...) +client.ml.flushJob({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`advance_time` (Optional, string | Unit)*: Specifies to advance to a particular time value. Results are generated +and the model is updated for data from the specified time interval. +** *`calc_interim` (Optional, boolean)*: If true, calculates the interim results for the most recent bucket or all +buckets within the latency period. +** *`end` (Optional, string | Unit)*: When used in conjunction with `calc_interim` and `start`, specifies the +range of buckets on which to calculate interim results. +** *`skip_time` (Optional, string | Unit)*: Specifies to skip to a particular time value. Results are not generated +and the model is not updated for data from the specified time interval. +** *`start` (Optional, string | Unit)*: When used in conjunction with `calc_interim`, specifies the range of +buckets on which to calculate interim results. + [discrete] ==== forecast Predicts the future behavior of a time series by using its historical behavior. @@ -2330,9 +4978,27 @@ Predicts the future behavior of a time series by using its historical behavior. {ref}/ml-forecast.html[Endpoint documentation] [source,ts] ---- -client.ml.forecast(...) +client.ml.forecast({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. The job must be open when you +create a forecast; otherwise, an error occurs. +** *`duration` (Optional, string | -1 | 0)*: A period of time that indicates how far into the future to forecast. For +example, `30d` corresponds to 30 days. The forecast starts at the last +record that was processed. +** *`expires_in` (Optional, string | -1 | 0)*: The period of time that forecast results are retained. After a forecast +expires, the results are deleted. If set to a value of 0, the forecast is +never automatically deleted. +** *`max_model_memory` (Optional, string)*: The maximum memory the forecast can use. If the forecast needs to use +more than the provided amount, it will spool to disk. Default is 20mb, +maximum is 500mb and minimum is 1mb. If set to 40% or more of the job’s +configured memory limit, it is automatically reduced to below that +amount. + [discrete] ==== get_buckets Retrieves anomaly detection job results for one or more buckets. @@ -2340,9 +5006,29 @@ Retrieves anomaly detection job results for one or more buckets. {ref}/ml-get-bucket.html[Endpoint documentation] [source,ts] ---- -client.ml.getBuckets(...) +client.ml.getBuckets({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`timestamp` (Optional, string | Unit)*: The timestamp of a single bucket result. If you do not specify this +parameter, the API returns information about all buckets. +** *`anomaly_score` (Optional, number)*: Returns buckets with anomaly scores greater or equal than this value. +** *`desc` (Optional, boolean)*: If `true`, the buckets are sorted in descending order. +** *`end` (Optional, string | Unit)*: Returns buckets with timestamps earlier than this time. `-1` means it is +unset and results are not limited to specific timestamps. +** *`exclude_interim` (Optional, boolean)*: If `true`, the output excludes interim results. +** *`expand` (Optional, boolean)*: If true, the output includes anomaly records. +** *`from` (Optional, number)*: Skips the specified number of buckets. +** *`size` (Optional, number)*: Specifies the maximum number of buckets to obtain. +** *`sort` (Optional, string)*: Specifies the sort field for the requested buckets. +** *`start` (Optional, string | Unit)*: Returns buckets with timestamps after this time. `-1` means it is unset +and results are not limited to specific timestamps. +** *`page` (Optional, { from, size })* + [discrete] ==== get_calendar_events Retrieves information about the scheduled events in calendars. @@ -2350,9 +5036,20 @@ Retrieves information about the scheduled events in calendars. {ref}/ml-get-calendar-event.html[Endpoint documentation] [source,ts] ---- -client.ml.getCalendarEvents(...) +client.ml.getCalendarEvents({ calendar_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`calendar_id` (string)*: A string that uniquely identifies a calendar. You can get information for multiple calendars by using a list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier. +** *`end` (Optional, string | Unit)*: Specifies to get events with timestamps earlier than this time. +** *`from` (Optional, number)*: Skips the specified number of events. +** *`job_id` (Optional, string)*: Specifies to get events for a specific anomaly detection job identifier or job group. It must be used with a calendar identifier of `_all` or `*`. +** *`size` (Optional, number)*: Specifies the maximum number of events to obtain. +** *`start` (Optional, string | Unit)*: Specifies to get events with timestamps after this time. + [discrete] ==== get_calendars Retrieves configuration information for calendars. @@ -2360,9 +5057,18 @@ Retrieves configuration information for calendars. {ref}/ml-get-calendar.html[Endpoint documentation] [source,ts] ---- -client.ml.getCalendars(...) +client.ml.getCalendars({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`calendar_id` (Optional, string)*: A string that uniquely identifies a calendar. You can get information for multiple calendars by using a list of ids or a wildcard expression. You can get information for all calendars by using `_all` or `*` or by omitting the calendar identifier. +** *`from` (Optional, number)*: Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier. +** *`size` (Optional, number)*: Specifies the maximum number of calendars to obtain. This parameter is supported only when you omit the calendar identifier. +** *`page` (Optional, { from, size })*: This object is supported only when you omit the calendar identifier. + [discrete] ==== get_categories Retrieves anomaly detection job results for one or more categories. @@ -2370,9 +5076,24 @@ Retrieves anomaly detection job results for one or more categories. {ref}/ml-get-category.html[Endpoint documentation] [source,ts] ---- -client.ml.getCategories(...) +client.ml.getCategories({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`category_id` (Optional, string)*: Identifier for the category, which is unique in the job. If you specify +neither the category ID nor the partition_field_value, the API returns +information about all categories. If you specify only the +partition_field_value, it returns information about all categories for +the specified partition. +** *`from` (Optional, number)*: Skips the specified number of categories. +** *`partition_field_value` (Optional, string)*: Only return categories for the specified partition. +** *`size` (Optional, number)*: Specifies the maximum number of categories to obtain. +** *`page` (Optional, { from, size })* + [discrete] ==== get_data_frame_analytics Retrieves configuration information for data frame analytics jobs. @@ -2380,9 +5101,33 @@ Retrieves configuration information for data frame analytics jobs. {ref}/get-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.ml.getDataFrameAnalytics(...) +client.ml.getDataFrameAnalytics({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: Identifier for the data frame analytics job. If you do not specify this +option, the API returns information for the first hundred data frame +analytics jobs. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no data frame analytics +jobs that match. +2. Contains the `_all` string or no identifiers and there are no matches. +3. Contains wildcard expressions and there are only partial matches. + +The default value returns an empty data_frame_analytics array when there +are no matches and the subset of results when there are partial matches. +If this parameter is `false`, the request returns a 404 status code when +there are no matches or only partial matches. +** *`from` (Optional, number)*: Skips the specified number of data frame analytics jobs. +** *`size` (Optional, number)*: Specifies the maximum number of data frame analytics jobs to obtain. +** *`exclude_generated` (Optional, boolean)*: Indicates if certain fields should be removed from the configuration on +retrieval. This allows the configuration to be in an acceptable format to +be retrieved and then added to another cluster. + [discrete] ==== get_data_frame_analytics_stats Retrieves usage information for data frame analytics jobs. @@ -2390,9 +5135,31 @@ Retrieves usage information for data frame analytics jobs. {ref}/get-dfanalytics-stats.html[Endpoint documentation] [source,ts] ---- -client.ml.getDataFrameAnalyticsStats(...) +client.ml.getDataFrameAnalyticsStats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: Identifier for the data frame analytics job. If you do not specify this +option, the API returns information for the first hundred data frame +analytics jobs. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no data frame analytics +jobs that match. +2. Contains the `_all` string or no identifiers and there are no matches. +3. Contains wildcard expressions and there are only partial matches. + +The default value returns an empty data_frame_analytics array when there +are no matches and the subset of results when there are partial matches. +If this parameter is `false`, the request returns a 404 status code when +there are no matches or only partial matches. +** *`from` (Optional, number)*: Skips the specified number of data frame analytics jobs. +** *`size` (Optional, number)*: Specifies the maximum number of data frame analytics jobs to obtain. +** *`verbose` (Optional, boolean)*: Defines whether the stats response should be verbose. + [discrete] ==== get_datafeed_stats Retrieves usage information for datafeeds. @@ -2400,9 +5167,27 @@ Retrieves usage information for datafeeds. {ref}/ml-get-datafeed-stats.html[Endpoint documentation] [source,ts] ---- -client.ml.getDatafeedStats(...) +client.ml.getDatafeedStats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`datafeed_id` (Optional, string | string[])*: Identifier for the datafeed. It can be a datafeed identifier or a +wildcard expression. If you do not specify one of these options, the API +returns information about all datafeeds. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no datafeeds that match. +2. Contains the `_all` string or no identifiers and there are no matches. +3. Contains wildcard expressions and there are only partial matches. + +The default value is `true`, which returns an empty `datafeeds` array +when there are no matches and the subset of results when there are +partial matches. If this parameter is `false`, the request returns a +`404` status code when there are no matches or only partial matches. + [discrete] ==== get_datafeeds Retrieves configuration information for datafeeds. @@ -2410,9 +5195,30 @@ Retrieves configuration information for datafeeds. {ref}/ml-get-datafeed.html[Endpoint documentation] [source,ts] ---- -client.ml.getDatafeeds(...) +client.ml.getDatafeeds({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`datafeed_id` (Optional, string | string[])*: Identifier for the datafeed. It can be a datafeed identifier or a +wildcard expression. If you do not specify one of these options, the API +returns information about all datafeeds. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no datafeeds that match. +2. Contains the `_all` string or no identifiers and there are no matches. +3. Contains wildcard expressions and there are only partial matches. + +The default value is `true`, which returns an empty `datafeeds` array +when there are no matches and the subset of results when there are +partial matches. If this parameter is `false`, the request returns a +`404` status code when there are no matches or only partial matches. +** *`exclude_generated` (Optional, boolean)*: Indicates if certain fields should be removed from the configuration on +retrieval. This allows the configuration to be in an acceptable format to +be retrieved and then added to another cluster. + [discrete] ==== get_filters Retrieves filters. @@ -2420,9 +5226,17 @@ Retrieves filters. {ref}/ml-get-filter.html[Endpoint documentation] [source,ts] ---- -client.ml.getFilters(...) +client.ml.getFilters({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`filter_id` (Optional, string | string[])*: A string that uniquely identifies a filter. +** *`from` (Optional, number)*: Skips the specified number of filters. +** *`size` (Optional, number)*: Specifies the maximum number of filters to obtain. + [discrete] ==== get_influencers Retrieves anomaly detection job results for one or more influencers. @@ -2430,9 +5244,30 @@ Retrieves anomaly detection job results for one or more influencers. {ref}/ml-get-influencer.html[Endpoint documentation] [source,ts] ---- -client.ml.getInfluencers(...) +client.ml.getInfluencers({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`desc` (Optional, boolean)*: If true, the results are sorted in descending order. +** *`end` (Optional, string | Unit)*: Returns influencers with timestamps earlier than this time. +The default value means it is unset and results are not limited to +specific timestamps. +** *`exclude_interim` (Optional, boolean)*: If true, the output excludes interim results. By default, interim results +are included. +** *`influencer_score` (Optional, number)*: Returns influencers with anomaly scores greater than or equal to this +value. +** *`from` (Optional, number)*: Skips the specified number of influencers. +** *`size` (Optional, number)*: Specifies the maximum number of influencers to obtain. +** *`sort` (Optional, string)*: Specifies the sort field for the requested influencers. By default, the +influencers are sorted by the `influencer_score` value. +** *`start` (Optional, string | Unit)*: Returns influencers with timestamps after this time. The default value +means it is unset and results are not limited to specific timestamps. +** *`page` (Optional, { from, size })* + [discrete] ==== get_job_stats Retrieves usage information for anomaly detection jobs. @@ -2440,9 +5275,28 @@ Retrieves usage information for anomaly detection jobs. {ref}/ml-get-job-stats.html[Endpoint documentation] [source,ts] ---- -client.ml.getJobStats(...) +client.ml.getJobStats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (Optional, string)*: Identifier for the anomaly detection job. It can be a job identifier, a +group name, a list of jobs, or a wildcard expression. If +you do not specify one of these options, the API returns information for +all anomaly detection jobs. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no jobs that match. +2. Contains the _all string or no identifiers and there are no matches. +3. 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. + [discrete] ==== get_jobs Retrieves configuration information for anomaly detection jobs. @@ -2450,9 +5304,30 @@ Retrieves configuration information for anomaly detection jobs. {ref}/ml-get-job.html[Endpoint documentation] [source,ts] ---- -client.ml.getJobs(...) +client.ml.getJobs({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (Optional, string | string[])*: Identifier for the anomaly detection job. It can be a job identifier, a +group name, or a wildcard expression. If you do not specify one of these +options, the API returns information for all anomaly detection jobs. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no jobs that match. +2. Contains the _all string or no identifiers and there are no matches. +3. Contains wildcard expressions and there are only partial matches. + +The default value is `true`, which returns an empty `jobs` array when +there are no matches and the subset of results when there are partial +matches. If this parameter is `false`, the request returns a `404` status +code when there are no matches or only partial matches. +** *`exclude_generated` (Optional, boolean)*: Indicates if certain fields should be removed from the configuration on +retrieval. This allows the configuration to be in an acceptable format to +be retrieved and then added to another cluster. + [discrete] ==== get_memory_stats Returns information on how ML is using memory. @@ -2460,9 +5335,22 @@ Returns information on how ML is using memory. {ref}/get-ml-memory.html[Endpoint documentation] [source,ts] ---- -client.ml.getMemoryStats(...) +client.ml.getMemoryStats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (Optional, string)*: The names of particular nodes in the cluster to target. For example, `nodeId1,nodeId2` or +`ml:true` +** *`human` (Optional, boolean)*: Specify this query parameter to include the fields with units in the response. Otherwise only +the `_in_bytes` sizes are returned in the response. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request +fails and returns an error. + [discrete] ==== get_model_snapshot_upgrade_stats Gets stats for anomaly detection job model snapshot upgrades that are in progress. @@ -2470,9 +5358,27 @@ Gets stats for anomaly detection job model snapshot upgrades that are in progres {ref}/ml-get-job-model-snapshot-upgrade-stats.html[Endpoint documentation] [source,ts] ---- -client.ml.getModelSnapshotUpgradeStats(...) +client.ml.getModelSnapshotUpgradeStats({ job_id, snapshot_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`snapshot_id` (string)*: A numerical character string that uniquely identifies the model snapshot. You can get information for multiple +snapshots by using a list or a wildcard expression. You can get all snapshots by using `_all`, +by specifying `*` as the snapshot ID, or by omitting the snapshot ID. +** *`allow_no_match` (Optional, boolean)*: 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. + +The default value is true, which returns an empty jobs array when there are no matches and the subset of results +when there are partial matches. If this parameter is false, the request returns a 404 status code when there are +no matches or only partial matches. + [discrete] ==== get_model_snapshots Retrieves information about model snapshots. @@ -2480,9 +5386,26 @@ Retrieves information about model snapshots. {ref}/ml-get-snapshot.html[Endpoint documentation] [source,ts] ---- -client.ml.getModelSnapshots(...) +client.ml.getModelSnapshots({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`snapshot_id` (Optional, string)*: A numerical character string that uniquely identifies the model snapshot. You can get information for multiple +snapshots by using a list or a wildcard expression. You can get all snapshots by using `_all`, +by specifying `*` as the snapshot ID, or by omitting the snapshot ID. +** *`desc` (Optional, boolean)*: If true, the results are sorted in descending order. +** *`end` (Optional, string | Unit)*: Returns snapshots with timestamps earlier than this time. +** *`from` (Optional, number)*: Skips the specified number of snapshots. +** *`size` (Optional, number)*: Specifies the maximum number of snapshots to obtain. +** *`sort` (Optional, string)*: Specifies the sort field for the requested snapshots. By default, the +snapshots are sorted by their timestamp. +** *`start` (Optional, string | Unit)*: Returns snapshots with timestamps after this time. +** *`page` (Optional, { from, size })* + [discrete] ==== get_overall_buckets Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs. @@ -2490,9 +5413,44 @@ Retrieves overall bucket results that summarize the bucket results of multiple a {ref}/ml-get-overall-buckets.html[Endpoint documentation] [source,ts] ---- -client.ml.getOverallBuckets(...) +client.ml.getOverallBuckets({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. It can be a job identifier, a +group name, a list of jobs or groups, or a wildcard +expression. + +You can summarize the bucket results for all anomaly detection jobs by +using `_all` or by specifying `*` as the ``. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no jobs that match. +2. Contains the `_all` string or no identifiers and there are no matches. +3. Contains wildcard expressions and there are only partial matches. + +If `true`, the request returns an empty `jobs` array when there are no +matches and the subset of results when there are partial matches. If this +parameter is `false`, the request returns a `404` status code when there +are no matches or only partial matches. +** *`bucket_span` (Optional, string | -1 | 0)*: The span of the overall buckets. Must be greater or equal to the largest +bucket span of the specified anomaly detection jobs, which is the default +value. + +By default, an overall bucket has a span equal to the largest bucket span +of the specified anomaly detection jobs. To override that behavior, use +the optional `bucket_span` parameter. +** *`end` (Optional, string | Unit)*: Returns overall buckets with timestamps earlier than this time. +** *`exclude_interim` (Optional, boolean)*: If `true`, the output excludes interim results. +** *`overall_score` (Optional, number | string)*: Returns overall buckets with overall scores greater than or equal to this +value. +** *`start` (Optional, string | Unit)*: Returns overall buckets with timestamps after this time. +** *`top_n` (Optional, number)*: The number of top anomaly detection job bucket scores to be used in the +`overall_score` calculation. + [discrete] ==== get_records Retrieves anomaly records for an anomaly detection job. @@ -2500,9 +5458,26 @@ Retrieves anomaly records for an anomaly detection job. {ref}/ml-get-record.html[Endpoint documentation] [source,ts] ---- -client.ml.getRecords(...) +client.ml.getRecords({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`desc` (Optional, boolean)*: If true, the results are sorted in descending order. +** *`end` (Optional, string | Unit)*: Returns records with timestamps earlier than this time. The default value +means results are not limited to specific timestamps. +** *`exclude_interim` (Optional, boolean)*: If `true`, the output excludes interim results. +** *`from` (Optional, number)*: Skips the specified number of records. +** *`record_score` (Optional, number)*: Returns records with anomaly scores greater or equal than this value. +** *`size` (Optional, number)*: Specifies the maximum number of records to obtain. +** *`sort` (Optional, string)*: Specifies the sort field for the requested records. +** *`start` (Optional, string | Unit)*: Returns records with timestamps after this time. The default value means +results are not limited to specific timestamps. +** *`page` (Optional, { from, size })* + [discrete] ==== get_trained_models Retrieves configuration information for a trained inference model. @@ -2510,9 +5485,35 @@ Retrieves configuration information for a trained inference model. {ref}/get-trained-models.html[Endpoint documentation] [source,ts] ---- -client.ml.getTrainedModels(...) +client.ml.getTrainedModels({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (Optional, string)*: The unique identifier of the trained model. +** *`allow_no_match` (Optional, boolean)*: 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, it returns an empty array when there are no matches and the +subset of results when there are partial matches. +** *`decompress_definition` (Optional, boolean)*: Specifies whether the included model definition should be returned as a +JSON map (true) or in a custom compressed format (false). +** *`exclude_generated` (Optional, boolean)*: Indicates if certain fields should be removed from the configuration on +retrieval. This allows the configuration to be in an acceptable format to +be retrieved and then added to another cluster. +** *`from` (Optional, number)*: Skips the specified number of models. +** *`include` (Optional, Enum("definition" | "feature_importance_baseline" | "hyperparameters" | "total_feature_importance" | "definition_status"))*: A comma delimited string of optional fields to include in the response +body. +** *`size` (Optional, number)*: Specifies the maximum number of models to obtain. +** *`tags` (Optional, string)*: A comma delimited string of tags. A trained model can have many tags, or +none. When supplied, only trained models that contain all the supplied +tags are returned. + [discrete] ==== get_trained_models_stats Retrieves usage information for trained inference models. @@ -2520,9 +5521,26 @@ Retrieves usage information for trained inference models. {ref}/get-trained-models-stats.html[Endpoint documentation] [source,ts] ---- -client.ml.getTrainedModelsStats(...) +client.ml.getTrainedModelsStats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (Optional, string | string[])*: The unique identifier of the trained model or a model alias. It can be a +list or a wildcard expression. +** *`allow_no_match` (Optional, boolean)*: 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, it returns an empty array when there are no matches and the +subset of results when there are partial matches. +** *`from` (Optional, number)*: Skips the specified number of models. +** *`size` (Optional, number)*: Specifies the maximum number of models to obtain. + [discrete] ==== infer_trained_model Evaluate a trained model. @@ -2530,9 +5548,20 @@ Evaluate a trained model. {ref}/infer-trained-model.html[Endpoint documentation] [source,ts] ---- -client.ml.inferTrainedModel(...) +client.ml.inferTrainedModel({ model_id, docs }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (string)*: The unique identifier of the trained model. +** *`docs` (Record[])*: An array of objects to pass to the model for inference. The objects should contain a fields matching your +configured trained model input. Typically, for NLP models, the field name is `text_field`. +Currently, for NLP models, only a single value is allowed. +** *`timeout` (Optional, string | -1 | 0)*: Controls the amount of time to wait for inference results. +** *`inference_config` (Optional, { regression, classification, text_classification, zero_shot_classification, fill_mask, ner, pass_through, text_embedding, text_expansion, question_answering })*: The inference configuration updates to apply on the API call + [discrete] ==== info Returns defaults and limits used by machine learning. @@ -2540,9 +5569,14 @@ Returns defaults and limits used by machine learning. {ref}/get-ml-info.html[Endpoint documentation] [source,ts] ---- -client.ml.info(...) +client.ml.info() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== open_job Opens one or more anomaly detection jobs. @@ -2550,9 +5584,16 @@ Opens one or more anomaly detection jobs. {ref}/ml-open-job.html[Endpoint documentation] [source,ts] ---- -client.ml.openJob(...) +client.ml.openJob({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`timeout` (Optional, string | -1 | 0)*: Controls the time to wait until a job has opened. + [discrete] ==== post_calendar_events Posts scheduled events in a calendar. @@ -2560,9 +5601,16 @@ Posts scheduled events in a calendar. {ref}/ml-post-calendar-event.html[Endpoint documentation] [source,ts] ---- -client.ml.postCalendarEvents(...) +client.ml.postCalendarEvents({ calendar_id, events }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`calendar_id` (string)*: A string that uniquely identifies a calendar. +** *`events` ({ calendar_id, event_id, description, end_time, start_time }[])*: A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format. + [discrete] ==== post_data Sends data to an anomaly detection job for analysis. @@ -2570,9 +5618,17 @@ Sends data to an anomaly detection job for analysis. {ref}/ml-post-data.html[Endpoint documentation] [source,ts] ---- -client.ml.postData(...) +client.ml.postData({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. The job must have a state of open to receive and process the data. +** *`reset_end` (Optional, string | Unit)*: Specifies the end of the bucket resetting range. +** *`reset_start` (Optional, string | Unit)*: Specifies the start of the bucket resetting range. + [discrete] ==== preview_data_frame_analytics Previews that will be analyzed given a data frame analytics config. @@ -2580,9 +5636,18 @@ Previews that will be analyzed given a data frame analytics config. {ref}/preview-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.ml.previewDataFrameAnalytics(...) +client.ml.previewDataFrameAnalytics({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: Identifier for the data frame analytics job. +** *`config` (Optional, { source, analysis, model_memory_limit, max_num_threads, analyzed_fields })*: A data frame analytics config as described in create data frame analytics +jobs. Note that `id` and `dest` don’t need to be provided in the context of +this API. + [discrete] ==== preview_datafeed Previews a datafeed. @@ -2590,9 +5655,25 @@ Previews a datafeed. {ref}/ml-preview-datafeed.html[Endpoint documentation] [source,ts] ---- -client.ml.previewDatafeed(...) +client.ml.previewDatafeed({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`datafeed_id` (Optional, string)*: A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase +alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric +characters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job +configuration details in the request body. +** *`start` (Optional, string | Unit)*: The start time from where the datafeed preview should begin +** *`end` (Optional, string | Unit)*: The end time when the datafeed preview should stop +** *`datafeed_config` (Optional, { aggregations, chunking_config, datafeed_id, delayed_data_check_config, frequency, indices, indices_options, job_id, max_empty_searches, query, query_delay, runtime_mappings, script_fields, scroll_size })*: The datafeed definition to preview. +** *`job_config` (Optional, { allow_lazy_open, analysis_config, analysis_limits, background_persist_interval, custom_settings, daily_model_snapshot_retention_after_days, data_description, datafeed_config, description, groups, job_id, job_type, model_plot_config, model_snapshot_retention_days, renormalization_window_days, results_index_name, results_retention_days })*: The configuration details for the anomaly detection job that is associated with the datafeed. If the +`datafeed_config` object does not include a `job_id` that references an existing anomaly detection job, you must +supply this `job_config` object. If you include both a `job_id` and a `job_config`, the latter information is +used. You cannot specify a `job_config` object unless you also supply a `datafeed_config` object. + [discrete] ==== put_calendar Instantiates a calendar. @@ -2600,9 +5681,17 @@ Instantiates a calendar. {ref}/ml-put-calendar.html[Endpoint documentation] [source,ts] ---- -client.ml.putCalendar(...) +client.ml.putCalendar({ calendar_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`calendar_id` (string)*: A string that uniquely identifies a calendar. +** *`job_ids` (Optional, string[])*: An array of anomaly detection job identifiers. +** *`description` (Optional, string)*: A description of the calendar. + [discrete] ==== put_calendar_job Adds an anomaly detection job to a calendar. @@ -2610,9 +5699,16 @@ Adds an anomaly detection job to a calendar. {ref}/ml-put-calendar-job.html[Endpoint documentation] [source,ts] ---- -client.ml.putCalendarJob(...) +client.ml.putCalendarJob({ calendar_id, job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`calendar_id` (string)*: A string that uniquely identifies a calendar. +** *`job_id` (string)*: An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a list of jobs or groups. + [discrete] ==== put_data_frame_analytics Instantiates a data frame analytics job. @@ -2620,9 +5716,70 @@ Instantiates a data frame analytics job. {ref}/put-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.ml.putDataFrameAnalytics(...) +client.ml.putDataFrameAnalytics({ id, analysis, dest, source }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Identifier for the data frame analytics job. This identifier can contain +lowercase alphanumeric characters (a-z and 0-9), hyphens, and +underscores. It must start and end with alphanumeric characters. +** *`analysis` ({ classification, outlier_detection, regression })*: The analysis configuration, which contains the information necessary to +perform one of the following types of analysis: classification, outlier +detection, or regression. +** *`dest` ({ index, results_field })*: The destination configuration. +** *`source` ({ index, query, runtime_mappings, _source })*: The configuration of how to source the analysis data. +** *`allow_lazy_start` (Optional, boolean)*: Specifies whether this job can start when there is insufficient machine +learning node capacity for it to be immediately assigned to a node. If +set to `false` and a machine learning node with capacity to run the job +cannot be immediately found, the API returns an error. If set to `true`, +the API does not return an error; the job waits in the `starting` state +until sufficient machine learning node capacity is available. This +behavior is also affected by the cluster-wide +`xpack.ml.max_lazy_ml_nodes` setting. +** *`analyzed_fields` (Optional, { includes, excludes })*: Specifies `includes` and/or `excludes` patterns to select which fields +will be included in the analysis. The patterns specified in `excludes` +are applied last, therefore `excludes` takes precedence. In other words, +if the same field is specified in both `includes` and `excludes`, then +the field will not be included in the analysis. If `analyzed_fields` is +not set, only the relevant fields will be included. For example, all the +numeric fields for outlier detection. +The supported fields vary for each type of analysis. Outlier detection +requires numeric or `boolean` data to analyze. The algorithms don’t +support missing values therefore fields that have data types other than +numeric or boolean are ignored. Documents where included fields contain +missing values, null values, or an array are also ignored. Therefore the +`dest` index may contain documents that don’t have an outlier score. +Regression supports fields that are numeric, `boolean`, `text`, +`keyword`, and `ip` data types. It is also tolerant of missing values. +Fields that are supported are included in the analysis, other fields are +ignored. Documents where included fields contain an array with two or +more values are also ignored. Documents in the `dest` index that don’t +contain a results field are not included in the regression analysis. +Classification supports fields that are numeric, `boolean`, `text`, +`keyword`, and `ip` data types. It is also tolerant of missing values. +Fields that are supported are included in the analysis, other fields are +ignored. Documents where included fields contain an array with two or +more values are also ignored. Documents in the `dest` index that don’t +contain a results field are not included in the classification analysis. +Classification analysis can be improved by mapping ordinal variable +values to a single number. For example, in case of age ranges, you can +model the values as `0-14 = 0`, `15-24 = 1`, `25-34 = 2`, and so on. +** *`description` (Optional, string)*: A description of the job. +** *`max_num_threads` (Optional, number)*: The maximum number of threads to be used by the analysis. Using more +threads may decrease the time necessary to complete the analysis at the +cost of using more CPU. Note that the process may use additional threads +for operational functionality other than the analysis itself. +** *`model_memory_limit` (Optional, string)*: The approximate maximum amount of memory resources that are permitted for +analytical processing. If your `elasticsearch.yml` file contains an +`xpack.ml.max_model_memory_limit` setting, an error occurs when you try +to create data frame analytics jobs that have `model_memory_limit` values +greater than that setting. +** *`headers` (Optional, Record)* +** *`version` (Optional, string)* + [discrete] ==== put_datafeed Instantiates a datafeed. @@ -2630,9 +5787,60 @@ Instantiates a datafeed. {ref}/ml-put-datafeed.html[Endpoint documentation] [source,ts] ---- -client.ml.putDatafeed(...) +client.ml.putDatafeed({ datafeed_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed. +This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. +It must start and end with alphanumeric characters. +** *`allow_no_indices` (Optional, boolean)*: If true, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the `_all` +string or when no indices are specified. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines +whether wildcard expressions match hidden data streams. Supports a list of values. +** *`ignore_throttled` (Optional, boolean)*: If true, concrete, expanded, or aliased indices are ignored when frozen. +** *`ignore_unavailable` (Optional, boolean)*: If true, unavailable indices (missing or closed) are ignored. +** *`aggregations` (Optional, Record)*: If set, the datafeed performs aggregation searches. +Support for aggregations is limited and should be used only with low cardinality data. +** *`chunking_config` (Optional, { mode, time_span })*: Datafeeds might be required to search over long time periods, for several months or years. +This search is split into time chunks in order to ensure the load on Elasticsearch is managed. +Chunking configuration controls how the size of these time chunks are calculated; +it is an advanced configuration option. +** *`delayed_data_check_config` (Optional, { check_window, enabled })*: Specifies whether the datafeed checks for missing data and the size of the window. +The datafeed can optionally search over indices that have already been read in an effort to determine whether +any data has subsequently been added to the index. If missing data is found, it is a good indication that the +`query_delay` is set too low and the data is being indexed after the datafeed has passed that moment in time. +This check runs only on real-time datafeeds. +** *`frequency` (Optional, string | -1 | 0)*: The interval at which scheduled queries are made while the datafeed runs in real time. +The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible +fraction of the bucket span. When `frequency` is shorter than the bucket span, interim results for the last +(partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses +aggregations, this value must be divisible by the interval of the date histogram aggregation. +** *`indices` (Optional, string | string[])*: An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine +learning nodes must have the `remote_cluster_client` role. +** *`indices_options` (Optional, { allow_no_indices, expand_wildcards, ignore_unavailable, ignore_throttled })*: Specifies index expansion options that are used during search +** *`job_id` (Optional, string)*: Identifier for the anomaly detection job. +** *`max_empty_searches` (Optional, number)*: If a real-time datafeed has never seen any data (including during any initial training period), it automatically +stops and closes the associated job after this many real-time searches return no documents. In other words, +it stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no +end time that sees no data remains started until it is explicitly stopped. By default, it is not set. +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an +Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this +object is passed verbatim to Elasticsearch. +** *`query_delay` (Optional, string | -1 | 0)*: The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might +not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default +value is randomly selected between `60s` and `120s`. This randomness improves the query performance +when there are multiple jobs running on the same node. +** *`runtime_mappings` (Optional, Record)*: Specifies runtime fields for the datafeed search. +** *`script_fields` (Optional, Record)*: Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. +The detector configuration objects in a job can contain functions that use these script fields. +** *`scroll_size` (Optional, number)*: The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. +The maximum value is the value of `index.max_result_window`, which is 10,000 by default. +** *`headers` (Optional, Record)* + [discrete] ==== put_filter Instantiates a filter. @@ -2640,9 +5848,18 @@ Instantiates a filter. {ref}/ml-put-filter.html[Endpoint documentation] [source,ts] ---- -client.ml.putFilter(...) +client.ml.putFilter({ filter_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`filter_id` (string)*: A string that uniquely identifies a filter. +** *`description` (Optional, string)*: A description of the filter. +** *`items` (Optional, string[])*: The items of the filter. A wildcard `*` can be used at the beginning or the end of an item. +Up to 10000 items are allowed in each filter. + [discrete] ==== put_job Instantiates an anomaly detection job. @@ -2650,9 +5867,30 @@ Instantiates an anomaly detection job. {ref}/ml-put-job.html[Endpoint documentation] [source,ts] ---- -client.ml.putJob(...) +client.ml.putJob({ job_id, analysis_config, data_description }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: The identifier for the anomaly detection job. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric characters. +** *`analysis_config` ({ bucket_span, categorization_analyzer, categorization_field_name, categorization_filters, detectors, influencers, latency, model_prune_window, multivariate_by_fields, per_partition_categorization, summary_count_field_name })*: Specifies how to analyze the data. After you create a job, you cannot change the analysis configuration; all the properties are informational. +** *`data_description` ({ format, time_field, time_format, field_delimiter })*: Defines the format of the input data when you send data to the job by using the post data API. Note that when configure a datafeed, these properties are automatically set. When data is received via the post data API, it is not stored in Elasticsearch. Only the results for anomaly detection are retained. +** *`allow_lazy_open` (Optional, boolean)*: Advanced configuration option. Specifies whether this job can open when there is insufficient machine learning node capacity for it to be immediately assigned to a node. By default, if a machine learning node with capacity to run the job cannot immediately be found, the open anomaly detection jobs API returns an error. However, this is also subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this option is set to true, the open anomaly detection jobs API does not return an error and the job waits in the opening state until sufficient machine learning node capacity is available. +** *`analysis_limits` (Optional, { categorization_examples_limit, model_memory_limit })*: Limits can be applied for the resources required to hold the mathematical models in memory. These limits are approximate and can be set per job. They do not control the memory used by other processes, for example the Elasticsearch Java processes. +** *`background_persist_interval` (Optional, string | -1 | 0)*: Advanced configuration option. The time between each periodic persistence of the model. The default value is a randomized value between 3 to 4 hours, which avoids all jobs persisting at exactly the same time. The smallest allowed value is 1 hour. For very large models (several GB), persistence could take 10-20 minutes, so do not set the `background_persist_interval` value too low. +** *`custom_settings` (Optional, User-defined value)*: Advanced configuration option. Contains custom meta data about the job. +** *`daily_model_snapshot_retention_after_days` (Optional, number)*: Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies a period of time (in days) after which only the first snapshot per day is retained. This period is relative to the timestamp of the most recent snapshot for this job. Valid values range from 0 to `model_snapshot_retention_days`. +** *`datafeed_config` (Optional, { aggregations, chunking_config, datafeed_id, delayed_data_check_config, frequency, indices, indices_options, job_id, max_empty_searches, query, query_delay, runtime_mappings, script_fields, scroll_size })*: Defines a datafeed for the anomaly detection job. If Elasticsearch security features are enabled, your datafeed remembers which roles the user who created it had at the time of creation and runs the query using those same roles. If you provide secondary authorization headers, those credentials are used instead. +** *`description` (Optional, string)*: A description of the job. +** *`groups` (Optional, string[])*: A list of job groups. A job can belong to no groups or many. +** *`model_plot_config` (Optional, { annotations_enabled, enabled, terms })*: This advanced configuration option stores model information along with the results. It provides a more detailed view into anomaly detection. If you enable model plot it can add considerable overhead to the performance of the system; it is not feasible for jobs with many entities. Model plot provides a simplified and indicative view of the model and its bounds. It does not display complex features such as multivariate correlations or multimodal data. As such, anomalies may occasionally be reported which cannot be seen in the model plot. Model plot config can be configured when the job is created or updated later. It must be disabled if performance issues are experienced. +** *`model_snapshot_retention_days` (Optional, number)*: Advanced configuration option, which affects the automatic removal of old model snapshots for this job. It specifies the maximum period of time (in days) that snapshots are retained. This period is relative to the timestamp of the most recent snapshot for this job. By default, snapshots ten days older than the newest snapshot are deleted. +** *`renormalization_window_days` (Optional, number)*: Advanced configuration option. The period over which adjustments to the score are applied, as new data is seen. The default value is the longer of 30 days or 100 bucket spans. +** *`results_index_name` (Optional, string)*: A text string that affects the name of the machine learning results index. By default, the job generates an index named `.ml-anomalies-shared`. +** *`results_retention_days` (Optional, number)*: Advanced configuration option. The period of time (in days) that results are retained. Age is calculated relative to the timestamp of the latest bucket result. If this property has a non-null value, once per day at 00:30 (server time), results that are the specified number of days older than the latest bucket result are deleted from Elasticsearch. The default value is null, which means all results are retained. Annotations generated by the system also count as results for retention purposes; they are deleted after the same number of days as results. Annotations added by users are retained forever. + [discrete] ==== put_trained_model Creates an inference trained model. @@ -2660,9 +5898,32 @@ Creates an inference trained model. {ref}/put-trained-models.html[Endpoint documentation] [source,ts] ---- -client.ml.putTrainedModel(...) +client.ml.putTrainedModel({ model_id, inference_config }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (string)*: The unique identifier of the trained model. +** *`inference_config` ({ regression, classification, text_classification, zero_shot_classification, fill_mask, ner, pass_through, text_embedding, text_expansion, question_answering })*: The default configuration for inference. This can be either a regression +or classification configuration. It must match the underlying +definition.trained_model's target_type. +** *`defer_definition_decompression` (Optional, boolean)*: If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations. +** *`compressed_definition` (Optional, string)*: The compressed (GZipped and Base64 encoded) inference definition of the +model. If compressed_definition is specified, then definition cannot be +specified. +** *`definition` (Optional, { preprocessors, trained_model })*: The inference definition for the model. If definition is specified, then +compressed_definition cannot be specified. +** *`description` (Optional, string)*: A human-readable description of the inference trained model. +** *`input` (Optional, { field_names })*: The input field names for the model definition. +** *`metadata` (Optional, User-defined value)*: An object map that contains metadata about the model. +** *`model_type` (Optional, Enum("tree_ensemble" | "lang_ident" | "pytorch"))*: The model type. +** *`model_size_bytes` (Optional, number)*: The estimated memory usage in bytes to keep the trained model in memory. +This property is supported only if defer_definition_decompression is true +or the model definition is not supplied. +** *`tags` (Optional, string[])*: An array of tags to organize the model. + [discrete] ==== put_trained_model_alias Creates a new model alias (or reassigns an existing one) to refer to the trained model @@ -2670,9 +5931,19 @@ Creates a new model alias (or reassigns an existing one) to refer to the trained {ref}/put-trained-models-aliases.html[Endpoint documentation] [source,ts] ---- -client.ml.putTrainedModelAlias(...) +client.ml.putTrainedModelAlias({ model_alias, model_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_alias` (string)*: The alias to create or update. This value cannot end in numbers. +** *`model_id` (string)*: The identifier for the trained model that the alias refers to. +** *`reassign` (Optional, boolean)*: Specifies whether the alias gets reassigned to the specified trained +model if it is already assigned to a different model. If the alias is +already assigned and this parameter is false, the API returns an error. + [discrete] ==== put_trained_model_definition_part Creates part of a trained model definition @@ -2680,9 +5951,20 @@ Creates part of a trained model definition {ref}/put-trained-model-definition-part.html[Endpoint documentation] [source,ts] ---- -client.ml.putTrainedModelDefinitionPart(...) +client.ml.putTrainedModelDefinitionPart({ model_id, part, definition, total_definition_length, total_parts }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (string)*: The unique identifier of the trained model. +** *`part` (number)*: The definition part number. When the definition is loaded for inference the definition parts are streamed in the +order of their part number. The first part must be `0` and the final part must be `total_parts - 1`. +** *`definition` (string)*: The definition part for the model. Must be a base64 encoded string. +** *`total_definition_length` (number)*: The total uncompressed definition length in bytes. Not base64 encoded. +** *`total_parts` (number)*: The total number of parts that will be uploaded. Must be greater than 0. + [discrete] ==== put_trained_model_vocabulary Creates a trained model vocabulary @@ -2690,9 +5972,17 @@ Creates a trained model vocabulary {ref}/put-trained-model-vocabulary.html[Endpoint documentation] [source,ts] ---- -client.ml.putTrainedModelVocabulary(...) +client.ml.putTrainedModelVocabulary({ model_id, vocabulary }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (string)*: The unique identifier of the trained model. +** *`vocabulary` (string[])*: The model vocabulary, which must not be empty. +** *`merges` (Optional, string[])*: The optional model merges if required by the tokenizer. + [discrete] ==== reset_job Resets an existing anomaly detection job. @@ -2700,9 +5990,20 @@ Resets an existing anomaly detection job. {ref}/ml-reset-job.html[Endpoint documentation] [source,ts] ---- -client.ml.resetJob(...) +client.ml.resetJob({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: The ID of the job to reset. +** *`wait_for_completion` (Optional, boolean)*: Should this request wait until the operation has completed before +returning. +** *`delete_user_annotations` (Optional, boolean)*: Specifies whether annotations that have been added by the +user should be deleted along with any auto-generated annotations when the job is +reset. + [discrete] ==== revert_model_snapshot Reverts to a specific snapshot. @@ -2710,9 +6011,24 @@ Reverts to a specific snapshot. {ref}/ml-revert-snapshot.html[Endpoint documentation] [source,ts] ---- -client.ml.revertModelSnapshot(...) +client.ml.revertModelSnapshot({ job_id, snapshot_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`snapshot_id` (string)*: You can specify `empty` as the . Reverting to the empty +snapshot means the anomaly detection job starts learning a new model from +scratch when it is started. +** *`delete_intervening_results` (Optional, boolean)*: If true, deletes the results in the time period between the latest +results and the time of the reverted snapshot. It also resets the model +to accept records for this time period. If you choose not to delete +intervening results when reverting a snapshot, the job will not accept +input data that is older than the current time. If you want to resend +data, then delete the intervening results. + [discrete] ==== set_upgrade_mode Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. @@ -2720,9 +6036,18 @@ Sets a cluster wide upgrade_mode setting that prepares machine learning indices {ref}/ml-set-upgrade-mode.html[Endpoint documentation] [source,ts] ---- -client.ml.setUpgradeMode(...) +client.ml.setUpgradeMode({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`enabled` (Optional, boolean)*: When `true`, it enables `upgrade_mode` which temporarily halts all job +and datafeed tasks and prohibits new job and datafeed tasks from +starting. +** *`timeout` (Optional, string | -1 | 0)*: The time to wait for the request to be completed. + [discrete] ==== start_data_frame_analytics Starts a data frame analytics job. @@ -2730,9 +6055,19 @@ Starts a data frame analytics job. {ref}/start-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.ml.startDataFrameAnalytics(...) +client.ml.startDataFrameAnalytics({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Identifier for the data frame analytics job. This identifier can contain +lowercase alphanumeric characters (a-z and 0-9), hyphens, and +underscores. It must start and end with alphanumeric characters. +** *`timeout` (Optional, string | -1 | 0)*: Controls the amount of time to wait until the data frame analytics job +starts. + [discrete] ==== start_datafeed Starts one or more datafeeds. @@ -2740,9 +6075,35 @@ Starts one or more datafeeds. {ref}/ml-start-datafeed.html[Endpoint documentation] [source,ts] ---- -client.ml.startDatafeed(...) +client.ml.startDatafeed({ datafeed_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed. This identifier can contain lowercase +alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric +characters. +** *`end` (Optional, string | Unit)*: The time that the datafeed should end, which can be specified by using one of the following formats: + +* ISO 8601 format with milliseconds, for example `2017-01-22T06:00:00.000Z` +* ISO 8601 format without milliseconds, for example `2017-01-22T06:00:00+00:00` +* Milliseconds since the epoch, for example `1485061200000` + +Date-time arguments using either of the ISO 8601 formats must have a time zone designator, where `Z` is accepted +as an abbreviation for UTC time. When a URL is expected (for example, in browsers), the `+` used in time zone +designators must be encoded as `%2B`. +The end time value is exclusive. If you do not specify an end time, the datafeed +runs continuously. +** *`start` (Optional, string | Unit)*: The time that the datafeed should begin, which can be specified by using the same formats as the `end` parameter. +This value is inclusive. +If you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis +starts from the earliest time for which data is available. +If you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest +processed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record. +** *`timeout` (Optional, string | -1 | 0)*: Specifies the amount of time to wait until a datafeed starts. + [discrete] ==== start_trained_model_deployment Start a trained model deployment. @@ -2750,9 +6111,34 @@ Start a trained model deployment. {ref}/start-trained-model-deployment.html[Endpoint documentation] [source,ts] ---- -client.ml.startTrainedModelDeployment(...) +client.ml.startTrainedModelDeployment({ model_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (string)*: The unique identifier of the trained model. Currently, only PyTorch models are supported. +** *`cache_size` (Optional, number | string)*: The inference cache size (in memory outside the JVM heap) per node for the model. +The default value is the same size as the `model_size_bytes`. To disable the cache, +`0b` can be provided. +** *`number_of_allocations` (Optional, number)*: The number of model allocations on each node where the model is deployed. +All allocations on a node share the same copy of the model in memory but use +a separate set of threads to evaluate the model. +Increasing this value generally increases the throughput. +If this setting is greater than the number of hardware threads +it will automatically be changed to a value less than the number of hardware threads. +** *`priority` (Optional, Enum("normal" | "low"))*: The deployment priority. +** *`queue_capacity` (Optional, number)*: Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds +this value, new requests are rejected with a 429 error. +** *`threads_per_allocation` (Optional, number)*: Sets the number of threads used by each model allocation during inference. This generally increases +the inference speed. The inference process is a compute-bound process; any number +greater than the number of available hardware threads on the machine does not increase the +inference speed. If this setting is greater than the number of hardware threads +it will automatically be changed to a value less than the number of hardware threads. +** *`timeout` (Optional, string | -1 | 0)*: Specifies the amount of time to wait for the model to deploy. +** *`wait_for` (Optional, Enum("started" | "starting" | "fully_allocated"))*: Specifies the allocation status to wait for before returning. + [discrete] ==== stop_data_frame_analytics Stops one or more data frame analytics jobs. @@ -2760,9 +6146,31 @@ Stops one or more data frame analytics jobs. {ref}/stop-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.ml.stopDataFrameAnalytics(...) +client.ml.stopDataFrameAnalytics({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Identifier for the data frame analytics job. This identifier can contain +lowercase alphanumeric characters (a-z and 0-9), hyphens, and +underscores. It must start and end with alphanumeric characters. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no data frame analytics +jobs that match. +2. Contains the _all string or no identifiers and there are no matches. +3. Contains wildcard expressions and there are only partial matches. + +The default value is true, which returns an empty data_frame_analytics +array when there are no matches and the subset of results when there are +partial matches. If this parameter is false, the request returns a 404 +status code when there are no matches or only partial matches. +** *`force` (Optional, boolean)*: If true, the data frame analytics job is stopped forcefully. +** *`timeout` (Optional, string | -1 | 0)*: Controls the amount of time to wait until the data frame analytics job +stops. Defaults to 20 seconds. + [discrete] ==== stop_datafeed Stops one or more datafeeds. @@ -2770,9 +6178,28 @@ Stops one or more datafeeds. {ref}/ml-stop-datafeed.html[Endpoint documentation] [source,ts] ---- -client.ml.stopDatafeed(...) +client.ml.stopDatafeed({ datafeed_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`datafeed_id` (string)*: Identifier for the datafeed. You can stop multiple datafeeds in a single API request by using a comma-separated +list of datafeeds or a wildcard expression. You can close all datafeeds by using `_all` or by specifying `*` as +the identifier. +** *`allow_no_match` (Optional, boolean)*: 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. +** *`force` (Optional, boolean)*: If `true`, the datafeed is stopped forcefully. +** *`timeout` (Optional, string | -1 | 0)*: Specifies the amount of time to wait until a datafeed stops. + [discrete] ==== stop_trained_model_deployment Stop a trained model deployment. @@ -2780,9 +6207,21 @@ Stop a trained model deployment. {ref}/stop-trained-model-deployment.html[Endpoint documentation] [source,ts] ---- -client.ml.stopTrainedModelDeployment(...) +client.ml.stopTrainedModelDeployment({ model_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`model_id` (string)*: The unique identifier of the trained model. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: contains wildcard expressions and there are no deployments that match; +contains the `_all` string or no identifiers and there are no matches; or contains wildcard expressions and +there are only partial matches. By default, it returns an empty 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. +** *`force` (Optional, boolean)*: Forcefully stops the deployment, even if it is used by ingest pipelines. You can't use these pipelines until you +restart the model deployment. + [discrete] ==== update_data_frame_analytics Updates certain properties of a data frame analytics job. @@ -2790,9 +6229,29 @@ Updates certain properties of a data frame analytics job. {ref}/update-dfanalytics.html[Endpoint documentation] [source,ts] ---- -client.ml.updateDataFrameAnalytics(...) +client.ml.updateDataFrameAnalytics({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Identifier for the data frame analytics job. This identifier can contain +lowercase alphanumeric characters (a-z and 0-9), hyphens, and +underscores. It must start and end with alphanumeric characters. +** *`description` (Optional, string)*: A description of the job. +** *`model_memory_limit` (Optional, string)*: The approximate maximum amount of memory resources that are permitted for +analytical processing. If your `elasticsearch.yml` file contains an +`xpack.ml.max_model_memory_limit` setting, an error occurs when you try +to create data frame analytics jobs that have `model_memory_limit` values +greater than that setting. +** *`max_num_threads` (Optional, number)*: The maximum number of threads to be used by the analysis. Using more +threads may decrease the time necessary to complete the analysis at the +cost of using more CPU. Note that the process may use additional threads +for operational functionality other than the analysis itself. +** *`allow_lazy_start` (Optional, boolean)*: Specifies whether this job can start when there is insufficient machine +learning node capacity for it to be immediately assigned to a node. + [discrete] ==== update_datafeed Updates certain properties of a datafeed. @@ -2800,9 +6259,68 @@ Updates certain properties of a datafeed. {ref}/ml-update-datafeed.html[Endpoint documentation] [source,ts] ---- -client.ml.updateDatafeed(...) +client.ml.updateDatafeed({ datafeed_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed. +This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores. +It must start and end with alphanumeric characters. +** *`allow_no_indices` (Optional, boolean)*: If `true`, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the +`_all` string or when no indices are specified. +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines +whether wildcard expressions match hidden data streams. Supports a list of values. Valid values are: + +* `all`: Match any data stream or index, including hidden ones. +* `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed. +* `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or both. +* `none`: Wildcard patterns are not accepted. +* `open`: Match open, non-hidden indices. Also matches any non-hidden data stream. +** *`ignore_throttled` (Optional, boolean)*: If `true`, concrete, expanded or aliased indices are ignored when frozen. +** *`ignore_unavailable` (Optional, boolean)*: If `true`, unavailable indices (missing or closed) are ignored. +** *`aggregations` (Optional, Record)*: If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only +with low cardinality data. +** *`chunking_config` (Optional, { mode, time_span })*: Datafeeds might search over long time periods, for several months or years. This search is split into time +chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of +these time chunks are calculated; it is an advanced configuration option. +** *`delayed_data_check_config` (Optional, { check_window, enabled })*: Specifies whether the datafeed checks for missing data and the size of the window. The datafeed can optionally +search over indices that have already been read in an effort to determine whether any data has subsequently been +added to the index. If missing data is found, it is a good indication that the `query_delay` is set too low and +the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time +datafeeds. +** *`frequency` (Optional, string | -1 | 0)*: The interval at which scheduled queries are made while the datafeed runs in real time. The default value is +either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket +span. When `frequency` is shorter than the bucket span, interim results for the last (partial) bucket are +written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value +must be divisible by the interval of the date histogram aggregation. +** *`indices` (Optional, string[])*: An array of index names. Wildcards are supported. If any of the indices are in remote clusters, the machine +learning nodes must have the `remote_cluster_client` role. +** *`indices_options` (Optional, { allow_no_indices, expand_wildcards, ignore_unavailable, ignore_throttled })*: Specifies index expansion options that are used during search. +** *`job_id` (Optional, string)* +** *`max_empty_searches` (Optional, number)*: If a real-time datafeed has never seen any data (including during any initial training period), it automatically +stops and closes the associated job after this many real-time searches return no documents. In other words, +it stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no +end time that sees no data remains started until it is explicitly stopped. By default, it is not set. +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an +Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this +object is passed verbatim to Elasticsearch. Note that if you change the query, the analyzed data is also +changed. Therefore, the time required to learn might be long and the understandability of the results is +unpredictable. If you want to make significant changes to the source data, it is recommended that you +clone the job and datafeed and make the amendments in the clone. Let both run in parallel and close one +when you are satisfied with the results of the job. +** *`query_delay` (Optional, string | -1 | 0)*: The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might +not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default +value is randomly selected between `60s` and `120s`. This randomness improves the query performance +when there are multiple jobs running on the same node. +** *`runtime_mappings` (Optional, Record)*: Specifies runtime fields for the datafeed search. +** *`script_fields` (Optional, Record)*: Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. +The detector configuration objects in a job can contain functions that use these script fields. +** *`scroll_size` (Optional, number)*: The size parameter that is used in Elasticsearch searches when the datafeed does not use aggregations. +The maximum value is the value of `index.max_result_window`. + [discrete] ==== update_filter Updates the description of a filter, adds items, or removes items. @@ -2810,9 +6328,18 @@ Updates the description of a filter, adds items, or removes items. {ref}/ml-update-filter.html[Endpoint documentation] [source,ts] ---- -client.ml.updateFilter(...) +client.ml.updateFilter({ filter_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`filter_id` (string)*: A string that uniquely identifies a filter. +** *`add_items` (Optional, string[])*: The items to add to the filter. +** *`description` (Optional, string)*: A description for the filter. +** *`remove_items` (Optional, string[])*: The items to remove from the filter. + [discrete] ==== update_job Updates certain properties of an anomaly detection job. @@ -2820,9 +6347,64 @@ Updates certain properties of an anomaly detection job. {ref}/ml-update-job.html[Endpoint documentation] [source,ts] ---- -client.ml.updateJob(...) +client.ml.updateJob({ job_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the job. +** *`allow_lazy_open` (Optional, boolean)*: Advanced configuration option. Specifies whether this job can open when +there is insufficient machine learning node capacity for it to be +immediately assigned to a node. If `false` and a machine learning node +with capacity to run the job cannot immediately be found, the open +anomaly detection jobs API returns an error. However, this is also +subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this +option is set to `true`, the open anomaly detection jobs API does not +return an error and the job waits in the opening state until sufficient +machine learning node capacity is available. +** *`analysis_limits` (Optional, { model_memory_limit })* +** *`background_persist_interval` (Optional, string | -1 | 0)*: Advanced configuration option. The time between each periodic persistence +of the model. +The default value is a randomized value between 3 to 4 hours, which +avoids all jobs persisting at exactly the same time. The smallest allowed +value is 1 hour. +For very large models (several GB), persistence could take 10-20 minutes, +so do not set the value too low. +If the job is open when you make the update, you must stop the datafeed, +close the job, then reopen the job and restart the datafeed for the +changes to take effect. +** *`custom_settings` (Optional, Record)*: Advanced configuration option. Contains custom meta data about the job. +For example, it can contain custom URL information as shown in Adding +custom URLs to machine learning results. +** *`categorization_filters` (Optional, string[])* +** *`description` (Optional, string)*: A description of the job. +** *`model_plot_config` (Optional, { annotations_enabled, enabled, terms })* +** *`model_prune_window` (Optional, string | -1 | 0)* +** *`daily_model_snapshot_retention_after_days` (Optional, number)*: Advanced configuration option, which affects the automatic removal of old +model snapshots for this job. It specifies a period of time (in days) +after which only the first snapshot per day is retained. This period is +relative to the timestamp of the most recent snapshot for this job. Valid +values range from 0 to `model_snapshot_retention_days`. For jobs created +before version 7.8.0, the default value matches +`model_snapshot_retention_days`. +** *`model_snapshot_retention_days` (Optional, number)*: Advanced configuration option, which affects the automatic removal of old +model snapshots for this job. It specifies the maximum period of time (in +days) that snapshots are retained. This period is relative to the +timestamp of the most recent snapshot for this job. +** *`renormalization_window_days` (Optional, number)*: Advanced configuration option. The period over which adjustments to the +score are applied, as new data is seen. +** *`results_retention_days` (Optional, number)*: Advanced configuration option. The period of time (in days) that results +are retained. Age is calculated relative to the timestamp of the latest +bucket result. If this property has a non-null value, once per day at +00:30 (server time), results that are the specified number of days older +than the latest bucket result are deleted from Elasticsearch. The default +value is null, which means all results are retained. +** *`groups` (Optional, string[])*: A list of job groups. A job can belong to no groups or many. +** *`detectors` (Optional, { by_field_name, custom_rules, detector_description, detector_index, exclude_frequent, field_name, function, over_field_name, partition_field_name, use_null }[])*: An array of detector update objects. +** *`per_partition_categorization` (Optional, { enabled, stop_on_warn })*: Settings related to how categorization interacts with partition fields. + [discrete] ==== update_model_snapshot Updates certain properties of a snapshot. @@ -2830,9 +6412,20 @@ Updates certain properties of a snapshot. {ref}/ml-update-snapshot.html[Endpoint documentation] [source,ts] ---- -client.ml.updateModelSnapshot(...) +client.ml.updateModelSnapshot({ job_id, snapshot_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`snapshot_id` (string)*: Identifier for the model snapshot. +** *`description` (Optional, string)*: A description of the model snapshot. +** *`retain` (Optional, boolean)*: If `true`, this snapshot will not be deleted during automatic cleanup of +snapshots older than `model_snapshot_retention_days`. However, this +snapshot will be deleted when the job is deleted. + [discrete] ==== update_trained_model_deployment Updates certain properties of trained model deployment. @@ -2840,9 +6433,14 @@ Updates certain properties of trained model deployment. {ref}/update-trained-model-deployment.html[Endpoint documentation] [source,ts] ---- -client.ml.updateTrainedModelDeployment(...) +client.ml.updateTrainedModelDeployment() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== upgrade_job_snapshot Upgrades a given job snapshot to the current major version. @@ -2850,9 +6448,19 @@ Upgrades a given job snapshot to the current major version. {ref}/ml-upgrade-job-model-snapshot.html[Endpoint documentation] [source,ts] ---- -client.ml.upgradeJobSnapshot(...) +client.ml.upgradeJobSnapshot({ job_id, snapshot_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`job_id` (string)*: Identifier for the anomaly detection job. +** *`snapshot_id` (string)*: A numerical character string that uniquely identifies the model snapshot. +** *`wait_for_completion` (Optional, boolean)*: When true, the API won’t respond until the upgrade is complete. +Otherwise, it responds as soon as the upgrade task is assigned to a node. +** *`timeout` (Optional, string | -1 | 0)*: Controls the time to wait for the request to complete. + [discrete] === nodes [discrete] @@ -2862,9 +6470,17 @@ Removes the archived repositories metering information present in the cluster. {ref}/clear-repositories-metering-archive-api.html[Endpoint documentation] [source,ts] ---- -client.nodes.clearRepositoriesMeteringArchive(...) +client.nodes.clearRepositoriesMeteringArchive({ node_id, max_archive_version }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (string | string[])*: List of node IDs or names used to limit returned information. +All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes). +** *`max_archive_version` (number)*: Specifies the maximum [archive_version](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-repositories-metering-api.html#get-repositories-metering-api-response-body) to be cleared from the archive. + [discrete] ==== get_repositories_metering_info Returns cluster repositories metering information. @@ -2872,9 +6488,16 @@ Returns cluster repositories metering information. {ref}/get-repositories-metering-api.html[Endpoint documentation] [source,ts] ---- -client.nodes.getRepositoriesMeteringInfo(...) +client.nodes.getRepositoriesMeteringInfo({ node_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (string | string[])*: List of node IDs or names used to limit returned information. +All the nodes selective options are explained [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html#cluster-nodes). + [discrete] ==== hot_threads Returns information about hot threads on each node in the cluster. @@ -2882,9 +6505,27 @@ Returns information about hot threads on each node in the cluster. {ref}/cluster-nodes-hot-threads.html[Endpoint documentation] [source,ts] ---- -client.nodes.hotThreads(...) +client.nodes.hotThreads({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (Optional, string | string[])*: List of node IDs or names used to limit returned information. +** *`ignore_idle_threads` (Optional, boolean)*: If true, known idle threads (e.g. waiting in a socket select, or to get +a task from an empty queue) are filtered out. +** *`interval` (Optional, string | -1 | 0)*: The interval to do the second sampling of threads. +** *`snapshots` (Optional, number)*: Number of samples of thread stacktrace. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`threads` (Optional, number)*: Specifies the number of hot threads to provide information for. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received +before the timeout expires, the request fails and returns an error. +** *`type` (Optional, Enum("cpu" | "wait" | "block" | "gpu" | "mem"))*: The type to sample. +** *`sort` (Optional, Enum("cpu" | "wait" | "block" | "gpu" | "mem"))*: The sort order for 'cpu' type (default: total) + [discrete] ==== info Returns information about nodes in the cluster. @@ -2892,9 +6533,19 @@ Returns information about nodes in the cluster. {ref}/cluster-nodes-info.html[Endpoint documentation] [source,ts] ---- -client.nodes.info(...) +client.nodes.info({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (Optional, string | string[])*: List of node IDs or names used to limit returned information. +** *`metric` (Optional, string | string[])*: Limits the information returned to the specific metrics. Supports a list, such as http,ingest. +** *`flat_settings` (Optional, boolean)*: If true, returns settings in flat format. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + [discrete] ==== reload_secure_settings Reloads secure settings. @@ -2902,9 +6553,17 @@ Reloads secure settings. {ref}/secure-settings.html[Endpoint documentation] [source,ts] ---- -client.nodes.reloadSecureSettings(...) +client.nodes.reloadSecureSettings({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (Optional, string | string[])*: A list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`secure_settings_password` (Optional, string)* + [discrete] ==== stats Returns statistical information about nodes in the cluster. @@ -2912,9 +6571,27 @@ Returns statistical information about nodes in the cluster. {ref}/cluster-nodes-stats.html[Endpoint documentation] [source,ts] ---- -client.nodes.stats(...) +client.nodes.stats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (Optional, string | string[])*: List of node IDs or names used to limit returned information. +** *`metric` (Optional, string | string[])*: Limit the information returned to the specified metrics +** *`index_metric` (Optional, string | string[])*: Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified. +** *`completion_fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in fielddata and suggest statistics. +** *`fielddata_fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in fielddata statistics. +** *`fields` (Optional, string | string[])*: List or wildcard expressions of fields to include in the statistics. +** *`groups` (Optional, boolean)*: List of search groups to include in the search statistics. +** *`include_segment_file_sizes` (Optional, boolean)*: If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). +** *`level` (Optional, Enum("cluster" | "indices" | "shards"))*: Indicates whether statistics are aggregated at the cluster, index, or shard level. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. +** *`types` (Optional, string[])*: A list of document types for the indexing index metric. +** *`include_unloaded_segments` (Optional, boolean)*: If set to true segment stats will include stats for segments that are not currently loaded into memory + [discrete] ==== usage Returns low-level information about REST actions usage on nodes. @@ -2922,9 +6599,17 @@ Returns low-level information about REST actions usage on nodes. {ref}/cluster-nodes-usage.html[Endpoint documentation] [source,ts] ---- -client.nodes.usage(...) +client.nodes.usage({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (Optional, string | string[])*: A list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +** *`metric` (Optional, string | string[])*: Limit the information returned to the specified metrics +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] === rollup [discrete] @@ -2934,9 +6619,15 @@ Deletes an existing rollup job. {ref}/rollup-delete-job.html[Endpoint documentation] [source,ts] ---- -client.rollup.deleteJob(...) +client.rollup.deleteJob({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The ID of the job to delete + [discrete] ==== get_jobs Retrieves the configuration, stats, and status of rollup jobs. @@ -2944,9 +6635,15 @@ Retrieves the configuration, stats, and status of rollup jobs. {ref}/rollup-get-job.html[Endpoint documentation] [source,ts] ---- -client.rollup.getJobs(...) +client.rollup.getJobs({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: The ID of the job(s) to fetch. Accepts glob patterns, or left blank for all jobs + [discrete] ==== get_rollup_caps Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern. @@ -2954,9 +6651,15 @@ Returns the capabilities of any rollup jobs that have been configured for a spec {ref}/rollup-get-rollup-caps.html[Endpoint documentation] [source,ts] ---- -client.rollup.getRollupCaps(...) +client.rollup.getRollupCaps({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: The ID of the index to check rollup capabilities on, or left blank for all jobs + [discrete] ==== get_rollup_index_caps Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored). @@ -2964,9 +6667,15 @@ Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the i {ref}/rollup-get-rollup-index-caps.html[Endpoint documentation] [source,ts] ---- -client.rollup.getRollupIndexCaps(...) +client.rollup.getRollupIndexCaps({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: The rollup index or index pattern to obtain rollup capabilities from. + [discrete] ==== put_job Creates a rollup job. @@ -2974,9 +6683,40 @@ Creates a rollup job. {ref}/rollup-put-job.html[Endpoint documentation] [source,ts] ---- -client.rollup.putJob(...) +client.rollup.putJob({ id, cron, groups, index_pattern, page_size, rollup_index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Identifier for the rollup job. This can be any alphanumeric string and uniquely identifies the +data that is associated with the rollup job. The ID is persistent; it is stored with the rolled +up data. If you create a job, let it run for a while, then delete the job, the data that the job +rolled up is still be associated with this job ID. You cannot create a new job with the same ID +since that could lead to problems with mismatched job configurations. +** *`cron` (string)*: A cron string which defines the intervals when the rollup job should be executed. When the interval +triggers, the indexer attempts to rollup the data in the index pattern. The cron pattern is unrelated +to the time interval of the data being rolled up. For example, you may wish to create hourly rollups +of your document but to only run the indexer on a daily basis at midnight, as defined by the cron. The +cron pattern is defined just like a Watcher cron schedule. +** *`groups` ({ date_histogram, histogram, terms })*: Defines the grouping fields and aggregations that are defined for this rollup job. These fields will then be +available later for aggregating into buckets. These aggs and fields can be used in any combination. Think of +the groups configuration as defining a set of tools that can later be used in aggregations to partition the +data. Unlike raw data, we have to think ahead to which fields and aggregations might be used. Rollups provide +enough flexibility that you simply need to determine which fields are needed, not in what order they are needed. +** *`index_pattern` (string)*: The index or index pattern to roll up. Supports wildcard-style patterns (`logstash-*`). The job attempts to +rollup the entire index or index-pattern. +** *`page_size` (number)*: The number of bucket results that are processed on each iteration of the rollup indexer. A larger value tends +to execute faster, but requires more memory during processing. This value has no effect on how the data is +rolled up; it is merely used for tweaking the speed or memory cost of the indexer. +** *`rollup_index` (string)*: The index that contains the rollup results. The index can be shared with other rollup jobs. The data is stored so that it doesn’t interfere with unrelated jobs. +** *`metrics` (Optional, { field, metrics }[])*: Defines the metrics to collect for each grouping tuple. By default, only the doc_counts are collected for each +group. To make rollup useful, you will often add metrics like averages, mins, maxes, etc. Metrics are defined +on a per-field basis and for each field you configure which metric should be collected. +** *`timeout` (Optional, string | -1 | 0)*: Time to wait for the request to complete. +** *`headers` (Optional, Record)* + [discrete] ==== rollup_search Enables searching rolled-up data using the standard query DSL. @@ -2984,9 +6724,20 @@ Enables searching rolled-up data using the standard query DSL. {ref}/rollup-search.html[Endpoint documentation] [source,ts] ---- -client.rollup.rollupSearch(...) +client.rollup.rollupSearch({ index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (string | string[])*: The indices or index-pattern(s) (containing rollup or regular data) that should be searched +** *`rest_total_hits_as_int` (Optional, boolean)*: Indicates whether hits.total should be rendered as an integer or an object in the rest search response +** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response +** *`aggregations` (Optional, Record)* +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* +** *`size` (Optional, number)*: Must be zero if set, as rollups work on pre-aggregated data + [discrete] ==== start_job Starts an existing, stopped rollup job. @@ -2994,9 +6745,15 @@ Starts an existing, stopped rollup job. {ref}/rollup-start-job.html[Endpoint documentation] [source,ts] ---- -client.rollup.startJob(...) +client.rollup.startJob({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The ID of the job to start + [discrete] ==== stop_job Stops an existing, started rollup job. @@ -3004,9 +6761,17 @@ Stops an existing, started rollup job. {ref}/rollup-stop-job.html[Endpoint documentation] [source,ts] ---- -client.rollup.stopJob(...) +client.rollup.stopJob({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The ID of the job to stop +** *`timeout` (Optional, string | -1 | 0)*: Block for (at maximum) the specified duration while waiting for the job to stop. Defaults to 30s. +** *`wait_for_completion` (Optional, boolean)*: True if the API should block until the job has fully stopped, false if should be executed async. Defaults to false. + [discrete] === search_application [discrete] @@ -3016,9 +6781,15 @@ Deletes a search application. {ref}/put-search-application.html[Endpoint documentation] [source,ts] ---- -client.searchApplication.delete(...) +client.searchApplication.delete({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the search application to delete + [discrete] ==== delete_behavioral_analytics Delete a behavioral analytics collection. @@ -3026,9 +6797,15 @@ Delete a behavioral analytics collection. {ref}/delete-analytics-collection.html[Endpoint documentation] [source,ts] ---- -client.searchApplication.deleteBehavioralAnalytics(...) +client.searchApplication.deleteBehavioralAnalytics({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the analytics collection to be deleted + [discrete] ==== get Returns the details about a search application. @@ -3036,9 +6813,15 @@ Returns the details about a search application. {ref}/get-search-application.html[Endpoint documentation] [source,ts] ---- -client.searchApplication.get(...) +client.searchApplication.get({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the search application + [discrete] ==== get_behavioral_analytics Returns the existing behavioral analytics collections. @@ -3046,9 +6829,15 @@ Returns the existing behavioral analytics collections. {ref}/list-analytics-collection.html[Endpoint documentation] [source,ts] ---- -client.searchApplication.getBehavioralAnalytics(...) +client.searchApplication.getBehavioralAnalytics({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string[])*: A list of analytics collections to limit the returned information + [discrete] ==== list Returns the existing search applications. @@ -3056,9 +6845,17 @@ Returns the existing search applications. {ref}/list-search-applications.html[Endpoint documentation] [source,ts] ---- -client.searchApplication.list(...) +client.searchApplication.list({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`q` (Optional, string)*: Query in the Lucene query string syntax" +** *`from` (Optional, number)*: Starting offset (default: 0) +** *`size` (Optional, number)*: specifies a max number of results to get + [discrete] ==== post_behavioral_analytics_event Creates a behavioral analytics event for existing collection. @@ -3066,9 +6863,14 @@ Creates a behavioral analytics event for existing collection. http://todo.com/tbd[Endpoint documentation] [source,ts] ---- -client.searchApplication.postBehavioralAnalyticsEvent(...) +client.searchApplication.postBehavioralAnalyticsEvent() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== put Creates or updates a search application. @@ -3076,9 +6878,16 @@ Creates or updates a search application. {ref}/put-search-application.html[Endpoint documentation] [source,ts] ---- -client.searchApplication.put(...) +client.searchApplication.put({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the search application to be created or updated +** *`create` (Optional, boolean)*: If true, requires that a search application with the specified resource_id does not already exist. (default: false) + [discrete] ==== put_behavioral_analytics Creates a behavioral analytics collection. @@ -3086,9 +6895,30 @@ Creates a behavioral analytics collection. {ref}/put-analytics-collection.html[Endpoint documentation] [source,ts] ---- -client.searchApplication.putBehavioralAnalytics(...) +client.searchApplication.putBehavioralAnalytics({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the analytics collection to be created or updated + +[discrete] +==== render_query +Renders a query for given search application search parameters + +{ref}/search-application-render-query.html[Endpoint documentation] +[source,ts] +---- +client.searchApplication.renderQuery() +---- + +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== search Perform a search against a search application @@ -3096,9 +6926,16 @@ Perform a search against a search application {ref}/search-application-search.html[Endpoint documentation] [source,ts] ---- -client.searchApplication.search(...) +client.searchApplication.search({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the search application to be searched +** *`params` (Optional, Record)* + [discrete] === searchable_snapshots [discrete] @@ -3108,9 +6945,16 @@ Retrieve node-level cache statistics about searchable snapshots. {ref}/searchable-snapshots-apis.html[Endpoint documentation] [source,ts] ---- -client.searchableSnapshots.cacheStats(...) +client.searchableSnapshots.cacheStats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`node_id` (Optional, string | string[])*: A list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +** *`master_timeout` (Optional, string | -1 | 0)* + [discrete] ==== clear_cache Clear the cache of searchable snapshots. @@ -3118,9 +6962,20 @@ Clear the cache of searchable snapshots. {ref}/searchable-snapshots-apis.html[Endpoint documentation] [source,ts] ---- -client.searchableSnapshots.clearCache(...) +client.searchableSnapshots.clearCache({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names +** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both. +** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) +** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed) +** *`pretty` (Optional, boolean)* +** *`human` (Optional, boolean)* + [discrete] ==== mount Mount a snapshot as a searchable index. @@ -3128,9 +6983,23 @@ Mount a snapshot as a searchable index. {ref}/searchable-snapshots-api-mount-snapshot.html[Endpoint documentation] [source,ts] ---- -client.searchableSnapshots.mount(...) +client.searchableSnapshots.mount({ repository, snapshot, index }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string)*: The name of the repository containing the snapshot of the index to mount +** *`snapshot` (string)*: The name of the snapshot of the index to mount +** *`index` (string)* +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`wait_for_completion` (Optional, boolean)*: Should this request wait until the operation has completed before returning +** *`storage` (Optional, string)*: Selects the kind of local storage used to accelerate searches. Experimental, and defaults to `full_copy` +** *`renamed_index` (Optional, string)* +** *`index_settings` (Optional, Record)* +** *`ignore_index_settings` (Optional, string[])* + [discrete] ==== stats Retrieve shard-level statistics about searchable snapshots. @@ -3138,9 +7007,16 @@ Retrieve shard-level statistics about searchable snapshots. {ref}/searchable-snapshots-apis.html[Endpoint documentation] [source,ts] ---- -client.searchableSnapshots.stats(...) +client.searchableSnapshots.stats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`index` (Optional, string | string[])*: A list of index names +** *`level` (Optional, Enum("cluster" | "indices" | "shards"))*: Return stats aggregated at cluster, index or shard level + [discrete] === security [discrete] @@ -3150,9 +7026,14 @@ Enables authentication as a user and retrieve information about the authenticate {ref}/security-api-authenticate.html[Endpoint documentation] [source,ts] ---- -client.security.authenticate(...) +client.security.authenticate() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== bulk_update_api_keys Updates the attributes of multiple existing API keys. @@ -3160,9 +7041,14 @@ Updates the attributes of multiple existing API keys. {ref}/security-api-bulk-update-api-keys.html[Endpoint documentation] [source,ts] ---- -client.security.bulkUpdateApiKeys(...) +client.security.bulkUpdateApiKeys() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== change_password Changes the passwords of users in the native realm and built-in users. @@ -3170,9 +7056,22 @@ Changes the passwords of users in the native realm and built-in users. {ref}/security-api-change-password.html[Endpoint documentation] [source,ts] ---- -client.security.changePassword(...) +client.security.changePassword({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`username` (Optional, string)*: The user whose password you want to change. If you do not specify this +parameter, the password is changed for the current user. +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +** *`password` (Optional, string)*: The new password value. Passwords must be at least 6 characters long. +** *`password_hash` (Optional, string)*: A hash of the new password value. This must be produced using the same +hashing algorithm as has been configured for password storage. For more details, +see the explanation of the `xpack.security.authc.password_hashing.algorithm` +setting. + [discrete] ==== clear_api_key_cache Clear a subset or all entries from the API key cache. @@ -3180,9 +7079,15 @@ Clear a subset or all entries from the API key cache. {ref}/security-api-clear-api-key-cache.html[Endpoint documentation] [source,ts] ---- -client.security.clearApiKeyCache(...) +client.security.clearApiKeyCache({ ids }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`ids` (string | string[])*: A list of IDs of API keys to clear from the cache + [discrete] ==== clear_cached_privileges Evicts application privileges from the native application privileges cache. @@ -3190,9 +7095,15 @@ Evicts application privileges from the native application privileges cache. {ref}/security-api-clear-privilege-cache.html[Endpoint documentation] [source,ts] ---- -client.security.clearCachedPrivileges(...) +client.security.clearCachedPrivileges({ application }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`application` (string)*: A list of application names + [discrete] ==== clear_cached_realms Evicts users from the user cache. Can completely clear the cache or evict specific users. @@ -3200,9 +7111,16 @@ Evicts users from the user cache. Can completely clear the cache or evict specif {ref}/security-api-clear-cache.html[Endpoint documentation] [source,ts] ---- -client.security.clearCachedRealms(...) +client.security.clearCachedRealms({ realms }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`realms` (string | string[])*: List of realms to clear +** *`usernames` (Optional, string[])*: List of usernames to clear from the cache + [discrete] ==== clear_cached_roles Evicts roles from the native role cache. @@ -3210,9 +7128,15 @@ Evicts roles from the native role cache. {ref}/security-api-clear-role-cache.html[Endpoint documentation] [source,ts] ---- -client.security.clearCachedRoles(...) +client.security.clearCachedRoles({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string | string[])*: Role name + [discrete] ==== clear_cached_service_tokens Evicts tokens from the service account token caches. @@ -3220,9 +7144,17 @@ Evicts tokens from the service account token caches. {ref}/security-api-clear-service-token-caches.html[Endpoint documentation] [source,ts] ---- -client.security.clearCachedServiceTokens(...) +client.security.clearCachedServiceTokens({ namespace, service, name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`namespace` (string)*: An identifier for the namespace +** *`service` (string)*: An identifier for the service name +** *`name` (string | string[])*: A list of service token names + [discrete] ==== create_api_key Creates an API key for access without requiring basic authentication. @@ -3230,9 +7162,34 @@ Creates an API key for access without requiring basic authentication. {ref}/security-api-create-api-key.html[Endpoint documentation] [source,ts] ---- -client.security.createApiKey(...) +client.security.createApiKey({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key. By default, API keys never expire. +** *`name` (Optional, string)*: Specifies the name for this API key. +** *`role_descriptors` (Optional, Record)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. +** *`metadata` (Optional, Record)*: Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. + +[discrete] +==== create_cross_cluster_api_key +Creates a cross-cluster API key for API key based remote cluster access. + +{ref}/security-api-create-cross-cluster-api-key.html[Endpoint documentation] +[source,ts] +---- +client.security.createCrossClusterApiKey() +---- + +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== create_service_token Creates a service account token for access without requiring basic authentication. @@ -3240,9 +7197,18 @@ Creates a service account token for access without requiring basic authenticatio {ref}/security-api-create-service-token.html[Endpoint documentation] [source,ts] ---- -client.security.createServiceToken(...) +client.security.createServiceToken({ namespace, service }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`namespace` (string)*: An identifier for the namespace +** *`service` (string)*: An identifier for the service name +** *`name` (Optional, string)*: An identifier for the token name +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + [discrete] ==== delete_privileges Removes application privileges. @@ -3250,9 +7216,17 @@ Removes application privileges. {ref}/security-api-delete-privilege.html[Endpoint documentation] [source,ts] ---- -client.security.deletePrivileges(...) +client.security.deletePrivileges({ application, name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`application` (string)*: Application name +** *`name` (string | string[])*: Privilege name +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + [discrete] ==== delete_role Removes roles in the native realm. @@ -3260,9 +7234,16 @@ Removes roles in the native realm. {ref}/security-api-delete-role.html[Endpoint documentation] [source,ts] ---- -client.security.deleteRole(...) +client.security.deleteRole({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: Role name +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + [discrete] ==== delete_role_mapping Removes role mappings. @@ -3270,9 +7251,16 @@ Removes role mappings. {ref}/security-api-delete-role-mapping.html[Endpoint documentation] [source,ts] ---- -client.security.deleteRoleMapping(...) +client.security.deleteRoleMapping({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: Role-mapping name +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + [discrete] ==== delete_service_token Deletes a service account token. @@ -3280,9 +7268,18 @@ Deletes a service account token. {ref}/security-api-delete-service-token.html[Endpoint documentation] [source,ts] ---- -client.security.deleteServiceToken(...) +client.security.deleteServiceToken({ namespace, service, name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`namespace` (string)*: An identifier for the namespace +** *`service` (string)*: An identifier for the service name +** *`name` (string)*: An identifier for the token name +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` (the default) then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + [discrete] ==== delete_user Deletes users from the native realm. @@ -3290,9 +7287,16 @@ Deletes users from the native realm. {ref}/security-api-delete-user.html[Endpoint documentation] [source,ts] ---- -client.security.deleteUser(...) +client.security.deleteUser({ username }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`username` (string)*: username +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + [discrete] ==== disable_user Disables users in the native realm. @@ -3300,9 +7304,16 @@ Disables users in the native realm. {ref}/security-api-disable-user.html[Endpoint documentation] [source,ts] ---- -client.security.disableUser(...) +client.security.disableUser({ username }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`username` (string)*: The username of the user to disable +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + [discrete] ==== enable_user Enables users in the native realm. @@ -3310,9 +7321,16 @@ Enables users in the native realm. {ref}/security-api-enable-user.html[Endpoint documentation] [source,ts] ---- -client.security.enableUser(...) +client.security.enableUser({ username }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`username` (string)*: The username of the user to enable +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + [discrete] ==== enroll_kibana Allows a kibana instance to configure itself to communicate with a secured elasticsearch cluster. @@ -3320,9 +7338,14 @@ Allows a kibana instance to configure itself to communicate with a secured elast {ref}/security-api-kibana-enrollment.html[Endpoint documentation] [source,ts] ---- -client.security.enrollKibana(...) +client.security.enrollKibana() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== enroll_node Allows a new node to enroll to an existing cluster with security enabled. @@ -3330,9 +7353,14 @@ Allows a new node to enroll to an existing cluster with security enabled. {ref}/security-api-node-enrollment.html[Endpoint documentation] [source,ts] ---- -client.security.enrollNode(...) +client.security.enrollNode() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== get_api_key Retrieves information for one or more API keys. @@ -3340,9 +7368,23 @@ Retrieves information for one or more API keys. {ref}/security-api-get-api-key.html[Endpoint documentation] [source,ts] ---- -client.security.getApiKey(...) +client.security.getApiKey({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: API key id of the API key to be retrieved +** *`name` (Optional, string)*: API key name of the API key to be retrieved +** *`owner` (Optional, boolean)*: flag to query API keys owned by the currently authenticated user +** *`realm_name` (Optional, string)*: realm name of the user who created this API key to be retrieved +** *`username` (Optional, string)*: user name of the user who created this API key to be retrieved +** *`with_limited_by` (Optional, boolean)*: 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. + [discrete] ==== get_builtin_privileges Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch. @@ -3350,9 +7392,14 @@ Retrieves the list of cluster privileges and index privileges that are available {ref}/security-api-get-builtin-privileges.html[Endpoint documentation] [source,ts] ---- -client.security.getBuiltinPrivileges(...) +client.security.getBuiltinPrivileges() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== get_privileges Retrieves application privileges. @@ -3360,9 +7407,16 @@ Retrieves application privileges. {ref}/security-api-get-privileges.html[Endpoint documentation] [source,ts] ---- -client.security.getPrivileges(...) +client.security.getPrivileges({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`application` (Optional, string)*: Application name +** *`name` (Optional, string | string[])*: Privilege name + [discrete] ==== get_role Retrieves roles in the native realm. @@ -3370,9 +7424,15 @@ Retrieves roles in the native realm. {ref}/security-api-get-role.html[Endpoint documentation] [source,ts] ---- -client.security.getRole(...) +client.security.getRole({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string | string[])*: The name of the role. You can specify multiple roles as a list. If you do not specify this parameter, the API returns information about all roles. + [discrete] ==== get_role_mapping Retrieves role mappings. @@ -3380,9 +7440,15 @@ Retrieves role mappings. {ref}/security-api-get-role-mapping.html[Endpoint documentation] [source,ts] ---- -client.security.getRoleMapping(...) +client.security.getRoleMapping({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (Optional, string | string[])*: The distinct name that identifies the role mapping. The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way. You can specify multiple mapping names as a list. If you do not specify this parameter, the API returns information about all role mappings. + [discrete] ==== get_service_accounts Retrieves information about service accounts. @@ -3390,9 +7456,16 @@ Retrieves information about service accounts. {ref}/security-api-get-service-accounts.html[Endpoint documentation] [source,ts] ---- -client.security.getServiceAccounts(...) +client.security.getServiceAccounts({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`namespace` (Optional, string)*: 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. +** *`service` (Optional, string)*: Name of the service name. Omit this parameter to retrieve information about all service accounts that belong to the specified `namespace`. + [discrete] ==== get_service_credentials Retrieves information of all service credentials for a service account. @@ -3400,9 +7473,16 @@ Retrieves information of all service credentials for a service account. {ref}/security-api-get-service-credentials.html[Endpoint documentation] [source,ts] ---- -client.security.getServiceCredentials(...) +client.security.getServiceCredentials({ namespace, service }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`namespace` (string)*: Name of the namespace. +** *`service` (string)*: Name of the service name. + [discrete] ==== get_token Creates a bearer token for access without requiring basic authentication. @@ -3410,9 +7490,20 @@ Creates a bearer token for access without requiring basic authentication. {ref}/security-api-get-token.html[Endpoint documentation] [source,ts] ---- -client.security.getToken(...) +client.security.getToken({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`grant_type` (Optional, Enum("password" | "client_credentials" | "_kerberos" | "refresh_token"))* +** *`scope` (Optional, string)* +** *`password` (Optional, string)* +** *`kerberos_ticket` (Optional, string)* +** *`refresh_token` (Optional, string)* +** *`username` (Optional, string)* + [discrete] ==== get_user Retrieves information about users in the native realm and built-in users. @@ -3420,9 +7511,16 @@ Retrieves information about users in the native realm and built-in users. {ref}/security-api-get-user.html[Endpoint documentation] [source,ts] ---- -client.security.getUser(...) +client.security.getUser({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`username` (Optional, string | string[])*: An identifier for the user. You can specify multiple usernames as a list. If you omit this parameter, the API retrieves information about all users. +** *`with_profile_uid` (Optional, boolean)*: If true will return the User Profile ID for a user, if any. + [discrete] ==== get_user_privileges Retrieves security privileges for the logged in user. @@ -3430,9 +7528,17 @@ Retrieves security privileges for the logged in user. {ref}/security-api-get-user-privileges.html[Endpoint documentation] [source,ts] ---- -client.security.getUserPrivileges(...) +client.security.getUserPrivileges({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`application` (Optional, string)*: The name of the application. Application privileges are always associated with exactly one application. If you do not specify this parameter, the API returns information about all privileges for all applications. +** *`priviledge` (Optional, string)*: The name of the privilege. If you do not specify this parameter, the API returns information about all privileges for the requested application. +** *`username` (Optional, string | null)* + [discrete] ==== grant_api_key Creates an API key on behalf of another user. @@ -3440,9 +7546,20 @@ Creates an API key on behalf of another user. {ref}/security-api-grant-api-key.html[Endpoint documentation] [source,ts] ---- -client.security.grantApiKey(...) +client.security.grantApiKey({ api_key, grant_type }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`api_key` ({ name, expiration, role_descriptors, metadata })* +** *`grant_type` (Enum("access_token" | "password"))* +** *`access_token` (Optional, string)* +** *`username` (Optional, string)* +** *`password` (Optional, string)* +** *`run_as` (Optional, string)* + [discrete] ==== has_privileges Determines whether the specified user has a specified list of privileges. @@ -3450,9 +7567,18 @@ Determines whether the specified user has a specified list of privileges. {ref}/security-api-has-privileges.html[Endpoint documentation] [source,ts] ---- -client.security.hasPrivileges(...) +client.security.hasPrivileges({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`user` (Optional, string)*: Username +** *`application` (Optional, { application, privileges, resources }[])* +** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "grant_api_key" | "manage" | "manage_api_key" | "manage_ccr" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "read_ccr" | "read_ilm" | "read_pipeline" | "read_slm" | "transport_client")[])*: A list of the cluster privileges that you want to check. +** *`index` (Optional, { names, privileges, allow_restricted_indices }[])* + [discrete] ==== invalidate_api_key Invalidates one or more API keys. @@ -3460,9 +7586,20 @@ Invalidates one or more API keys. {ref}/security-api-invalidate-api-key.html[Endpoint documentation] [source,ts] ---- -client.security.invalidateApiKey(...) +client.security.invalidateApiKey({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)* +** *`ids` (Optional, string[])* +** *`name` (Optional, string)* +** *`owner` (Optional, boolean)* +** *`realm_name` (Optional, string)* +** *`username` (Optional, string)* + [discrete] ==== invalidate_token Invalidates one or more access tokens or refresh tokens. @@ -3470,9 +7607,18 @@ Invalidates one or more access tokens or refresh tokens. {ref}/security-api-invalidate-token.html[Endpoint documentation] [source,ts] ---- -client.security.invalidateToken(...) +client.security.invalidateToken({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`token` (Optional, string)* +** *`refresh_token` (Optional, string)* +** *`realm_name` (Optional, string)* +** *`username` (Optional, string)* + [discrete] ==== oidc_authenticate Exchanges an OpenID Connection authentication response message for an Elasticsearch access token and refresh token pair @@ -3480,9 +7626,14 @@ Exchanges an OpenID Connection authentication response message for an Elasticsea {ref}/security-api-oidc-authenticate.html[Endpoint documentation] [source,ts] ---- -client.security.oidcAuthenticate(...) +client.security.oidcAuthenticate() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== oidc_logout Invalidates a refresh token and access token that was generated from the OpenID Connect Authenticate API @@ -3490,9 +7641,14 @@ Invalidates a refresh token and access token that was generated from the OpenID {ref}/security-api-oidc-logout.html[Endpoint documentation] [source,ts] ---- -client.security.oidcLogout(...) +client.security.oidcLogout() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== oidc_prepare_authentication Creates an OAuth 2.0 authentication request as a URL string @@ -3500,9 +7656,14 @@ Creates an OAuth 2.0 authentication request as a URL string {ref}/security-api-oidc-prepare-authentication.html[Endpoint documentation] [source,ts] ---- -client.security.oidcPrepareAuthentication(...) +client.security.oidcPrepareAuthentication() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== put_privileges Adds or updates application privileges. @@ -3510,9 +7671,15 @@ Adds or updates application privileges. {ref}/security-api-put-privileges.html[Endpoint documentation] [source,ts] ---- -client.security.putPrivileges(...) +client.security.putPrivileges({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + [discrete] ==== put_role Adds and updates roles in the native realm. @@ -3520,9 +7687,23 @@ Adds and updates roles in the native realm. {ref}/security-api-put-role.html[Endpoint documentation] [source,ts] ---- -client.security.putRole(...) +client.security.putRole({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: The name of the role. +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +** *`applications` (Optional, { application, privileges, resources }[])*: A list of application privilege entries. +** *`cluster` (Optional, Enum("all" | "cancel_task" | "create_snapshot" | "grant_api_key" | "manage" | "manage_api_key" | "manage_ccr" | "manage_enrich" | "manage_ilm" | "manage_index_templates" | "manage_ingest_pipelines" | "manage_logstash_pipelines" | "manage_ml" | "manage_oidc" | "manage_own_api_key" | "manage_pipeline" | "manage_rollup" | "manage_saml" | "manage_security" | "manage_service_account" | "manage_slm" | "manage_token" | "manage_transform" | "manage_user_profile" | "manage_watcher" | "monitor" | "monitor_ml" | "monitor_rollup" | "monitor_snapshot" | "monitor_text_structure" | "monitor_transform" | "monitor_watcher" | "read_ccr" | "read_ilm" | "read_pipeline" | "read_slm" | "transport_client")[])*: A list of cluster privileges. These privileges define the cluster-level actions for users with this role. +** *`global` (Optional, Record)*: An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. +** *`indices` (Optional, { field_security, names, privileges, query, allow_restricted_indices }[])*: A list of indices permissions entries. +** *`metadata` (Optional, Record)*: Optional metadata. Within the metadata object, keys that begin with an underscore (`_`) are reserved for system use. +** *`run_as` (Optional, string[])*: A list of users that the owners of this role can impersonate. +** *`transient_metadata` (Optional, { enabled })*: Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If `enabled` is `false`, the role is ignored, but is still listed in the response from the authenticate API. + [discrete] ==== put_role_mapping Creates and updates role mappings. @@ -3530,9 +7711,21 @@ Creates and updates role mappings. {ref}/security-api-put-role-mapping.html[Endpoint documentation] [source,ts] ---- -client.security.putRoleMapping(...) +client.security.putRoleMapping({ name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`name` (string)*: Role-mapping name +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +** *`enabled` (Optional, boolean)* +** *`metadata` (Optional, Record)* +** *`roles` (Optional, string[])* +** *`rules` (Optional, { any, all, field, except })* +** *`run_as` (Optional, string[])* + [discrete] ==== put_user Adds and updates users in the native realm. These users are commonly referred to as native users. @@ -3540,9 +7733,23 @@ Adds and updates users in the native realm. These users are commonly referred to {ref}/security-api-put-user.html[Endpoint documentation] [source,ts] ---- -client.security.putUser(...) +client.security.putUser({ username }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`username` (string)*: The username of the User +** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. +** *`email` (Optional, string | null)* +** *`full_name` (Optional, string | null)* +** *`metadata` (Optional, Record)* +** *`password` (Optional, string)* +** *`password_hash` (Optional, string)* +** *`roles` (Optional, string[])* +** *`enabled` (Optional, boolean)* + [discrete] ==== query_api_keys Retrieves information for API keys using a subset of query DSL @@ -3550,9 +7757,29 @@ Retrieves information for API keys using a subset of query DSL {ref}/security-api-query-api-key.html[Endpoint documentation] [source,ts] ---- -client.security.queryApiKeys(...) +client.security.queryApiKeys({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`with_limited_by` (Optional, boolean)*: 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. +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: A query to filter which API keys to return. +The query supports a subset of query types, including match_all, bool, term, terms, ids, prefix, wildcard, and range. +You can query all public information associated with an API key +** *`from` (Optional, number)*: Starting document offset. By default, you cannot page through more than 10,000 +hits using the from and size parameters. To page through more hits, use the +search_after parameter. +** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])* +** *`size` (Optional, number)*: The number of hits to return. By default, you cannot page through more +than 10,000 hits using the from and size parameters. To page through more +hits, use the search_after parameter. +** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])* + [discrete] ==== saml_authenticate Exchanges a SAML Response message for an Elasticsearch access token and refresh token pair @@ -3560,9 +7787,17 @@ Exchanges a SAML Response message for an Elasticsearch access token and refresh {ref}/security-api-saml-authenticate.html[Endpoint documentation] [source,ts] ---- -client.security.samlAuthenticate(...) +client.security.samlAuthenticate({ content, ids }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`content` (string)*: The SAML response as it was sent by the user’s browser, usually a Base64 encoded XML document. +** *`ids` (string | string[])*: A json array with all the valid SAML Request Ids that the caller of the API has for the current user. +** *`realm` (Optional, string)*: The name of the realm that should authenticate the SAML response. Useful in cases where many SAML realms are defined. + [discrete] ==== saml_complete_logout Verifies the logout response sent from the SAML IdP @@ -3570,9 +7805,18 @@ Verifies the logout response sent from the SAML IdP {ref}/security-api-saml-complete-logout.html[Endpoint documentation] [source,ts] ---- -client.security.samlCompleteLogout(...) +client.security.samlCompleteLogout({ realm, ids }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`realm` (string)*: The name of the SAML realm in Elasticsearch for which the configuration is used to verify the logout response. +** *`ids` (string | string[])*: A json array with all the valid SAML Request Ids that the caller of the API has for the current user. +** *`query_string` (Optional, string)*: If the SAML IdP sends the logout response with the HTTP-Redirect binding, this field must be set to the query string of the redirect URI. +** *`content` (Optional, string)*: If the SAML IdP sends the logout response with the HTTP-Post binding, this field must be set to the value of the SAMLResponse form parameter from the logout response. + [discrete] ==== saml_invalidate Consumes a SAML LogoutRequest @@ -3580,9 +7824,21 @@ Consumes a SAML LogoutRequest {ref}/security-api-saml-invalidate.html[Endpoint documentation] [source,ts] ---- -client.security.samlInvalidate(...) +client.security.samlInvalidate({ query_string }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`query_string` (string)*: The query part of the URL that the user was redirected to by the SAML IdP to initiate the Single Logout. +This query should include a single parameter named SAMLRequest that contains a SAML logout request that is deflated and Base64 encoded. +If the SAML IdP has signed the logout request, the URL should include two extra parameters named SigAlg and Signature that contain the algorithm used for the signature and the signature value itself. +In order for Elasticsearch to be able to verify the IdP’s signature, the value of the query_string field must be an exact match to the string provided by the browser. +The client application must not attempt to parse or process the string in any way. +** *`acs` (Optional, string)*: The Assertion Consumer Service URL that matches the one of the SAML realm in Elasticsearch that should be used. You must specify either this parameter or the realm parameter. +** *`realm` (Optional, string)*: The name of the SAML realm in Elasticsearch the configuration. You must specify either this parameter or the acs parameter. + [discrete] ==== saml_logout Invalidates an access token and a refresh token that were generated via the SAML Authenticate API @@ -3590,9 +7846,18 @@ Invalidates an access token and a refresh token that were generated via the SAML {ref}/security-api-saml-logout.html[Endpoint documentation] [source,ts] ---- -client.security.samlLogout(...) +client.security.samlLogout({ token }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`token` (string)*: The access token that was returned as a response to calling the SAML authenticate API. +Alternatively, the most recent token that was received after refreshing the original one by using a refresh_token. +** *`refresh_token` (Optional, string)*: The refresh token that was returned as a response to calling the SAML authenticate API. +Alternatively, the most recent refresh token that was received after refreshing the original access token. + [discrete] ==== saml_prepare_authentication Creates a SAML authentication request @@ -3600,9 +7865,20 @@ Creates a SAML authentication request {ref}/security-api-saml-prepare-authentication.html[Endpoint documentation] [source,ts] ---- -client.security.samlPrepareAuthentication(...) +client.security.samlPrepareAuthentication({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`acs` (Optional, string)*: The Assertion Consumer Service URL that matches the one of the SAML realms in Elasticsearch. +The realm is used to generate the authentication request. You must specify either this parameter or the realm parameter. +** *`realm` (Optional, string)*: The name of the SAML realm in Elasticsearch for which the configuration is used to generate the authentication request. +You must specify either this parameter or the acs parameter. +** *`relay_state` (Optional, string)*: A string that will be included in the redirect URL that this API returns as the RelayState query parameter. +If the Authentication Request is signed, this value is used as part of the signature computation. + [discrete] ==== saml_service_provider_metadata Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider @@ -3610,9 +7886,15 @@ Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider {ref}/security-api-saml-sp-metadata.html[Endpoint documentation] [source,ts] ---- -client.security.samlServiceProviderMetadata(...) +client.security.samlServiceProviderMetadata({ realm_name }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`realm_name` (string)*: The name of the SAML realm in Elasticsearch. + [discrete] ==== update_api_key Updates attributes of an existing API key. @@ -3620,9 +7902,32 @@ Updates attributes of an existing API key. {ref}/security-api-update-api-key.html[Endpoint documentation] [source,ts] ---- -client.security.updateApiKey(...) +client.security.updateApiKey({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The ID of the API key to update. +** *`role_descriptors` (Optional, Record)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. +** *`metadata` (Optional, Record)*: Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. + +[discrete] +==== update_cross_cluster_api_key +Updates attributes of an existing cross-cluster API key. + +{ref}/security-api-update-cross-cluster-api-key.html[Endpoint documentation] +[source,ts] +---- +client.security.updateCrossClusterApiKey() +---- + +[discrete] +==== Arguments + +* *Request (object):* + [discrete] === slm [discrete] @@ -3632,9 +7937,15 @@ Deletes an existing snapshot lifecycle policy. {ref}/slm-api-delete-policy.html[Endpoint documentation] [source,ts] ---- -client.slm.deleteLifecycle(...) +client.slm.deleteLifecycle({ policy_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`policy_id` (string)*: The id of the snapshot lifecycle policy to remove + [discrete] ==== execute_lifecycle Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time. @@ -3642,9 +7953,15 @@ Immediately creates a snapshot according to the lifecycle policy, without waitin {ref}/slm-api-execute-lifecycle.html[Endpoint documentation] [source,ts] ---- -client.slm.executeLifecycle(...) +client.slm.executeLifecycle({ policy_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`policy_id` (string)*: The id of the snapshot lifecycle policy to be executed + [discrete] ==== execute_retention Deletes any snapshots that are expired according to the policy's retention rules. @@ -3652,9 +7969,14 @@ Deletes any snapshots that are expired according to the policy's retention rules {ref}/slm-api-execute-retention.html[Endpoint documentation] [source,ts] ---- -client.slm.executeRetention(...) +client.slm.executeRetention() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== get_lifecycle Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts. @@ -3662,9 +7984,15 @@ Retrieves one or more snapshot lifecycle policy definitions and information abou {ref}/slm-api-get-policy.html[Endpoint documentation] [source,ts] ---- -client.slm.getLifecycle(...) +client.slm.getLifecycle({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`policy_id` (Optional, string | string[])*: List of snapshot lifecycle policies to retrieve + [discrete] ==== get_stats Returns global and policy-level statistics about actions taken by snapshot lifecycle management. @@ -3672,9 +8000,14 @@ Returns global and policy-level statistics about actions taken by snapshot lifec {ref}/slm-api-get-stats.html[Endpoint documentation] [source,ts] ---- -client.slm.getStats(...) +client.slm.getStats() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== get_status Retrieves the status of snapshot lifecycle management (SLM). @@ -3682,9 +8015,14 @@ Retrieves the status of snapshot lifecycle management (SLM). {ref}/slm-api-get-status.html[Endpoint documentation] [source,ts] ---- -client.slm.getStatus(...) +client.slm.getStatus() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== put_lifecycle Creates or updates a snapshot lifecycle policy. @@ -3692,9 +8030,22 @@ Creates or updates a snapshot lifecycle policy. {ref}/slm-api-put-policy.html[Endpoint documentation] [source,ts] ---- -client.slm.putLifecycle(...) +client.slm.putLifecycle({ policy_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`policy_id` (string)*: ID for the snapshot lifecycle policy you want to create or update. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. +** *`config` (Optional, { ignore_unavailable, indices, include_global_state, feature_states, metadata, partial })*: Configuration for each snapshot created by the policy. +** *`name` (Optional, string)*: Name automatically assigned to each snapshot created by the policy. Date math is supported. To prevent conflicting snapshot names, a UUID is automatically appended to each snapshot name. +** *`repository` (Optional, string)*: Repository used to store snapshots created by this policy. This repository must exist prior to the policy’s creation. You can create a repository using the snapshot repository API. +** *`retention` (Optional, { expire_after, max_count, min_count })*: Retention rules used to retain and delete snapshots created by the policy. +** *`schedule` (Optional, string)*: Periodic or absolute schedule at which the policy creates snapshots. SLM applies schedule changes immediately. + [discrete] ==== start Turns on snapshot lifecycle management (SLM). @@ -3702,9 +8053,14 @@ Turns on snapshot lifecycle management (SLM). {ref}/slm-api-start.html[Endpoint documentation] [source,ts] ---- -client.slm.start(...) +client.slm.start() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== stop Turns off snapshot lifecycle management (SLM). @@ -3712,9 +8068,14 @@ Turns off snapshot lifecycle management (SLM). {ref}/slm-api-stop.html[Endpoint documentation] [source,ts] ---- -client.slm.stop(...) +client.slm.stop() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] === snapshot [discrete] @@ -3724,9 +8085,17 @@ Removes stale data from repository. {ref}/clean-up-snapshot-repo-api.html[Endpoint documentation] [source,ts] ---- -client.snapshot.cleanupRepository(...) +client.snapshot.cleanupRepository({ repository }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string)*: Snapshot repository to clean up. +** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. + [discrete] ==== clone Clones indices from one snapshot into another snapshot in the same repository. @@ -3734,9 +8103,20 @@ Clones indices from one snapshot into another snapshot in the same repository. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.clone(...) +client.snapshot.clone({ repository, snapshot, target_snapshot, indices }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string)*: A repository name +** *`snapshot` (string)*: The name of the snapshot to clone from +** *`target_snapshot` (string)*: The name of the cloned snapshot to create +** *`indices` (string)* +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`timeout` (Optional, string | -1 | 0)* + [discrete] ==== create Creates a snapshot in a repository. @@ -3744,9 +8124,24 @@ Creates a snapshot in a repository. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.create(...) +client.snapshot.create({ repository, snapshot }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string)*: Repository for the snapshot. +** *`snapshot` (string)*: Name of the snapshot. Must be unique in the repository. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`wait_for_completion` (Optional, boolean)*: If `true`, the request returns a response when the snapshot is complete. If `false`, the request returns a response when the snapshot initializes. +** *`ignore_unavailable` (Optional, boolean)*: If `true`, the request ignores data streams and indices in `indices` that are missing or closed. If `false`, the request returns an error for any data stream or index that is missing or closed. +** *`include_global_state` (Optional, boolean)*: If `true`, the current cluster state is included in the snapshot. The cluster state includes persistent cluster settings, composable index templates, legacy index templates, ingest pipelines, and ILM policies. It also includes data stored in system indices, such as Watches and task records (configurable via `feature_states`). +** *`indices` (Optional, string | string[])*: Data streams and indices to include in the snapshot. Supports multi-target syntax. Includes all data streams and indices by default. +** *`feature_states` (Optional, string[])*: Feature states to include in the snapshot. Each feature state includes one or more system indices containing related data. You can view a list of eligible features using the get features API. If `include_global_state` is `true`, all current feature states are included by default. If `include_global_state` is `false`, no feature states are included by default. +** *`metadata` (Optional, Record)*: Optional metadata for the snapshot. May have any contents. Must be less than 1024 bytes. This map is not automatically generated by Elasticsearch. +** *`partial` (Optional, boolean)*: If `true`, allows restoring a partial snapshot of indices with unavailable shards. Only shards that were successfully included in the snapshot will be restored. All missing shards will be recreated as empty. If `false`, the entire restore operation will fail if one or more indices included in the snapshot do not have all primary shards available. + [discrete] ==== create_repository Creates a repository. @@ -3754,9 +8149,20 @@ Creates a repository. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.createRepository(...) +client.snapshot.createRepository({ repository, type, settings }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string)*: A repository name +** *`type` (string)* +** *`settings` ({ chunk_size, compress, concurrent_streams, location, read_only })* +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`verify` (Optional, boolean)*: Whether to verify the repository after creation + [discrete] ==== delete Deletes one or more snapshots. @@ -3764,9 +8170,17 @@ Deletes one or more snapshots. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.delete(...) +client.snapshot.delete({ repository, snapshot }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string)*: A repository name +** *`snapshot` (string)*: A list of snapshot names +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node + [discrete] ==== delete_repository Deletes a repository. @@ -3774,9 +8188,17 @@ Deletes a repository. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.deleteRepository(...) +client.snapshot.deleteRepository({ repository }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string | string[])*: Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] ==== get Returns information about a snapshot. @@ -3784,9 +8206,31 @@ Returns information about a snapshot. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.get(...) +client.snapshot.get({ repository, snapshot }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string)*: List of snapshot repository names used to limit the request. Wildcard (*) expressions are supported. +** *`snapshot` (string | string[])*: List of snapshot names to retrieve. Also accepts wildcards (*). +- To get information about all snapshots in a registered repository, use a wildcard (*) or _all. +- To get information about any snapshots that are currently running, use _current. +** *`ignore_unavailable` (Optional, boolean)*: If false, the request returns an error for any snapshots that are unavailable. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`verbose` (Optional, boolean)*: If true, returns additional information about each snapshot such as the version of Elasticsearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. +** *`index_details` (Optional, boolean)*: If true, returns additional information about each index in the snapshot comprising the number of shards in the index, the total size of the index in bytes, and the maximum number of segments per shard in the index. Defaults to false, meaning that this information is omitted. +** *`index_names` (Optional, boolean)*: If true, returns the name of each index in each snapshot. +** *`include_repository` (Optional, boolean)*: If true, returns the repository name in each snapshot. +** *`sort` (Optional, Enum("start_time" | "duration" | "name" | "index_count" | "repository" | "shard_count" | "failed_shard_count"))*: Allows setting a sort order for the result. Defaults to start_time, i.e. sorting by snapshot start time stamp. +** *`size` (Optional, number)*: Maximum number of snapshots to return. Defaults to 0 which means return all that match the request without limit. +** *`order` (Optional, Enum("asc" | "desc"))*: Sort order. Valid values are asc for ascending and desc for descending order. Defaults to asc, meaning ascending order. +** *`after` (Optional, string)*: Offset identifier to start pagination from as returned by the next field in the response body. +** *`offset` (Optional, number)*: Numeric offset to start pagination from based on the snapshots matching this request. Using a non-zero value for this parameter is mutually exclusive with using the after parameter. Defaults to 0. +** *`from_sort_value` (Optional, string)*: Value of the current sort column at which to start retrieval. Can either be a string snapshot- or repository name when sorting by snapshot or repository name, a millisecond time value or a number when sorting by index- or shard count. +** *`slm_policy_filter` (Optional, string)*: Filter snapshots by a list of SLM policy names that snapshots belong to. Also accepts wildcards (*) and combinations of wildcards followed by exclude patterns starting with -. To include snapshots not created by an SLM policy you can use the special pattern _none that will match all snapshots without an SLM policy. + [discrete] ==== get_repository Returns information about a repository. @@ -3794,9 +8238,17 @@ Returns information about a repository. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.getRepository(...) +client.snapshot.getRepository({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (Optional, string | string[])*: A list of repository names +** *`local` (Optional, boolean)*: Return local information, do not retrieve the state from master node (default: false) +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node + [discrete] ==== repository_analyze Analyzes a repository for correctness and performance @@ -3804,9 +8256,14 @@ Analyzes a repository for correctness and performance {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.repositoryAnalyze(...) +client.snapshot.repositoryAnalyze() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== restore Restores a snapshot. @@ -3814,9 +8271,28 @@ Restores a snapshot. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.restore(...) +client.snapshot.restore({ repository, snapshot }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string)*: A repository name +** *`snapshot` (string)*: A snapshot name +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`wait_for_completion` (Optional, boolean)*: Should this request wait until the operation has completed before returning +** *`feature_states` (Optional, string[])* +** *`ignore_index_settings` (Optional, string[])* +** *`ignore_unavailable` (Optional, boolean)* +** *`include_aliases` (Optional, boolean)* +** *`include_global_state` (Optional, boolean)* +** *`index_settings` (Optional, { index, mode, routing_path, soft_deletes, sort, number_of_shards, number_of_replicas, number_of_routing_shards, check_on_startup, codec, routing_partition_size, load_fixed_bitset_filters_eagerly, hidden, auto_expand_replicas, merge, search, refresh_interval, max_result_window, max_inner_result_window, max_rescore_window, max_docvalue_fields_search, max_script_fields, max_ngram_diff, max_shingle_diff, blocks, max_refresh_listeners, analyze, highlight, max_terms_count, max_regex_length, routing, gc_deletes, default_pipeline, final_pipeline, lifecycle, provided_name, creation_date, creation_date_string, uuid, version, verified_before_close, format, max_slices_per_scroll, translog, query_string, priority, top_metrics_max_size, analysis, settings, time_series, shards, queries, similarity, mapping, indexing.slowlog, indexing_pressure, store })* +** *`indices` (Optional, string | string[])* +** *`partial` (Optional, boolean)* +** *`rename_pattern` (Optional, string)* +** *`rename_replacement` (Optional, string)* + [discrete] ==== status Returns information about the status of a snapshot. @@ -3824,9 +8300,18 @@ Returns information about the status of a snapshot. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.status(...) +client.snapshot.status({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (Optional, string)*: A repository name +** *`snapshot` (Optional, string | string[])*: A list of snapshot names +** *`ignore_unavailable` (Optional, boolean)*: Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node + [discrete] ==== verify_repository Verifies a repository. @@ -3834,9 +8319,17 @@ Verifies a repository. {ref}/modules-snapshots.html[Endpoint documentation] [source,ts] ---- -client.snapshot.verifyRepository(...) +client.snapshot.verifyRepository({ repository }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`repository` (string)*: A repository name +** *`master_timeout` (Optional, string | -1 | 0)*: Explicit operation timeout for connection to master node +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout + [discrete] === sql [discrete] @@ -3846,9 +8339,15 @@ Clears the SQL cursor {ref}/clear-sql-cursor-api.html[Endpoint documentation] [source,ts] ---- -client.sql.clearCursor(...) +client.sql.clearCursor({ cursor }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`cursor` (string)* + [discrete] ==== delete_async Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it. @@ -3856,9 +8355,15 @@ Deletes an async SQL search or a stored synchronous SQL search. If the search is {ref}/delete-async-sql-search-api.html[Endpoint documentation] [source,ts] ---- -client.sql.deleteAsync(...) +client.sql.deleteAsync({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The async search ID + [discrete] ==== get_async Returns the current status and available results for an async SQL search or stored synchronous SQL search @@ -3866,9 +8371,22 @@ Returns the current status and available results for an async SQL search or stor {ref}/get-async-sql-search-api.html[Endpoint documentation] [source,ts] ---- -client.sql.getAsync(...) +client.sql.getAsync({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The async search ID +** *`delimiter` (Optional, string)*: Separator for CSV results. The API only supports this parameter for CSV responses. +** *`format` (Optional, string)*: Format for the response. You must specify a format using this parameter or the +Accept HTTP header. If you specify both, the API uses this parameter. +** *`keep_alive` (Optional, string | -1 | 0)*: Retention period for the search and its results. Defaults +to the `keep_alive` period for the original SQL search. +** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Period to wait for complete results. Defaults to no timeout, +meaning the request waits for complete search results. + [discrete] ==== get_async_status Returns the current status of an async SQL search or a stored synchronous SQL search @@ -3876,9 +8394,15 @@ Returns the current status of an async SQL search or a stored synchronous SQL se {ref}/get-async-sql-search-status-api.html[Endpoint documentation] [source,ts] ---- -client.sql.getAsyncStatus(...) +client.sql.getAsyncStatus({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: The async search ID + [discrete] ==== query Executes a SQL request @@ -3886,9 +8410,32 @@ Executes a SQL request {ref}/sql-search-api.html[Endpoint documentation] [source,ts] ---- -client.sql.query(...) +client.sql.query({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`format` (Optional, string)*: a short version of the Accept header, e.g. json, yaml +** *`catalog` (Optional, string)*: Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only. +** *`columnar` (Optional, boolean)*: If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results. +** *`cursor` (Optional, string)* +** *`fetch_size` (Optional, number)*: The maximum number of rows (or entries) to return in one response +** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Optional Elasticsearch query DSL for additional filtering. +** *`query` (Optional, string)*: SQL query to execute +** *`request_timeout` (Optional, string | -1 | 0)*: The timeout before the request fails. +** *`page_timeout` (Optional, string | -1 | 0)*: The timeout before a pagination request fails. +** *`time_zone` (Optional, string)*: Time-zone in ISO 8601 used for executing the query on the server. More information available here. +** *`field_multi_value_leniency` (Optional, boolean)*: Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order). +** *`runtime_mappings` (Optional, Record)*: Defines one or more runtime fields in the search request. These fields take +precedence over mapped fields with the same name. +** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Period to wait for complete results. Defaults to no timeout, meaning the request waits for complete search results. If the search doesn’t finish within this period, the search becomes async. +** *`params` (Optional, Record)*: Values for parameters in the query. +** *`keep_alive` (Optional, string | -1 | 0)*: Retention period for an async or saved synchronous search. +** *`keep_on_completion` (Optional, boolean)*: If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout. +** *`index_using_frozen` (Optional, boolean)*: If true, the search can run on frozen indices. Defaults to false. + [discrete] ==== translate Translates SQL into Elasticsearch queries @@ -3896,9 +8443,18 @@ Translates SQL into Elasticsearch queries {ref}/sql-translate-api.html[Endpoint documentation] [source,ts] ---- -client.sql.translate(...) +client.sql.translate({ query }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`query` (string)* +** *`fetch_size` (Optional, number)* +** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })* +** *`time_zone` (Optional, string)* + [discrete] === ssl [discrete] @@ -3908,9 +8464,61 @@ Retrieves information about the X.509 certificates used to encrypt communication {ref}/security-api-ssl.html[Endpoint documentation] [source,ts] ---- -client.ssl.certificates(...) +client.ssl.certificates() ---- +[discrete] +==== Arguments + +* *Request (object):* + +[discrete] +=== synonyms +[discrete] +==== delete +Deletes a synonym set + +{ref}/delete-synonyms.html[Endpoint documentation] +[source,ts] +---- +client.synonyms.delete() +---- + +[discrete] +==== Arguments + +* *Request (object):* + +[discrete] +==== get +Retrieves a synonym set + +{ref}/get-synonyms.html[Endpoint documentation] +[source,ts] +---- +client.synonyms.get() +---- + +[discrete] +==== Arguments + +* *Request (object):* + +[discrete] +==== put +Creates or updates a synonyms set + +{ref}/put-synonyms.html[Endpoint documentation] +[source,ts] +---- +client.synonyms.put() +---- + +[discrete] +==== Arguments + +* *Request (object):* + [discrete] === tasks [discrete] @@ -3920,9 +8528,19 @@ Cancels a task, if it can be cancelled through an API. {ref}/tasks.html[Endpoint documentation] [source,ts] ---- -client.tasks.cancel(...) +client.tasks.cancel({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`task_id` (Optional, string | number)*: Cancel the task with specified task id (node_id:task_number) +** *`actions` (Optional, string | string[])*: A list of actions that should be cancelled. Leave empty to cancel all. +** *`nodes` (Optional, string[])*: A list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes +** *`parent_task_id` (Optional, string)*: Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. +** *`wait_for_completion` (Optional, boolean)*: Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false + [discrete] ==== get Returns information about a task. @@ -3930,9 +8548,17 @@ Returns information about a task. {ref}/tasks.html[Endpoint documentation] [source,ts] ---- -client.tasks.get(...) +client.tasks.get({ task_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`task_id` (string)*: Return the task with specified id (node_id:task_number) +** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout +** *`wait_for_completion` (Optional, boolean)*: Wait for the matching tasks to complete (default: false) + [discrete] ==== list Returns a list of tasks. @@ -3940,9 +8566,22 @@ Returns a list of tasks. {ref}/tasks.html[Endpoint documentation] [source,ts] ---- -client.tasks.list(...) +client.tasks.list({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`actions` (Optional, string | string[])*: List or wildcard expression of actions used to limit the request. +** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries. +** *`group_by` (Optional, Enum("nodes" | "parents" | "none"))*: Key used to group tasks in the response. +** *`node_id` (Optional, string[])*: List of node IDs or names used to limit returned information. +** *`parent_task_id` (Optional, string)*: Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. +** *`master_timeout` (Optional, string | -1 | 0)*: 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. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. +** *`wait_for_completion` (Optional, boolean)*: If `true`, the request blocks until the operation is complete. + [discrete] === text_structure [discrete] @@ -3952,9 +8591,28 @@ Finds the structure of a text file. The text file must contain data that is suit {ref}/find-structure.html[Endpoint documentation] [source,ts] ---- -client.textStructure.findStructure(...) +client.textStructure.findStructure({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`charset` (Optional, string)*: The text’s character set. It must be a character set that is supported by the JVM that Elasticsearch uses. For example, UTF-8, UTF-16LE, windows-1252, or EUC-JP. If this parameter is not specified, the structure finder chooses an appropriate character set. +** *`column_names` (Optional, string)*: If you have set format to delimited, you can specify the column names in a list. If this parameter is not specified, the structure finder uses the column names from the header row of the text. If the text does not have a header role, columns are named "column1", "column2", "column3", etc. +** *`delimiter` (Optional, string)*: If you have set format to delimited, you can specify the character used to delimit the values in each row. Only a single character is supported; the delimiter cannot have multiple characters. By default, the API considers the following possibilities: comma, tab, semi-colon, and pipe (|). In this default scenario, all rows must have the same number of fields for the delimited format to be detected. If you specify a delimiter, up to 10% of the rows can have a different number of columns than the first row. +** *`explain` (Optional, boolean)*: If this parameter is set to true, the response includes a field named explanation, which is an array of strings that indicate how the structure finder produced its result. +** *`format` (Optional, string)*: The high level structure of the text. Valid values are ndjson, xml, delimited, and semi_structured_text. By default, the API chooses the format. In this default scenario, all rows must have the same number of fields for a delimited format to be detected. If the format is set to delimited and the delimiter is not set, however, the API tolerates up to 5% of rows that have a different number of columns than the first row. +** *`grok_pattern` (Optional, string)*: If you have set format to semi_structured_text, you can specify a Grok pattern that is used to extract fields from every message in the text. The name of the timestamp field in the Grok pattern must match what is specified in the timestamp_field parameter. If that parameter is not specified, the name of the timestamp field in the Grok pattern must match "timestamp". If grok_pattern is not specified, the structure finder creates a Grok pattern. +** *`has_header_row` (Optional, boolean)*: If you have set format to delimited, you can use this parameter to indicate whether the column names are in the first row of the text. If this parameter is not specified, the structure finder guesses based on the similarity of the first row of the text to other rows. +** *`line_merge_size_limit` (Optional, number)*: The maximum number of characters in a message when lines are merged to form messages while analyzing semi-structured text. If you have extremely long messages you may need to increase this, but be aware that this may lead to very long processing times if the way to group lines into messages is misdetected. +** *`lines_to_sample` (Optional, number)*: The number of lines to include in the structural analysis, starting from the beginning of the text. The minimum is 2; If the value of this parameter is greater than the number of lines in the text, the analysis proceeds (as long as there are at least two lines in the text) for all of the lines. +** *`quote` (Optional, string)*: If you have set format to delimited, you can specify the character used to quote the values in each row if they contain newlines or the delimiter character. Only a single character is supported. If this parameter is not specified, the default value is a double quote ("). If your delimited text format does not use quoting, a workaround is to set this argument to a character that does not appear anywhere in the sample. +** *`should_trim_fields` (Optional, boolean)*: If you have set format to delimited, you can specify whether values between delimiters should have whitespace trimmed from them. If this parameter is not specified and the delimiter is pipe (|), the default value is true. Otherwise, the default value is false. +** *`timeout` (Optional, string | -1 | 0)*: Sets the maximum amount of time that the structure analysis make take. If the analysis is still running when the timeout expires then it will be aborted. +** *`timestamp_field` (Optional, string)*: Optional parameter to specify the timestamp field in the file +** *`timestamp_format` (Optional, string)*: The Java time format of the timestamp field in the text. + [discrete] === transform [discrete] @@ -3964,9 +8622,18 @@ Deletes an existing transform. {ref}/delete-transform.html[Endpoint documentation] [source,ts] ---- -client.transform.deleteTransform(...) +client.transform.deleteTransform({ transform_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (string)*: Identifier for the transform. +** *`force` (Optional, boolean)*: If this value is false, the transform must be stopped before it can be deleted. If true, the transform is +deleted regardless of its current state. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + [discrete] ==== get_transform Retrieves configuration information for transforms. @@ -3974,9 +8641,31 @@ Retrieves configuration information for transforms. {ref}/get-transform.html[Endpoint documentation] [source,ts] ---- -client.transform.getTransform(...) +client.transform.getTransform({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (Optional, string | string[])*: Identifier for the transform. It can be a transform identifier or a +wildcard expression. You can get information for all transforms by using +`_all`, by specifying `*` as the ``, or by omitting the +``. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no transforms that match. +2. Contains the _all string or no identifiers and there are no matches. +3. Contains wildcard expressions and there are only partial matches. + +If this parameter is false, the request returns a 404 status code when +there are no matches or only partial matches. +** *`from` (Optional, number)*: Skips the specified number of transforms. +** *`size` (Optional, number)*: Specifies the maximum number of transforms to obtain. +** *`exclude_generated` (Optional, boolean)*: Excludes fields that were automatically added when creating the +transform. This allows the configuration to be in an acceptable format to +be retrieved and then added to another cluster. + [discrete] ==== get_transform_stats Retrieves usage information for transforms. @@ -3984,9 +8673,29 @@ Retrieves usage information for transforms. {ref}/get-transform-stats.html[Endpoint documentation] [source,ts] ---- -client.transform.getTransformStats(...) +client.transform.getTransformStats({ transform_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (string | string[])*: Identifier for the transform. It can be a transform identifier or a +wildcard expression. You can get information for all transforms by using +`_all`, by specifying `*` as the ``, or by omitting the +``. +** *`allow_no_match` (Optional, boolean)*: Specifies what to do when the request: + +1. Contains wildcard expressions and there are no transforms that match. +2. Contains the _all string or no identifiers and there are no matches. +3. Contains wildcard expressions and there are only partial matches. + +If this parameter is false, the request returns a 404 status code when +there are no matches or only partial matches. +** *`from` (Optional, number)*: Skips the specified number of transforms. +** *`size` (Optional, number)*: Specifies the maximum number of transforms to obtain. +** *`timeout` (Optional, string | -1 | 0)*: Controls the time to wait for the stats + [discrete] ==== preview_transform Previews a transform. @@ -3994,9 +8703,34 @@ Previews a transform. {ref}/preview-transform.html[Endpoint documentation] [source,ts] ---- -client.transform.previewTransform(...) +client.transform.previewTransform({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (Optional, string)*: Identifier for the transform to preview. If you specify this path parameter, you cannot provide transform +configuration details in the request body. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the +timeout expires, the request fails and returns an error. +** *`dest` (Optional, { index, op_type, pipeline, routing, version_type })*: The destination for the transform. +** *`description` (Optional, string)*: Free text description of the transform. +** *`frequency` (Optional, string | -1 | 0)*: The interval between checks for changes in the source indices when the +transform is running continuously. Also determines the retry interval in +the event of transient failures while the transform is searching or +indexing. The minimum value is 1s and the maximum is 1h. +** *`pivot` (Optional, { aggregations, group_by })*: The pivot method transforms the data by aggregating and grouping it. +These objects define the group by fields and the aggregation to reduce +the data. +** *`source` (Optional, { index, query, remote, size, slice, sort, _source, runtime_mappings })*: The source of the data for the transform. +** *`settings` (Optional, { align_checkpoints, dates_as_epoch_millis, deduce_mappings, docs_per_second, max_page_search_size, unattended })*: Defines optional transform settings. +** *`sync` (Optional, { time })*: Defines the properties transforms require to run continuously. +** *`retention_policy` (Optional, { time })*: Defines a retention policy for the transform. Data that meets the defined +criteria is deleted from the destination index. +** *`latest` (Optional, { sort, unique_key })*: The latest method transforms the data by finding the latest document for +each unique key. + [discrete] ==== put_transform Instantiates a transform. @@ -4004,9 +8738,36 @@ Instantiates a transform. {ref}/put-transform.html[Endpoint documentation] [source,ts] ---- -client.transform.putTransform(...) +client.transform.putTransform({ transform_id, dest, source }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (string)*: Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), +hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters. +** *`dest` ({ index, op_type, pipeline, routing, version_type })*: The destination for the transform. +** *`source` ({ index, query, remote, size, slice, sort, _source, runtime_mappings })*: The source of the data for the transform. +** *`defer_validation` (Optional, boolean)*: When the transform is created, a series of validations occur to ensure its success. For example, there is a +check for the existence of the source indices and a check that the destination index is not part of the source +index pattern. You can use this parameter to skip the checks, for example when the source index does not exist +until after the transform is created. The validations are always run when you start the transform, however, with +the exception of privilege checks. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. +** *`description` (Optional, string)*: Free text description of the transform. +** *`frequency` (Optional, string | -1 | 0)*: The interval between checks for changes in the source indices when the transform is running continuously. Also +determines the retry interval in the event of transient failures while the transform is searching or indexing. +The minimum value is `1s` and the maximum is `1h`. +** *`latest` (Optional, { sort, unique_key })*: The latest method transforms the data by finding the latest document for each unique key. +** *`_meta` (Optional, Record)*: Defines optional transform metadata. +** *`pivot` (Optional, { aggregations, group_by })*: The pivot method transforms the data by aggregating and grouping it. These objects define the group by fields +and the aggregation to reduce the data. +** *`retention_policy` (Optional, { time })*: Defines a retention policy for the transform. Data that meets the defined criteria is deleted from the +destination index. +** *`settings` (Optional, { align_checkpoints, dates_as_epoch_millis, deduce_mappings, docs_per_second, max_page_search_size, unattended })*: Defines optional transform settings. +** *`sync` (Optional, { time })*: Defines the properties transforms require to run continuously. + [discrete] ==== reset_transform Resets an existing transform. @@ -4014,9 +8775,18 @@ Resets an existing transform. {ref}/reset-transform.html[Endpoint documentation] [source,ts] ---- -client.transform.resetTransform(...) +client.transform.resetTransform({ transform_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (string)*: Identifier for the transform. This identifier can contain lowercase alphanumeric characters (a-z and 0-9), +hyphens, and underscores. It has a 64 character limit and must start and end with alphanumeric characters. +** *`force` (Optional, boolean)*: If this value is `true`, the transform is reset regardless of its current state. If it's `false`, the transform +must be stopped before it can be reset. + [discrete] ==== schedule_now_transform Schedules now a transform. @@ -4024,9 +8794,16 @@ Schedules now a transform. {ref}/schedule-now-transform.html[Endpoint documentation] [source,ts] ---- -client.transform.scheduleNowTransform(...) +client.transform.scheduleNowTransform({ transform_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (string)*: Identifier for the transform. +** *`timeout` (Optional, string | -1 | 0)*: Controls the time to wait for the scheduling to take place + [discrete] ==== start_transform Starts one or more transforms. @@ -4034,9 +8811,17 @@ Starts one or more transforms. {ref}/start-transform.html[Endpoint documentation] [source,ts] ---- -client.transform.startTransform(...) +client.transform.startTransform({ transform_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (string)*: Identifier for the transform. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. +** *`from` (Optional, string)*: Restricts the set of transformed entities to those changed after this time. Relative times like now-30d are supported. Only applicable for continuous transforms. + [discrete] ==== stop_transform Stops one or more transforms. @@ -4044,9 +8829,32 @@ Stops one or more transforms. {ref}/stop-transform.html[Endpoint documentation] [source,ts] ---- -client.transform.stopTransform(...) +client.transform.stopTransform({ transform_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (string)*: Identifier for the transform. To stop multiple transforms, use a list or a wildcard expression. +To stop all transforms, use `_all` or `*` as the identifier. +** *`allow_no_match` (Optional, boolean)*: 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 it is true, the API returns a successful acknowledgement message when there are no matches. When there are +only partial matches, the API stops the appropriate transforms. + +If it is false, the request returns a 404 status code when there are no matches or only partial matches. +** *`force` (Optional, boolean)*: If it is true, the API forcefully stops the transforms. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response when `wait_for_completion` is `true`. If no response is received before the +timeout expires, the request returns a timeout exception. However, the request continues processing and +eventually moves the transform to a STOPPED state. +** *`wait_for_checkpoint` (Optional, boolean)*: If it is true, the transform does not completely stop until the current checkpoint is completed. If it is false, +the transform stops as soon as possible. +** *`wait_for_completion` (Optional, boolean)*: If it is true, the API blocks until the indexer state completely stops. If it is false, the API returns +immediately and the indexer is stopped asynchronously in the background. + [discrete] ==== update_transform Updates certain properties of a transform. @@ -4054,9 +8862,32 @@ Updates certain properties of a transform. {ref}/update-transform.html[Endpoint documentation] [source,ts] ---- -client.transform.updateTransform(...) +client.transform.updateTransform({ transform_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`transform_id` (string)*: Identifier for the transform. +** *`defer_validation` (Optional, boolean)*: When true, deferrable validations are not run. This behavior may be +desired if the source index does not exist until after the transform is +created. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the +timeout expires, the request fails and returns an error. +** *`dest` (Optional, { index, op_type, pipeline, routing, version_type })*: The destination for the transform. +** *`description` (Optional, string)*: Free text description of the transform. +** *`frequency` (Optional, string | -1 | 0)*: The interval between checks for changes in the source indices when the +transform is running continuously. Also determines the retry interval in +the event of transient failures while the transform is searching or +indexing. The minimum value is 1s and the maximum is 1h. +** *`_meta` (Optional, Record)*: Defines optional transform metadata. +** *`source` (Optional, { index, query, remote, size, slice, sort, _source, runtime_mappings })*: The source of the data for the transform. +** *`settings` (Optional, { align_checkpoints, dates_as_epoch_millis, deduce_mappings, docs_per_second, max_page_search_size, unattended })*: Defines optional transform settings. +** *`sync` (Optional, { time })*: Defines the properties transforms require to run continuously. +** *`retention_policy` (Optional, { time } | null)*: Defines a retention policy for the transform. Data that meets the defined +criteria is deleted from the destination index. + [discrete] ==== upgrade_transforms Upgrades all transforms. @@ -4064,9 +8895,17 @@ Upgrades all transforms. {ref}/upgrade-transforms.html[Endpoint documentation] [source,ts] ---- -client.transform.upgradeTransforms(...) +client.transform.upgradeTransforms({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`dry_run` (Optional, boolean)*: When true, the request checks for updates but does not run them. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and +returns an error. + [discrete] === watcher [discrete] @@ -4076,9 +8915,16 @@ Acknowledges a watch, manually throttling the execution of the watch's actions. {ref}/watcher-api-ack-watch.html[Endpoint documentation] [source,ts] ---- -client.watcher.ackWatch(...) +client.watcher.ackWatch({ watch_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`watch_id` (string)*: Watch ID +** *`action_id` (Optional, string | string[])*: A list of the action ids to be acked + [discrete] ==== activate_watch Activates a currently inactive watch. @@ -4086,9 +8932,15 @@ Activates a currently inactive watch. {ref}/watcher-api-activate-watch.html[Endpoint documentation] [source,ts] ---- -client.watcher.activateWatch(...) +client.watcher.activateWatch({ watch_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`watch_id` (string)*: Watch ID + [discrete] ==== deactivate_watch Deactivates a currently active watch. @@ -4096,9 +8948,15 @@ Deactivates a currently active watch. {ref}/watcher-api-deactivate-watch.html[Endpoint documentation] [source,ts] ---- -client.watcher.deactivateWatch(...) +client.watcher.deactivateWatch({ watch_id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`watch_id` (string)*: Watch ID + [discrete] ==== delete_watch Removes a watch from Watcher. @@ -4106,9 +8964,15 @@ Removes a watch from Watcher. {ref}/watcher-api-delete-watch.html[Endpoint documentation] [source,ts] ---- -client.watcher.deleteWatch(...) +client.watcher.deleteWatch({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Watch ID + [discrete] ==== execute_watch Forces the execution of a stored watch. @@ -4116,9 +8980,38 @@ Forces the execution of a stored watch. {ref}/watcher-api-execute-watch.html[Endpoint documentation] [source,ts] ---- -client.watcher.executeWatch(...) +client.watcher.executeWatch({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (Optional, string)*: Identifier for the watch. +** *`debug` (Optional, boolean)*: Defines whether the watch runs in debug mode. +** *`action_modes` (Optional, Record)*: Determines how to handle the watch actions as part of the watch execution. +** *`alternative_input` (Optional, Record)*: When present, the watch uses this object as a payload instead of executing its own input. +** *`ignore_condition` (Optional, boolean)*: When set to `true`, the watch execution uses the always condition. This can also be specified as an HTTP parameter. +** *`record_execution` (Optional, boolean)*: When set to `true`, the watch record representing the watch execution result is persisted to the `.watcher-history` index for the current time. In addition, the status of the watch is updated, possibly throttling subsequent executions. This can also be specified as an HTTP parameter. +** *`simulated_actions` (Optional, { actions, all, use_all })* +** *`trigger_data` (Optional, { scheduled_time, triggered_time })*: This structure is parsed as the data of the trigger event that will be used during the watch execution +** *`watch` (Optional, { actions, condition, input, metadata, status, throttle_period, throttle_period_in_millis, transform, trigger })*: When present, this watch is used instead of the one specified in the request. This watch is not persisted to the index and record_execution cannot be set. + +[discrete] +==== get_settings +Retrieve settings for the watcher system index + +{ref}/watcher-api-get-settings.html[Endpoint documentation] +[source,ts] +---- +client.watcher.getSettings() +---- + +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== get_watch Retrieves a watch by its ID. @@ -4126,9 +9019,15 @@ Retrieves a watch by its ID. {ref}/watcher-api-get-watch.html[Endpoint documentation] [source,ts] ---- -client.watcher.getWatch(...) +client.watcher.getWatch({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Watch ID + [discrete] ==== put_watch Creates a new watch, or updates an existing one. @@ -4136,9 +9035,26 @@ Creates a new watch, or updates an existing one. {ref}/watcher-api-put-watch.html[Endpoint documentation] [source,ts] ---- -client.watcher.putWatch(...) +client.watcher.putWatch({ id }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`id` (string)*: Watch ID +** *`active` (Optional, boolean)*: Specify whether the watch is in/active by default +** *`if_primary_term` (Optional, number)*: only update the watch if the last operation that has changed the watch has the specified primary term +** *`if_seq_no` (Optional, number)*: only update the watch if the last operation that has changed the watch has the specified sequence number +** *`version` (Optional, number)*: Explicit version number for concurrency control +** *`actions` (Optional, Record)* +** *`condition` (Optional, { always, array_compare, compare, never, script })* +** *`input` (Optional, { chain, http, search, simple })* +** *`metadata` (Optional, Record)* +** *`throttle_period` (Optional, string)* +** *`transform` (Optional, { chain, script, search })* +** *`trigger` (Optional, { schedule })* + [discrete] ==== query_watches Retrieves stored watches. @@ -4146,9 +9062,19 @@ Retrieves stored watches. {ref}/watcher-api-query-watches.html[Endpoint documentation] [source,ts] ---- -client.watcher.queryWatches(...) +client.watcher.queryWatches({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`from` (Optional, number)*: The offset from the first result to fetch. Needs to be non-negative. +** *`size` (Optional, number)*: The number of hits to return. Needs to be non-negative. +** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Optional, query filter watches to be returned. +** *`sort` (Optional, string | { _score, _doc, _geo_distance, _script } | string | { _score, _doc, _geo_distance, _script }[])*: Optional sort definition. +** *`search_after` (Optional, number | number | string | boolean | null | User-defined value[])*: Optional search After to do pagination using last hit’s sort values. + [discrete] ==== start Starts Watcher if it is not already running. @@ -4156,9 +9082,14 @@ Starts Watcher if it is not already running. {ref}/watcher-api-start.html[Endpoint documentation] [source,ts] ---- -client.watcher.start(...) +client.watcher.start() ---- +[discrete] +==== Arguments + +* *Request (object):* + [discrete] ==== stats Retrieves the current Watcher metrics. @@ -4166,9 +9097,16 @@ Retrieves the current Watcher metrics. {ref}/watcher-api-stats.html[Endpoint documentation] [source,ts] ---- -client.watcher.stats(...) +client.watcher.stats({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`metric` (Optional, Enum("_all" | "queued_watches" | "current_watches" | "pending_watches") | Enum("_all" | "queued_watches" | "current_watches" | "pending_watches")[])*: Defines which additional metrics are included in the response. +** *`emit_stacktraces` (Optional, boolean)*: Defines whether stack traces are generated for each watch that is running. + [discrete] ==== stop Stops Watcher if it is running. @@ -4176,9 +9114,29 @@ Stops Watcher if it is running. {ref}/watcher-api-stop.html[Endpoint documentation] [source,ts] ---- -client.watcher.stop(...) +client.watcher.stop() ---- +[discrete] +==== Arguments + +* *Request (object):* + +[discrete] +==== update_settings +Update settings for the watcher system index + +{ref}/watcher-api-update-settings.html[Endpoint documentation] +[source,ts] +---- +client.watcher.updateSettings() +---- + +[discrete] +==== Arguments + +* *Request (object):* + [discrete] === xpack [discrete] @@ -4188,9 +9146,17 @@ Retrieves information about the installed X-Pack features. {ref}/info-api.html[Endpoint documentation] [source,ts] ---- -client.xpack.info(...) +client.xpack.info({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`categories` (Optional, string[])*: A list of the information categories to include in the response. For example, `build,license,features`. +** *`accept_enterprise` (Optional, boolean)*: If this param is used it must be set to true +** *`human` (Optional, boolean)*: Defines whether additional human-readable information is included in the response. In particular, it adds descriptions and a tag line. + [discrete] ==== usage Retrieves usage information about the installed X-Pack features. @@ -4198,6 +9164,12 @@ Retrieves usage information about the installed X-Pack features. {ref}/usage-api.html[Endpoint documentation] [source,ts] ---- -client.xpack.usage(...) +client.xpack.usage({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`master_timeout` (Optional, string | -1 | 0)*: 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. + diff --git a/src/api/api/async_search.ts b/src/api/api/async_search.ts index 3382499d2..a0c36598b 100644 --- a/src/api/api/async_search.ts +++ b/src/api/api/async_search.ts @@ -43,6 +43,10 @@ export default class AsyncSearch { this.transport = transport } + /** + * 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. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/async-search.html Elasticsearch API docs} + */ async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise> async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class AsyncSearch { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves the results of a previously submitted async search request given its ID. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/async-search.html Elasticsearch API docs} + */ async get> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async get> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async get> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise> @@ -87,6 +95,10 @@ export default class AsyncSearch { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves the status of a previously submitted async search request given its ID. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/async-search.html Elasticsearch API docs} + */ async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithMeta): Promise> async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptions): Promise @@ -109,6 +121,10 @@ export default class AsyncSearch { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Executes a search request asynchronously. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/async-search.html Elasticsearch API docs} + */ async submit> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async submit> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async submit> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/autoscaling.ts b/src/api/api/autoscaling.ts index af5fc0c66..a23212f2e 100644 --- a/src/api/api/autoscaling.ts +++ b/src/api/api/autoscaling.ts @@ -43,6 +43,10 @@ export default class Autoscaling { this.transport = transport } + /** + * Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/autoscaling-delete-autoscaling-policy.html Elasticsearch API docs} + */ async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Autoscaling { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/autoscaling-get-autoscaling-capacity.html Elasticsearch API docs} + */ async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithMeta): Promise> async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions): Promise @@ -88,6 +96,10 @@ export default class Autoscaling { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/autoscaling-get-autoscaling-capacity.html Elasticsearch API docs} + */ async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise> async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise @@ -110,6 +122,10 @@ export default class Autoscaling { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/autoscaling-put-autoscaling-policy.html Elasticsearch API docs} + */ async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise> async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/bulk.ts b/src/api/api/bulk.ts index b3fc16666..41a700dfe 100644 --- a/src/api/api/bulk.ts +++ b/src/api/api/bulk.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows to perform multiple index/update/delete operations in a single request. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-bulk.html Elasticsearch API docs} + */ export default async function BulkApi (this: That, params: T.BulkRequest | TB.BulkRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function BulkApi (this: That, params: T.BulkRequest | TB.BulkRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function BulkApi (this: That, params: T.BulkRequest | TB.BulkRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/cat.ts b/src/api/api/cat.ts index 74e383095..127c198c8 100644 --- a/src/api/api/cat.ts +++ b/src/api/api/cat.ts @@ -43,6 +43,10 @@ export default class Cat { this.transport = transport } + /** + * Shows information about currently configured aliases to indices including filter and routing infos. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-alias.html Elasticsearch API docs} + */ async aliases (this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async aliases (this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptionsWithMeta): Promise> async aliases (this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptions): Promise @@ -73,6 +77,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-allocation.html Elasticsearch API docs} + */ async allocation (this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptionsWithOutMeta): Promise async allocation (this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptionsWithMeta): Promise> async allocation (this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptions): Promise @@ -103,6 +111,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about existing component_templates templates. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-component-templates.html Elasticsearch API docs} + */ async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptionsWithMeta): Promise> async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptions): Promise @@ -133,6 +145,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Provides quick access to the document count of the entire cluster, or individual indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-count.html Elasticsearch API docs} + */ async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptionsWithOutMeta): Promise async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptionsWithMeta): Promise> async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptions): Promise @@ -163,6 +179,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Shows how much heap memory is currently being used by fielddata on every data node in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-fielddata.html Elasticsearch API docs} + */ async fielddata (this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptionsWithOutMeta): Promise async fielddata (this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptionsWithMeta): Promise> async fielddata (this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptions): Promise @@ -193,6 +213,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns a concise representation of the cluster health. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-health.html Elasticsearch API docs} + */ async health (this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptionsWithOutMeta): Promise async health (this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptionsWithMeta): Promise> async health (this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptions): Promise @@ -216,6 +240,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns help for the Cat APIs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat.html Elasticsearch API docs} + */ async help (this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptionsWithOutMeta): Promise async help (this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptionsWithMeta): Promise> async help (this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptions): Promise @@ -239,6 +267,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about indices: number of primaries and replicas, document counts, disk size, ... + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-indices.html Elasticsearch API docs} + */ async indices (this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async indices (this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptionsWithMeta): Promise> async indices (this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptions): Promise @@ -269,6 +301,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about the master node. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-master.html Elasticsearch API docs} + */ async master (this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptionsWithOutMeta): Promise async master (this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptionsWithMeta): Promise> async master (this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptions): Promise @@ -292,6 +328,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets configuration and usage information about data frame analytics jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-dfanalytics.html Elasticsearch API docs} + */ async mlDataFrameAnalytics (this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async mlDataFrameAnalytics (this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> async mlDataFrameAnalytics (this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise @@ -322,6 +362,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets configuration and usage information about datafeeds. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-datafeeds.html Elasticsearch API docs} + */ async mlDatafeeds (this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async mlDatafeeds (this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptionsWithMeta): Promise> async mlDatafeeds (this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptions): Promise @@ -352,6 +396,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets configuration and usage information about anomaly detection jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-anomaly-detectors.html Elasticsearch API docs} + */ async mlJobs (this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async mlJobs (this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptionsWithMeta): Promise> async mlJobs (this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptions): Promise @@ -382,6 +430,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets configuration and usage information about inference trained models. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-trained-model.html Elasticsearch API docs} + */ async mlTrainedModels (this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async mlTrainedModels (this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptionsWithMeta): Promise> async mlTrainedModels (this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptions): Promise @@ -412,6 +464,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about custom node attributes. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-nodeattrs.html Elasticsearch API docs} + */ async nodeattrs (this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async nodeattrs (this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptionsWithMeta): Promise> async nodeattrs (this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptions): Promise @@ -435,6 +491,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns basic statistics about performance of cluster nodes. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-nodes.html Elasticsearch API docs} + */ async nodes (this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async nodes (this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptionsWithMeta): Promise> async nodes (this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptions): Promise @@ -458,6 +518,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns a concise representation of the cluster pending tasks. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-pending-tasks.html Elasticsearch API docs} + */ async pendingTasks (this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise async pendingTasks (this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptionsWithMeta): Promise> async pendingTasks (this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptions): Promise @@ -481,6 +545,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about installed plugins across nodes node. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-plugins.html Elasticsearch API docs} + */ async plugins (this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async plugins (this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptionsWithMeta): Promise> async plugins (this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptions): Promise @@ -504,6 +572,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about index shard recoveries, both on-going completed. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-recovery.html Elasticsearch API docs} + */ async recovery (this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async recovery (this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptionsWithMeta): Promise> async recovery (this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptions): Promise @@ -534,6 +606,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about snapshot repositories registered in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-repositories.html Elasticsearch API docs} + */ async repositories (this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async repositories (this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptionsWithMeta): Promise> async repositories (this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptions): Promise @@ -557,6 +633,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Provides low-level information about the segments in the shards of an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-segments.html Elasticsearch API docs} + */ async segments (this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async segments (this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptionsWithMeta): Promise> async segments (this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptions): Promise @@ -587,6 +667,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Provides a detailed view of shard allocation on nodes. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-shards.html Elasticsearch API docs} + */ async shards (this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async shards (this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptionsWithMeta): Promise> async shards (this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptions): Promise @@ -617,6 +701,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns all snapshots in a specific repository. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-snapshots.html Elasticsearch API docs} + */ async snapshots (this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async snapshots (this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptionsWithMeta): Promise> async snapshots (this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptions): Promise @@ -647,6 +735,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about the tasks currently executing on one or more nodes in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/tasks.html Elasticsearch API docs} + */ async tasks (this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise async tasks (this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptionsWithMeta): Promise> async tasks (this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptions): Promise @@ -670,6 +762,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about existing templates. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-templates.html Elasticsearch API docs} + */ async templates (this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async templates (this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptionsWithMeta): Promise> async templates (this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptions): Promise @@ -700,6 +796,11 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns cluster-wide thread pool statistics per node. + By default the active, queue and rejected statistics are returned for all thread pools. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-thread-pool.html Elasticsearch API docs} + */ async threadPool (this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptionsWithOutMeta): Promise async threadPool (this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptionsWithMeta): Promise> async threadPool (this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptions): Promise @@ -730,6 +831,10 @@ export default class Cat { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets configuration and usage information about transforms. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cat-transforms.html Elasticsearch API docs} + */ async transforms (this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async transforms (this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptionsWithMeta): Promise> async transforms (this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/ccr.ts b/src/api/api/ccr.ts index 63c7ada21..5b61ba9c4 100644 --- a/src/api/api/ccr.ts +++ b/src/api/api/ccr.ts @@ -43,6 +43,10 @@ export default class Ccr { this.transport = transport } + /** + * Deletes auto-follow patterns. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-delete-auto-follow-pattern.html Elasticsearch API docs} + */ async deleteAutoFollowPattern (this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteAutoFollowPattern (this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteAutoFollowPattern (this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a new follower index configured to follow the referenced leader index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-put-follow.html Elasticsearch API docs} + */ async follow (this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise async follow (this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptionsWithMeta): Promise> async follow (this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptions): Promise @@ -99,6 +107,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information about all follower indices, including parameters and status for each follower index + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-get-follow-info.html Elasticsearch API docs} + */ async followInfo (this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise async followInfo (this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptionsWithMeta): Promise> async followInfo (this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptions): Promise @@ -121,6 +133,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-get-follow-stats.html Elasticsearch API docs} + */ async followStats (this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async followStats (this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async followStats (this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptions): Promise @@ -143,6 +159,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Removes the follower retention leases from the leader. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-post-forget-follower.html Elasticsearch API docs} + */ async forgetFollower (this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptionsWithOutMeta): Promise async forgetFollower (this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptionsWithMeta): Promise> async forgetFollower (this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptions): Promise @@ -177,6 +197,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-get-auto-follow-pattern.html Elasticsearch API docs} + */ async getAutoFollowPattern (this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getAutoFollowPattern (this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise> async getAutoFollowPattern (this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptions): Promise @@ -207,6 +231,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Pauses an auto-follow pattern + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-pause-auto-follow-pattern.html Elasticsearch API docs} + */ async pauseAutoFollowPattern (this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise async pauseAutoFollowPattern (this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise> async pauseAutoFollowPattern (this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptions): Promise @@ -229,6 +257,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Pauses a follower index. The follower index will not fetch any additional operations from the leader index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-post-pause-follow.html Elasticsearch API docs} + */ async pauseFollow (this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise async pauseFollow (this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptionsWithMeta): Promise> async pauseFollow (this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptions): Promise @@ -251,6 +283,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-put-auto-follow-pattern.html Elasticsearch API docs} + */ async putAutoFollowPattern (this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putAutoFollowPattern (this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise> async putAutoFollowPattern (this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptions): Promise @@ -285,6 +321,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Resumes an auto-follow pattern that has been paused + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-resume-auto-follow-pattern.html Elasticsearch API docs} + */ async resumeAutoFollowPattern (this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise async resumeAutoFollowPattern (this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise> async resumeAutoFollowPattern (this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptions): Promise @@ -307,6 +347,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Resumes a follower index that has been paused + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-post-resume-follow.html Elasticsearch API docs} + */ async resumeFollow (this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise async resumeFollow (this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptionsWithMeta): Promise> async resumeFollow (this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptions): Promise @@ -341,6 +385,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets all stats related to cross-cluster replication. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-get-stats.html Elasticsearch API docs} + */ async stats (this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stats (this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async stats (this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptions): Promise @@ -364,6 +412,10 @@ export default class Ccr { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ccr-post-unfollow.html Elasticsearch API docs} + */ async unfollow (this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise async unfollow (this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptionsWithMeta): Promise> async unfollow (this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/clear_scroll.ts b/src/api/api/clear_scroll.ts index a14482cd7..3e5b25adb 100644 --- a/src/api/api/clear_scroll.ts +++ b/src/api/api/clear_scroll.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Explicitly clears the search context for a scroll. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/clear-scroll-api.html Elasticsearch API docs} + */ export default async function ClearScrollApi (this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function ClearScrollApi (this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function ClearScrollApi (this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/close_point_in_time.ts b/src/api/api/close_point_in_time.ts index 4e1a7d4b1..f595531a0 100644 --- a/src/api/api/close_point_in_time.ts +++ b/src/api/api/close_point_in_time.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Close a point in time + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/point-in-time-api.html Elasticsearch API docs} + */ export default async function ClosePointInTimeApi (this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function ClosePointInTimeApi (this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function ClosePointInTimeApi (this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/cluster.ts b/src/api/api/cluster.ts index 4cb08fe44..be7188fd7 100644 --- a/src/api/api/cluster.ts +++ b/src/api/api/cluster.ts @@ -43,6 +43,10 @@ export default class Cluster { this.transport = transport } + /** + * Provides explanations for shard allocations in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-allocation-explain.html Elasticsearch API docs} + */ async allocationExplain (this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptionsWithOutMeta): Promise async allocationExplain (this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptionsWithMeta): Promise> async allocationExplain (this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptions): Promise @@ -78,6 +82,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes a component template + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-component-template.html Elasticsearch API docs} + */ async deleteComponentTemplate (this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteComponentTemplate (this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteComponentTemplate (this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptions): Promise @@ -100,6 +108,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Clears cluster voting config exclusions. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/voting-config-exclusions.html Elasticsearch API docs} + */ async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptions): Promise @@ -123,6 +135,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about whether a particular component template exist + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-component-template.html Elasticsearch API docs} + */ async existsComponentTemplate (this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async existsComponentTemplate (this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async existsComponentTemplate (this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptions): Promise @@ -145,6 +161,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns one or more component templates + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-component-template.html Elasticsearch API docs} + */ async getComponentTemplate (this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getComponentTemplate (this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async getComponentTemplate (this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions): Promise @@ -175,6 +195,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns cluster settings. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-get-settings.html Elasticsearch API docs} + */ async getSettings (this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getSettings (this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getSettings (this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptions): Promise @@ -198,6 +222,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns basic information about the health of the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-health.html Elasticsearch API docs} + */ async health (this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptionsWithOutMeta): Promise async health (this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptionsWithMeta): Promise> async health (this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptions): Promise @@ -228,6 +256,37 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns different information about the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-info.html Elasticsearch API docs} + */ + async info (this: That, params: T.ClusterInfoRequest | TB.ClusterInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async info (this: That, params: T.ClusterInfoRequest | TB.ClusterInfoRequest, options?: TransportRequestOptionsWithMeta): Promise> + async info (this: That, params: T.ClusterInfoRequest | TB.ClusterInfoRequest, options?: TransportRequestOptions): Promise + async info (this: That, params: T.ClusterInfoRequest | TB.ClusterInfoRequest, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = ['target'] + const querystring: Record = {} + const body = undefined + + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + // @ts-expect-error + querystring[key] = params[key] + } + } + + const method = 'GET' + const path = `/_info/${encodeURIComponent(params.target.toString())}` + return await this.transport.request({ path, method, querystring, body }, options) + } + + /** + * Returns a list of any cluster-level changes (e.g. create index, update mapping, + allocate or fail shard) which have not yet been executed. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-pending.html Elasticsearch API docs} + */ async pendingTasks (this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise async pendingTasks (this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptionsWithMeta): Promise> async pendingTasks (this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptions): Promise @@ -251,6 +310,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates the cluster voting config exclusions by node ids or node names. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/voting-config-exclusions.html Elasticsearch API docs} + */ async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithMeta): Promise> async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptions): Promise @@ -274,6 +337,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates or updates a component template + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-component-template.html Elasticsearch API docs} + */ async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise @@ -308,6 +375,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates the cluster settings. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-update-settings.html Elasticsearch API docs} + */ async putSettings (this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putSettings (this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise> async putSettings (this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptions): Promise @@ -343,6 +414,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the information about configured remote clusters. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-remote-info.html Elasticsearch API docs} + */ async remoteInfo (this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise async remoteInfo (this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptionsWithMeta): Promise> async remoteInfo (this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptions): Promise @@ -366,6 +441,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Allows to manually change the allocation of individual shards in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-reroute.html Elasticsearch API docs} + */ async reroute (this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptionsWithOutMeta): Promise async reroute (this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptionsWithMeta): Promise> async reroute (this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptions): Promise @@ -401,6 +480,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns a comprehensive information about the state of the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-state.html Elasticsearch API docs} + */ async state (this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async state (this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptionsWithMeta): Promise> async state (this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptions): Promise @@ -434,6 +517,10 @@ export default class Cluster { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns high-level overview of cluster statistics. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-stats.html Elasticsearch API docs} + */ async stats (this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stats (this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async stats (this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/count.ts b/src/api/api/count.ts index aec469fd7..0e222b780 100644 --- a/src/api/api/count.ts +++ b/src/api/api/count.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns number of documents matching a query. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-count.html Elasticsearch API docs} + */ export default async function CountApi (this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function CountApi (this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function CountApi (this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/create.ts b/src/api/api/create.ts index 61e3fbc75..0284dc19c 100644 --- a/src/api/api/create.ts +++ b/src/api/api/create.ts @@ -37,6 +37,12 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Creates a new document in the index. + +Returns a 409 response when a document with a same ID already exists in the index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-index_.html Elasticsearch API docs} + */ export default async function CreateApi (this: That, params: T.CreateRequest | TB.CreateRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function CreateApi (this: That, params: T.CreateRequest | TB.CreateRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function CreateApi (this: That, params: T.CreateRequest | TB.CreateRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/dangling_indices.ts b/src/api/api/dangling_indices.ts index 493260a94..825e565aa 100644 --- a/src/api/api/dangling_indices.ts +++ b/src/api/api/dangling_indices.ts @@ -43,6 +43,10 @@ export default class DanglingIndices { this.transport = transport } + /** + * Deletes the specified dangling index + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-gateway-dangling-indices.html Elasticsearch API docs} + */ async deleteDanglingIndex (this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteDanglingIndex (this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteDanglingIndex (this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class DanglingIndices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Imports the specified dangling index + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-gateway-dangling-indices.html Elasticsearch API docs} + */ async importDanglingIndex (this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptionsWithOutMeta): Promise async importDanglingIndex (this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptionsWithMeta): Promise> async importDanglingIndex (this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptions): Promise @@ -87,6 +95,10 @@ export default class DanglingIndices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns all dangling indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-gateway-dangling-indices.html Elasticsearch API docs} + */ async listDanglingIndices (this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async listDanglingIndices (this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptionsWithMeta): Promise> async listDanglingIndices (this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/delete.ts b/src/api/api/delete.ts index 1f7c06ddf..3a8783a88 100644 --- a/src/api/api/delete.ts +++ b/src/api/api/delete.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Removes a document from the index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-delete.html Elasticsearch API docs} + */ export default async function DeleteApi (this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function DeleteApi (this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function DeleteApi (this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/delete_by_query.ts b/src/api/api/delete_by_query.ts index 665bfe810..7b7664581 100644 --- a/src/api/api/delete_by_query.ts +++ b/src/api/api/delete_by_query.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Deletes documents matching the provided query. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-delete-by-query.html Elasticsearch API docs} + */ export default async function DeleteByQueryApi (this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function DeleteByQueryApi (this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function DeleteByQueryApi (this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/delete_by_query_rethrottle.ts b/src/api/api/delete_by_query_rethrottle.ts index 60c722e0a..c84002519 100644 --- a/src/api/api/delete_by_query_rethrottle.ts +++ b/src/api/api/delete_by_query_rethrottle.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Changes the number of requests per second for a particular Delete By Query operation. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-delete-by-query.html Elasticsearch API docs} + */ export default async function DeleteByQueryRethrottleApi (this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function DeleteByQueryRethrottleApi (this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function DeleteByQueryRethrottleApi (this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/delete_script.ts b/src/api/api/delete_script.ts index 5e2e4f50f..ff186863f 100644 --- a/src/api/api/delete_script.ts +++ b/src/api/api/delete_script.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Deletes a script. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-scripting.html Elasticsearch API docs} + */ export default async function DeleteScriptApi (this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function DeleteScriptApi (this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function DeleteScriptApi (this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/enrich.ts b/src/api/api/enrich.ts index 2ebc67be0..d6a6b990c 100644 --- a/src/api/api/enrich.ts +++ b/src/api/api/enrich.ts @@ -43,6 +43,10 @@ export default class Enrich { this.transport = transport } + /** + * Deletes an existing enrich policy and its enrich index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-enrich-policy-api.html Elasticsearch API docs} + */ async deletePolicy (this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deletePolicy (this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptionsWithMeta): Promise> async deletePolicy (this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Enrich { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates the enrich index for an existing enrich policy. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/execute-enrich-policy-api.html Elasticsearch API docs} + */ async executePolicy (this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async executePolicy (this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptionsWithMeta): Promise> async executePolicy (this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptions): Promise @@ -87,6 +95,10 @@ export default class Enrich { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets information about an enrich policy. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-enrich-policy-api.html Elasticsearch API docs} + */ async getPolicy (this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getPolicy (this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise> async getPolicy (this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptions): Promise @@ -117,6 +129,10 @@ export default class Enrich { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a new enrich policy. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-enrich-policy-api.html Elasticsearch API docs} + */ async putPolicy (this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putPolicy (this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise> async putPolicy (this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptions): Promise @@ -151,6 +167,10 @@ export default class Enrich { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets enrich coordinator statistics and information about enrich policies that are currently executing. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/enrich-stats-api.html Elasticsearch API docs} + */ async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/eql.ts b/src/api/api/eql.ts index 415fbc470..a181194c8 100644 --- a/src/api/api/eql.ts +++ b/src/api/api/eql.ts @@ -43,6 +43,10 @@ export default class Eql { this.transport = transport } + /** + * Deletes an async EQL search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/eql-search-api.html Elasticsearch API docs} + */ async delete (this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise async delete (this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise> async delete (this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Eql { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns async results from previously executed Event Query Language (EQL) search + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/eql-search-api.html Elasticsearch API docs} + */ async get (this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async get (this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async get (this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptions): Promise> @@ -87,6 +95,10 @@ export default class Eql { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the status of a previously submitted async or stored Event Query Language (EQL) search + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/eql-search-api.html Elasticsearch API docs} + */ async getStatus (this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getStatus (this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptionsWithMeta): Promise> async getStatus (this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptions): Promise @@ -109,6 +121,10 @@ export default class Eql { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns results matching a query expressed in Event Query Language (EQL) + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/eql-search-api.html Elasticsearch API docs} + */ async search (this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async search (this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async search (this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/exists.ts b/src/api/api/exists.ts index f0cfd6276..309612b31 100644 --- a/src/api/api/exists.ts +++ b/src/api/api/exists.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns information about whether a document exists in an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-get.html Elasticsearch API docs} + */ export default async function ExistsApi (this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function ExistsApi (this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function ExistsApi (this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/exists_source.ts b/src/api/api/exists_source.ts index 590c4f7f1..6c8142f9b 100644 --- a/src/api/api/exists_source.ts +++ b/src/api/api/exists_source.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns information about whether a document source exists in an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-get.html Elasticsearch API docs} + */ export default async function ExistsSourceApi (this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function ExistsSourceApi (this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function ExistsSourceApi (this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/explain.ts b/src/api/api/explain.ts index 4235f64c1..45568b812 100644 --- a/src/api/api/explain.ts +++ b/src/api/api/explain.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns information about why a specific matches (or doesn't match) a query. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-explain.html Elasticsearch API docs} + */ export default async function ExplainApi (this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function ExplainApi (this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function ExplainApi (this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/features.ts b/src/api/api/features.ts index d05d4831a..01a1b3a82 100644 --- a/src/api/api/features.ts +++ b/src/api/api/features.ts @@ -43,6 +43,10 @@ export default class Features { this.transport = transport } + /** + * Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-features-api.html Elasticsearch API docs} + */ async getFeatures (this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getFeatures (this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptionsWithMeta): Promise> async getFeatures (this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptions): Promise @@ -66,6 +70,10 @@ export default class Features { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Resets the internal state of features, usually by deleting system indices + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async resetFeatures (this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async resetFeatures (this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptionsWithMeta): Promise> async resetFeatures (this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/field_caps.ts b/src/api/api/field_caps.ts index 5678857a8..765b276bf 100644 --- a/src/api/api/field_caps.ts +++ b/src/api/api/field_caps.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns the information about the capabilities of fields among multiple indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-field-caps.html Elasticsearch API docs} + */ export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/fleet.ts b/src/api/api/fleet.ts index baae23b8f..16a75fff7 100644 --- a/src/api/api/fleet.ts +++ b/src/api/api/fleet.ts @@ -43,6 +43,10 @@ export default class Fleet { this.transport = transport } + /** + * Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-global-checkpoints.html Elasticsearch API docs} + */ async globalCheckpoints (this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async globalCheckpoints (this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithMeta): Promise> async globalCheckpoints (this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,9 @@ export default class Fleet { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Multi Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. + */ async msearch (this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async msearch (this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async msearch (this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptions): Promise> @@ -99,6 +106,9 @@ export default class Fleet { return await this.transport.request({ path, method, querystring, bulkBody: body }, options) } + /** + * Search API where the search will only be executed after specified checkpoints are available due to a refresh. This API is designed for internal use by the fleet server project. + */ async search (this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async search (this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async search (this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/get.ts b/src/api/api/get.ts index 12aa2faf9..4bdeaa4c4 100644 --- a/src/api/api/get.ts +++ b/src/api/api/get.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns a document. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-get.html Elasticsearch API docs} + */ export default async function GetApi (this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function GetApi (this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function GetApi (this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/get_script.ts b/src/api/api/get_script.ts index 515926b66..d2808c987 100644 --- a/src/api/api/get_script.ts +++ b/src/api/api/get_script.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns a script. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-scripting.html Elasticsearch API docs} + */ export default async function GetScriptApi (this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function GetScriptApi (this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function GetScriptApi (this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/get_script_context.ts b/src/api/api/get_script_context.ts index 9cb53cdb0..b23e0908a 100644 --- a/src/api/api/get_script_context.ts +++ b/src/api/api/get_script_context.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns all script contexts. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/painless/main/painless-contexts.html Elasticsearch API docs} + */ export default async function GetScriptContextApi (this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function GetScriptContextApi (this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function GetScriptContextApi (this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/get_script_languages.ts b/src/api/api/get_script_languages.ts index e4ce35ca0..d155cd83a 100644 --- a/src/api/api/get_script_languages.ts +++ b/src/api/api/get_script_languages.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns available script types, languages and contexts + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-scripting.html Elasticsearch API docs} + */ export default async function GetScriptLanguagesApi (this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function GetScriptLanguagesApi (this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function GetScriptLanguagesApi (this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/get_source.ts b/src/api/api/get_source.ts index 0e0aa6737..958738be3 100644 --- a/src/api/api/get_source.ts +++ b/src/api/api/get_source.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns the source of a document. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-get.html Elasticsearch API docs} + */ export default async function GetSourceApi (this: That, params: T.GetSourceRequest | TB.GetSourceRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function GetSourceApi (this: That, params: T.GetSourceRequest | TB.GetSourceRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function GetSourceApi (this: That, params: T.GetSourceRequest | TB.GetSourceRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/graph.ts b/src/api/api/graph.ts index fdfb8d7f6..ff46902a5 100644 --- a/src/api/api/graph.ts +++ b/src/api/api/graph.ts @@ -43,6 +43,10 @@ export default class Graph { this.transport = transport } + /** + * Explore extracted and summarized information about the documents and terms in an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/graph-explore-api.html Elasticsearch API docs} + */ async explore (this: That, params: T.GraphExploreRequest | TB.GraphExploreRequest, options?: TransportRequestOptionsWithOutMeta): Promise async explore (this: That, params: T.GraphExploreRequest | TB.GraphExploreRequest, options?: TransportRequestOptionsWithMeta): Promise> async explore (this: That, params: T.GraphExploreRequest | TB.GraphExploreRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/health_report.ts b/src/api/api/health_report.ts index 78b97b03d..ee365433e 100644 --- a/src/api/api/health_report.ts +++ b/src/api/api/health_report.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns the health of the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/health-api.html Elasticsearch API docs} + */ export default async function HealthReportApi (this: That, params?: T.HealthReportRequest | TB.HealthReportRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function HealthReportApi (this: That, params?: T.HealthReportRequest | TB.HealthReportRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function HealthReportApi (this: That, params?: T.HealthReportRequest | TB.HealthReportRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/ilm.ts b/src/api/api/ilm.ts index 81c620b2e..41c96e94e 100644 --- a/src/api/api/ilm.ts +++ b/src/api/api/ilm.ts @@ -43,6 +43,10 @@ export default class Ilm { this.transport = transport } + /** + * Deletes the specified lifecycle policy definition. A currently used policy cannot be deleted. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-delete-lifecycle.html Elasticsearch API docs} + */ async deleteLifecycle (this: That, params: T.IlmDeleteLifecycleRequest | TB.IlmDeleteLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteLifecycle (this: That, params: T.IlmDeleteLifecycleRequest | TB.IlmDeleteLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteLifecycle (this: That, params: T.IlmDeleteLifecycleRequest | TB.IlmDeleteLifecycleRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information about the index's current lifecycle state, such as the currently executing phase, action, and step. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-explain-lifecycle.html Elasticsearch API docs} + */ async explainLifecycle (this: That, params: T.IlmExplainLifecycleRequest | TB.IlmExplainLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async explainLifecycle (this: That, params: T.IlmExplainLifecycleRequest | TB.IlmExplainLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> async explainLifecycle (this: That, params: T.IlmExplainLifecycleRequest | TB.IlmExplainLifecycleRequest, options?: TransportRequestOptions): Promise @@ -87,6 +95,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the specified policy definition. Includes the policy version and last modified date. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-get-lifecycle.html Elasticsearch API docs} + */ async getLifecycle (this: That, params?: T.IlmGetLifecycleRequest | TB.IlmGetLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getLifecycle (this: That, params?: T.IlmGetLifecycleRequest | TB.IlmGetLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> async getLifecycle (this: That, params?: T.IlmGetLifecycleRequest | TB.IlmGetLifecycleRequest, options?: TransportRequestOptions): Promise @@ -117,6 +129,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves the current index lifecycle management (ILM) status. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-get-status.html Elasticsearch API docs} + */ async getStatus (this: That, params?: T.IlmGetStatusRequest | TB.IlmGetStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getStatus (this: That, params?: T.IlmGetStatusRequest | TB.IlmGetStatusRequest, options?: TransportRequestOptionsWithMeta): Promise> async getStatus (this: That, params?: T.IlmGetStatusRequest | TB.IlmGetStatusRequest, options?: TransportRequestOptions): Promise @@ -140,6 +156,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-migrate-to-data-tiers.html Elasticsearch API docs} + */ async migrateToDataTiers (this: That, params?: T.IlmMigrateToDataTiersRequest | TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptionsWithOutMeta): Promise async migrateToDataTiers (this: That, params?: T.IlmMigrateToDataTiersRequest | TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptionsWithMeta): Promise> async migrateToDataTiers (this: That, params?: T.IlmMigrateToDataTiersRequest | TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptions): Promise @@ -175,6 +195,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Manually moves an index into the specified step and executes that step. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-move-to-step.html Elasticsearch API docs} + */ async moveToStep (this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptionsWithOutMeta): Promise async moveToStep (this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptionsWithMeta): Promise> async moveToStep (this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptions): Promise @@ -209,6 +233,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a lifecycle policy + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-put-lifecycle.html Elasticsearch API docs} + */ async putLifecycle (this: That, params: T.IlmPutLifecycleRequest | TB.IlmPutLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putLifecycle (this: That, params: T.IlmPutLifecycleRequest | TB.IlmPutLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> async putLifecycle (this: That, params: T.IlmPutLifecycleRequest | TB.IlmPutLifecycleRequest, options?: TransportRequestOptions): Promise @@ -243,6 +271,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Removes the assigned lifecycle policy and stops managing the specified index + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-remove-policy.html Elasticsearch API docs} + */ async removePolicy (this: That, params: T.IlmRemovePolicyRequest | TB.IlmRemovePolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async removePolicy (this: That, params: T.IlmRemovePolicyRequest | TB.IlmRemovePolicyRequest, options?: TransportRequestOptionsWithMeta): Promise> async removePolicy (this: That, params: T.IlmRemovePolicyRequest | TB.IlmRemovePolicyRequest, options?: TransportRequestOptions): Promise @@ -265,6 +297,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retries executing the policy for an index that is in the ERROR step. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-retry-policy.html Elasticsearch API docs} + */ async retry (this: That, params: T.IlmRetryRequest | TB.IlmRetryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async retry (this: That, params: T.IlmRetryRequest | TB.IlmRetryRequest, options?: TransportRequestOptionsWithMeta): Promise> async retry (this: That, params: T.IlmRetryRequest | TB.IlmRetryRequest, options?: TransportRequestOptions): Promise @@ -287,6 +323,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Start the index lifecycle management (ILM) plugin. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-start.html Elasticsearch API docs} + */ async start (this: That, params?: T.IlmStartRequest | TB.IlmStartRequest, options?: TransportRequestOptionsWithOutMeta): Promise async start (this: That, params?: T.IlmStartRequest | TB.IlmStartRequest, options?: TransportRequestOptionsWithMeta): Promise> async start (this: That, params?: T.IlmStartRequest | TB.IlmStartRequest, options?: TransportRequestOptions): Promise @@ -310,6 +350,10 @@ export default class Ilm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Halts all lifecycle management operations and stops the index lifecycle management (ILM) plugin + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ilm-stop.html Elasticsearch API docs} + */ async stop (this: That, params?: T.IlmStopRequest | TB.IlmStopRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stop (this: That, params?: T.IlmStopRequest | TB.IlmStopRequest, options?: TransportRequestOptionsWithMeta): Promise> async stop (this: That, params?: T.IlmStopRequest | TB.IlmStopRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/index.ts b/src/api/api/index.ts index f1aac6a12..d461144a3 100644 --- a/src/api/api/index.ts +++ b/src/api/api/index.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Creates or updates a document in an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-index_.html Elasticsearch API docs} + */ export default async function IndexApi (this: That, params: T.IndexRequest | TB.IndexRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function IndexApi (this: That, params: T.IndexRequest | TB.IndexRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function IndexApi (this: That, params: T.IndexRequest | TB.IndexRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/indices.ts b/src/api/api/indices.ts index 667b95ff3..8413dbf03 100644 --- a/src/api/api/indices.ts +++ b/src/api/api/indices.ts @@ -43,6 +43,10 @@ export default class Indices { this.transport = transport } + /** + * Adds a block to an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/index-modules-blocks.html Elasticsearch API docs} + */ async addBlock (this: That, params: T.IndicesAddBlockRequest | TB.IndicesAddBlockRequest, options?: TransportRequestOptionsWithOutMeta): Promise async addBlock (this: That, params: T.IndicesAddBlockRequest | TB.IndicesAddBlockRequest, options?: TransportRequestOptionsWithMeta): Promise> async addBlock (this: That, params: T.IndicesAddBlockRequest | TB.IndicesAddBlockRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Performs the analysis process on a text and return the tokens breakdown of the text. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-analyze.html Elasticsearch API docs} + */ async analyze (this: That, params?: T.IndicesAnalyzeRequest | TB.IndicesAnalyzeRequest, options?: TransportRequestOptionsWithOutMeta): Promise async analyze (this: That, params?: T.IndicesAnalyzeRequest | TB.IndicesAnalyzeRequest, options?: TransportRequestOptionsWithMeta): Promise> async analyze (this: That, params?: T.IndicesAnalyzeRequest | TB.IndicesAnalyzeRequest, options?: TransportRequestOptions): Promise @@ -107,6 +115,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Clears all or specific caches for one or more indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-clearcache.html Elasticsearch API docs} + */ async clearCache (this: That, params?: T.IndicesClearCacheRequest | TB.IndicesClearCacheRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearCache (this: That, params?: T.IndicesClearCacheRequest | TB.IndicesClearCacheRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearCache (this: That, params?: T.IndicesClearCacheRequest | TB.IndicesClearCacheRequest, options?: TransportRequestOptions): Promise @@ -137,6 +149,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Clones an index + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-clone-index.html Elasticsearch API docs} + */ async clone (this: That, params: T.IndicesCloneRequest | TB.IndicesCloneRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clone (this: That, params: T.IndicesCloneRequest | TB.IndicesCloneRequest, options?: TransportRequestOptionsWithMeta): Promise> async clone (this: That, params: T.IndicesCloneRequest | TB.IndicesCloneRequest, options?: TransportRequestOptions): Promise @@ -171,6 +187,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Closes an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-open-close.html Elasticsearch API docs} + */ async close (this: That, params: T.IndicesCloseRequest | TB.IndicesCloseRequest, options?: TransportRequestOptionsWithOutMeta): Promise async close (this: That, params: T.IndicesCloseRequest | TB.IndicesCloseRequest, options?: TransportRequestOptionsWithMeta): Promise> async close (this: That, params: T.IndicesCloseRequest | TB.IndicesCloseRequest, options?: TransportRequestOptions): Promise @@ -193,6 +213,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates an index with optional settings and mappings. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-create-index.html Elasticsearch API docs} + */ async create (this: That, params: T.IndicesCreateRequest | TB.IndicesCreateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async create (this: That, params: T.IndicesCreateRequest | TB.IndicesCreateRequest, options?: TransportRequestOptionsWithMeta): Promise> async create (this: That, params: T.IndicesCreateRequest | TB.IndicesCreateRequest, options?: TransportRequestOptions): Promise @@ -227,6 +251,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a data stream + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/data-streams.html Elasticsearch API docs} + */ async createDataStream (this: That, params: T.IndicesCreateDataStreamRequest | TB.IndicesCreateDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise async createDataStream (this: That, params: T.IndicesCreateDataStreamRequest | TB.IndicesCreateDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise> async createDataStream (this: That, params: T.IndicesCreateDataStreamRequest | TB.IndicesCreateDataStreamRequest, options?: TransportRequestOptions): Promise @@ -249,6 +277,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Provides statistics on operations happening in a data stream. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/data-streams.html Elasticsearch API docs} + */ async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions): Promise @@ -279,6 +311,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-delete-index.html Elasticsearch API docs} + */ async delete (this: That, params: T.IndicesDeleteRequest | TB.IndicesDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise async delete (this: That, params: T.IndicesDeleteRequest | TB.IndicesDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise> async delete (this: That, params: T.IndicesDeleteRequest | TB.IndicesDeleteRequest, options?: TransportRequestOptions): Promise @@ -301,6 +337,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an alias. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-aliases.html Elasticsearch API docs} + */ async deleteAlias (this: That, params: T.IndicesDeleteAliasRequest | TB.IndicesDeleteAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteAlias (this: That, params: T.IndicesDeleteAliasRequest | TB.IndicesDeleteAliasRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteAlias (this: That, params: T.IndicesDeleteAliasRequest | TB.IndicesDeleteAliasRequest, options?: TransportRequestOptions): Promise @@ -330,35 +370,36 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } - async deleteDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async deleteDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async deleteDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async deleteDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + /** + * Deletes the data lifecycle of the selected data streams. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/dlm-delete-lifecycle.html Elasticsearch API docs} + */ + async deleteDataLifecycle (this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async deleteDataLifecycle (this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> + async deleteDataLifecycle (this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptions): Promise + async deleteDataLifecycle (this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['name'] const querystring: Record = {} const body = undefined - params = params ?? {} for (const key in params) { if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { + // @ts-expect-error querystring[key] = params[key] } } - let method = '' - let path = '' - if (params.name != null) { - method = 'DELETE' - path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_lifecycle` - } else { - method = 'DELETE' - path = '/_data_stream/_lifecycle' - } + const method = 'DELETE' + const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_lifecycle` return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes a data stream. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/data-streams.html Elasticsearch API docs} + */ async deleteDataStream (this: That, params: T.IndicesDeleteDataStreamRequest | TB.IndicesDeleteDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteDataStream (this: That, params: T.IndicesDeleteDataStreamRequest | TB.IndicesDeleteDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteDataStream (this: That, params: T.IndicesDeleteDataStreamRequest | TB.IndicesDeleteDataStreamRequest, options?: TransportRequestOptions): Promise @@ -381,6 +422,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an index template. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async deleteIndexTemplate (this: That, params: T.IndicesDeleteIndexTemplateRequest | TB.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteIndexTemplate (this: That, params: T.IndicesDeleteIndexTemplateRequest | TB.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteIndexTemplate (this: That, params: T.IndicesDeleteIndexTemplateRequest | TB.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptions): Promise @@ -403,6 +448,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an index template. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async deleteTemplate (this: That, params: T.IndicesDeleteTemplateRequest | TB.IndicesDeleteTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteTemplate (this: That, params: T.IndicesDeleteTemplateRequest | TB.IndicesDeleteTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteTemplate (this: That, params: T.IndicesDeleteTemplateRequest | TB.IndicesDeleteTemplateRequest, options?: TransportRequestOptions): Promise @@ -425,6 +474,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Analyzes the disk usage of each field of an index or data stream + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-disk-usage.html Elasticsearch API docs} + */ async diskUsage (this: That, params: T.IndicesDiskUsageRequest | TB.IndicesDiskUsageRequest, options?: TransportRequestOptionsWithOutMeta): Promise async diskUsage (this: That, params: T.IndicesDiskUsageRequest | TB.IndicesDiskUsageRequest, options?: TransportRequestOptionsWithMeta): Promise> async diskUsage (this: That, params: T.IndicesDiskUsageRequest | TB.IndicesDiskUsageRequest, options?: TransportRequestOptions): Promise @@ -447,6 +500,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Downsample an index + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/xpack-rollup.html Elasticsearch API docs} + */ async downsample (this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async downsample (this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptionsWithMeta): Promise> async downsample (this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptions): Promise @@ -474,6 +531,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about whether a particular index exists. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-exists.html Elasticsearch API docs} + */ async exists (this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async exists (this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptionsWithMeta): Promise> async exists (this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptions): Promise @@ -496,6 +557,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about whether a particular alias exists. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-aliases.html Elasticsearch API docs} + */ async existsAlias (this: That, params: T.IndicesExistsAliasRequest | TB.IndicesExistsAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise async existsAlias (this: That, params: T.IndicesExistsAliasRequest | TB.IndicesExistsAliasRequest, options?: TransportRequestOptionsWithMeta): Promise> async existsAlias (this: That, params: T.IndicesExistsAliasRequest | TB.IndicesExistsAliasRequest, options?: TransportRequestOptions): Promise @@ -525,6 +590,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about whether a particular index template exists. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async existsIndexTemplate (this: That, params: T.IndicesExistsIndexTemplateRequest | TB.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async existsIndexTemplate (this: That, params: T.IndicesExistsIndexTemplateRequest | TB.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async existsIndexTemplate (this: That, params: T.IndicesExistsIndexTemplateRequest | TB.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptions): Promise @@ -547,6 +616,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about whether a particular index template exists. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async existsTemplate (this: That, params: T.IndicesExistsTemplateRequest | TB.IndicesExistsTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async existsTemplate (this: That, params: T.IndicesExistsTemplateRequest | TB.IndicesExistsTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async existsTemplate (this: That, params: T.IndicesExistsTemplateRequest | TB.IndicesExistsTemplateRequest, options?: TransportRequestOptions): Promise @@ -569,28 +642,36 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } - async explainDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async explainDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async explainDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async explainDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + /** + * Retrieves information about the index's current DLM lifecycle, such as any potential encountered error, time since creation etc. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/dlm-explain-lifecycle.html Elasticsearch API docs} + */ + async explainDataLifecycle (this: That, params: T.IndicesExplainDataLifecycleRequest | TB.IndicesExplainDataLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async explainDataLifecycle (this: That, params: T.IndicesExplainDataLifecycleRequest | TB.IndicesExplainDataLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> + async explainDataLifecycle (this: That, params: T.IndicesExplainDataLifecycleRequest | TB.IndicesExplainDataLifecycleRequest, options?: TransportRequestOptions): Promise + async explainDataLifecycle (this: That, params: T.IndicesExplainDataLifecycleRequest | TB.IndicesExplainDataLifecycleRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['index'] const querystring: Record = {} const body = undefined - params = params ?? {} for (const key in params) { if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { + // @ts-expect-error querystring[key] = params[key] } } - const method = 'POST' + const method = 'GET' const path = `/${encodeURIComponent(params.index.toString())}/_lifecycle/explain` return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the field usage stats for each field of an index + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/field-usage-stats.html Elasticsearch API docs} + */ async fieldUsageStats (this: That, params: T.IndicesFieldUsageStatsRequest | TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async fieldUsageStats (this: That, params: T.IndicesFieldUsageStatsRequest | TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async fieldUsageStats (this: That, params: T.IndicesFieldUsageStatsRequest | TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptions): Promise @@ -613,6 +694,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Performs the flush operation on one or more indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-flush.html Elasticsearch API docs} + */ async flush (this: That, params?: T.IndicesFlushRequest | TB.IndicesFlushRequest, options?: TransportRequestOptionsWithOutMeta): Promise async flush (this: That, params?: T.IndicesFlushRequest | TB.IndicesFlushRequest, options?: TransportRequestOptionsWithMeta): Promise> async flush (this: That, params?: T.IndicesFlushRequest | TB.IndicesFlushRequest, options?: TransportRequestOptions): Promise @@ -643,6 +728,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Performs the force merge operation on one or more indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-forcemerge.html Elasticsearch API docs} + */ async forcemerge (this: That, params?: T.IndicesForcemergeRequest | TB.IndicesForcemergeRequest, options?: TransportRequestOptionsWithOutMeta): Promise async forcemerge (this: That, params?: T.IndicesForcemergeRequest | TB.IndicesForcemergeRequest, options?: TransportRequestOptionsWithMeta): Promise> async forcemerge (this: That, params?: T.IndicesForcemergeRequest | TB.IndicesForcemergeRequest, options?: TransportRequestOptions): Promise @@ -673,6 +762,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about one or more indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-get-index.html Elasticsearch API docs} + */ async get (this: That, params: T.IndicesGetRequest | TB.IndicesGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise async get (this: That, params: T.IndicesGetRequest | TB.IndicesGetRequest, options?: TransportRequestOptionsWithMeta): Promise> async get (this: That, params: T.IndicesGetRequest | TB.IndicesGetRequest, options?: TransportRequestOptions): Promise @@ -695,6 +788,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns an alias. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-aliases.html Elasticsearch API docs} + */ async getAlias (this: That, params?: T.IndicesGetAliasRequest | TB.IndicesGetAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getAlias (this: That, params?: T.IndicesGetAliasRequest | TB.IndicesGetAliasRequest, options?: TransportRequestOptionsWithMeta): Promise> async getAlias (this: That, params?: T.IndicesGetAliasRequest | TB.IndicesGetAliasRequest, options?: TransportRequestOptions): Promise @@ -731,35 +828,36 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } - async getDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async getDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async getDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async getDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + /** + * Returns the data lifecycle of the selected data streams. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/dlm-get-lifecycle.html Elasticsearch API docs} + */ + async getDataLifecycle (this: That, params: T.IndicesGetDataLifecycleRequest | TB.IndicesGetDataLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async getDataLifecycle (this: That, params: T.IndicesGetDataLifecycleRequest | TB.IndicesGetDataLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> + async getDataLifecycle (this: That, params: T.IndicesGetDataLifecycleRequest | TB.IndicesGetDataLifecycleRequest, options?: TransportRequestOptions): Promise + async getDataLifecycle (this: That, params: T.IndicesGetDataLifecycleRequest | TB.IndicesGetDataLifecycleRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['name'] const querystring: Record = {} const body = undefined - params = params ?? {} for (const key in params) { if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { + // @ts-expect-error querystring[key] = params[key] } } - let method = '' - let path = '' - if (params.name != null) { - method = 'GET' - path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_lifecycle` - } else { - method = 'GET' - path = '/_data_stream/_lifecycle' - } + const method = 'GET' + const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_lifecycle` return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns data streams. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/data-streams.html Elasticsearch API docs} + */ async getDataStream (this: That, params?: T.IndicesGetDataStreamRequest | TB.IndicesGetDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getDataStream (this: That, params?: T.IndicesGetDataStreamRequest | TB.IndicesGetDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise> async getDataStream (this: That, params?: T.IndicesGetDataStreamRequest | TB.IndicesGetDataStreamRequest, options?: TransportRequestOptions): Promise @@ -790,6 +888,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns mapping for one or more fields. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-get-field-mapping.html Elasticsearch API docs} + */ async getFieldMapping (this: That, params: T.IndicesGetFieldMappingRequest | TB.IndicesGetFieldMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getFieldMapping (this: That, params: T.IndicesGetFieldMappingRequest | TB.IndicesGetFieldMappingRequest, options?: TransportRequestOptionsWithMeta): Promise> async getFieldMapping (this: That, params: T.IndicesGetFieldMappingRequest | TB.IndicesGetFieldMappingRequest, options?: TransportRequestOptions): Promise @@ -819,6 +921,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns an index template. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async getIndexTemplate (this: That, params?: T.IndicesGetIndexTemplateRequest | TB.IndicesGetIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getIndexTemplate (this: That, params?: T.IndicesGetIndexTemplateRequest | TB.IndicesGetIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async getIndexTemplate (this: That, params?: T.IndicesGetIndexTemplateRequest | TB.IndicesGetIndexTemplateRequest, options?: TransportRequestOptions): Promise @@ -849,6 +955,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns mappings for one or more indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-get-mapping.html Elasticsearch API docs} + */ async getMapping (this: That, params?: T.IndicesGetMappingRequest | TB.IndicesGetMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getMapping (this: That, params?: T.IndicesGetMappingRequest | TB.IndicesGetMappingRequest, options?: TransportRequestOptionsWithMeta): Promise> async getMapping (this: That, params?: T.IndicesGetMappingRequest | TB.IndicesGetMappingRequest, options?: TransportRequestOptions): Promise @@ -879,6 +989,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns settings for one or more indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-get-settings.html Elasticsearch API docs} + */ async getSettings (this: That, params?: T.IndicesGetSettingsRequest | TB.IndicesGetSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getSettings (this: That, params?: T.IndicesGetSettingsRequest | TB.IndicesGetSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getSettings (this: That, params?: T.IndicesGetSettingsRequest | TB.IndicesGetSettingsRequest, options?: TransportRequestOptions): Promise @@ -915,6 +1029,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns an index template. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async getTemplate (this: That, params?: T.IndicesGetTemplateRequest | TB.IndicesGetTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getTemplate (this: That, params?: T.IndicesGetTemplateRequest | TB.IndicesGetTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async getTemplate (this: That, params?: T.IndicesGetTemplateRequest | TB.IndicesGetTemplateRequest, options?: TransportRequestOptions): Promise @@ -945,6 +1063,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Migrates an alias to a data stream + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/data-streams.html Elasticsearch API docs} + */ async migrateToDataStream (this: That, params: T.IndicesMigrateToDataStreamRequest | TB.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise async migrateToDataStream (this: That, params: T.IndicesMigrateToDataStreamRequest | TB.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise> async migrateToDataStream (this: That, params: T.IndicesMigrateToDataStreamRequest | TB.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptions): Promise @@ -967,6 +1089,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Modifies a data stream + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/data-streams.html Elasticsearch API docs} + */ async modifyDataStream (this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise async modifyDataStream (this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise> async modifyDataStream (this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptions): Promise @@ -1001,6 +1127,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Opens an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-open-close.html Elasticsearch API docs} + */ async open (this: That, params: T.IndicesOpenRequest | TB.IndicesOpenRequest, options?: TransportRequestOptionsWithOutMeta): Promise async open (this: That, params: T.IndicesOpenRequest | TB.IndicesOpenRequest, options?: TransportRequestOptionsWithMeta): Promise> async open (this: That, params: T.IndicesOpenRequest | TB.IndicesOpenRequest, options?: TransportRequestOptions): Promise @@ -1023,6 +1153,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Promotes a data stream from a replicated data stream managed by CCR to a regular data stream + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/data-streams.html Elasticsearch API docs} + */ async promoteDataStream (this: That, params: T.IndicesPromoteDataStreamRequest | TB.IndicesPromoteDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise async promoteDataStream (this: That, params: T.IndicesPromoteDataStreamRequest | TB.IndicesPromoteDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise> async promoteDataStream (this: That, params: T.IndicesPromoteDataStreamRequest | TB.IndicesPromoteDataStreamRequest, options?: TransportRequestOptions): Promise @@ -1045,6 +1179,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates or updates an alias. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-aliases.html Elasticsearch API docs} + */ async putAlias (this: That, params: T.IndicesPutAliasRequest | TB.IndicesPutAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putAlias (this: That, params: T.IndicesPutAliasRequest | TB.IndicesPutAliasRequest, options?: TransportRequestOptionsWithMeta): Promise> async putAlias (this: That, params: T.IndicesPutAliasRequest | TB.IndicesPutAliasRequest, options?: TransportRequestOptions): Promise @@ -1086,35 +1224,48 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } - async putDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async putDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async putDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async putDataLifecycle (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + /** + * Updates the data lifecycle of the selected data streams. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/dlm-put-lifecycle.html Elasticsearch API docs} + */ + async putDataLifecycle (this: That, params: T.IndicesPutDataLifecycleRequest | TB.IndicesPutDataLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async putDataLifecycle (this: That, params: T.IndicesPutDataLifecycleRequest | TB.IndicesPutDataLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> + async putDataLifecycle (this: That, params: T.IndicesPutDataLifecycleRequest | TB.IndicesPutDataLifecycleRequest, options?: TransportRequestOptions): Promise + async putDataLifecycle (this: That, params: T.IndicesPutDataLifecycleRequest | TB.IndicesPutDataLifecycleRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['name'] + const acceptedBody: string[] = ['data_retention'] const querystring: Record = {} - const body = undefined + // @ts-expect-error + const userBody: any = params?.body + let body: Record | string + if (typeof userBody === 'string') { + body = userBody + } else { + body = userBody != null ? { ...userBody } : undefined + } - params = params ?? {} for (const key in params) { - if (acceptedPath.includes(key)) { + if (acceptedBody.includes(key)) { + body = body ?? {} + // @ts-expect-error + body[key] = params[key] + } else if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { + // @ts-expect-error querystring[key] = params[key] } } - let method = '' - let path = '' - if (params.name != null) { - method = 'PUT' - path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_lifecycle` - } else { - method = 'PUT' - path = '/_data_stream/_lifecycle' - } + const method = 'PUT' + const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_lifecycle` return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates or updates an index template. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async putIndexTemplate (this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putIndexTemplate (this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async putIndexTemplate (this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): Promise @@ -1149,6 +1300,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates the index mappings. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-put-mapping.html Elasticsearch API docs} + */ async putMapping (this: That, params: T.IndicesPutMappingRequest | TB.IndicesPutMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putMapping (this: That, params: T.IndicesPutMappingRequest | TB.IndicesPutMappingRequest, options?: TransportRequestOptionsWithMeta): Promise> async putMapping (this: That, params: T.IndicesPutMappingRequest | TB.IndicesPutMappingRequest, options?: TransportRequestOptions): Promise @@ -1183,6 +1338,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates the index settings. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-update-settings.html Elasticsearch API docs} + */ async putSettings (this: That, params: T.IndicesPutSettingsRequest | TB.IndicesPutSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putSettings (this: That, params: T.IndicesPutSettingsRequest | TB.IndicesPutSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise> async putSettings (this: That, params: T.IndicesPutSettingsRequest | TB.IndicesPutSettingsRequest, options?: TransportRequestOptions): Promise @@ -1217,6 +1376,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates or updates an index template. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptions): Promise @@ -1251,6 +1414,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about ongoing index shard recoveries. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-recovery.html Elasticsearch API docs} + */ async recovery (this: That, params?: T.IndicesRecoveryRequest | TB.IndicesRecoveryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async recovery (this: That, params?: T.IndicesRecoveryRequest | TB.IndicesRecoveryRequest, options?: TransportRequestOptionsWithMeta): Promise> async recovery (this: That, params?: T.IndicesRecoveryRequest | TB.IndicesRecoveryRequest, options?: TransportRequestOptions): Promise @@ -1281,6 +1448,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Performs the refresh operation in one or more indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-refresh.html Elasticsearch API docs} + */ async refresh (this: That, params?: T.IndicesRefreshRequest | TB.IndicesRefreshRequest, options?: TransportRequestOptionsWithOutMeta): Promise async refresh (this: That, params?: T.IndicesRefreshRequest | TB.IndicesRefreshRequest, options?: TransportRequestOptionsWithMeta): Promise> async refresh (this: That, params?: T.IndicesRefreshRequest | TB.IndicesRefreshRequest, options?: TransportRequestOptions): Promise @@ -1311,6 +1482,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Reloads an index's search analyzers and their resources. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-reload-analyzers.html Elasticsearch API docs} + */ async reloadSearchAnalyzers (this: That, params: T.IndicesReloadSearchAnalyzersRequest | TB.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptionsWithOutMeta): Promise async reloadSearchAnalyzers (this: That, params: T.IndicesReloadSearchAnalyzersRequest | TB.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptionsWithMeta): Promise> async reloadSearchAnalyzers (this: That, params: T.IndicesReloadSearchAnalyzersRequest | TB.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptions): Promise @@ -1333,6 +1508,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about any matching indices, aliases, and data streams + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-resolve-index-api.html Elasticsearch API docs} + */ async resolveIndex (this: That, params: T.IndicesResolveIndexRequest | TB.IndicesResolveIndexRequest, options?: TransportRequestOptionsWithOutMeta): Promise async resolveIndex (this: That, params: T.IndicesResolveIndexRequest | TB.IndicesResolveIndexRequest, options?: TransportRequestOptionsWithMeta): Promise> async resolveIndex (this: That, params: T.IndicesResolveIndexRequest | TB.IndicesResolveIndexRequest, options?: TransportRequestOptions): Promise @@ -1355,6 +1534,11 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates an alias to point to a new index when the existing index + is considered to be too large or too old. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-rollover-index.html Elasticsearch API docs} + */ async rollover (this: That, params: T.IndicesRolloverRequest | TB.IndicesRolloverRequest, options?: TransportRequestOptionsWithOutMeta): Promise async rollover (this: That, params: T.IndicesRolloverRequest | TB.IndicesRolloverRequest, options?: TransportRequestOptionsWithMeta): Promise> async rollover (this: That, params: T.IndicesRolloverRequest | TB.IndicesRolloverRequest, options?: TransportRequestOptions): Promise @@ -1396,6 +1580,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Provides low-level information about segments in a Lucene index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-segments.html Elasticsearch API docs} + */ async segments (this: That, params?: T.IndicesSegmentsRequest | TB.IndicesSegmentsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async segments (this: That, params?: T.IndicesSegmentsRequest | TB.IndicesSegmentsRequest, options?: TransportRequestOptionsWithMeta): Promise> async segments (this: That, params?: T.IndicesSegmentsRequest | TB.IndicesSegmentsRequest, options?: TransportRequestOptions): Promise @@ -1426,6 +1614,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Provides store information for shard copies of indices. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-shards-stores.html Elasticsearch API docs} + */ async shardStores (this: That, params?: T.IndicesShardStoresRequest | TB.IndicesShardStoresRequest, options?: TransportRequestOptionsWithOutMeta): Promise async shardStores (this: That, params?: T.IndicesShardStoresRequest | TB.IndicesShardStoresRequest, options?: TransportRequestOptionsWithMeta): Promise> async shardStores (this: That, params?: T.IndicesShardStoresRequest | TB.IndicesShardStoresRequest, options?: TransportRequestOptions): Promise @@ -1456,6 +1648,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Allow to shrink an existing index into a new index with fewer primary shards. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-shrink-index.html Elasticsearch API docs} + */ async shrink (this: That, params: T.IndicesShrinkRequest | TB.IndicesShrinkRequest, options?: TransportRequestOptionsWithOutMeta): Promise async shrink (this: That, params: T.IndicesShrinkRequest | TB.IndicesShrinkRequest, options?: TransportRequestOptionsWithMeta): Promise> async shrink (this: That, params: T.IndicesShrinkRequest | TB.IndicesShrinkRequest, options?: TransportRequestOptions): Promise @@ -1490,6 +1686,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Simulate matching the given index name against the index templates in the system + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): Promise @@ -1524,6 +1724,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Simulate resolving the given template name or body + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-templates.html Elasticsearch API docs} + */ async simulateTemplate (this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async simulateTemplate (this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> async simulateTemplate (this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptions): Promise @@ -1558,6 +1762,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Allows you to split an existing index into a new index with more primary shards. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-split-index.html Elasticsearch API docs} + */ async split (this: That, params: T.IndicesSplitRequest | TB.IndicesSplitRequest, options?: TransportRequestOptionsWithOutMeta): Promise async split (this: That, params: T.IndicesSplitRequest | TB.IndicesSplitRequest, options?: TransportRequestOptionsWithMeta): Promise> async split (this: That, params: T.IndicesSplitRequest | TB.IndicesSplitRequest, options?: TransportRequestOptions): Promise @@ -1592,6 +1800,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Provides statistics on operations happening in an index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-stats.html Elasticsearch API docs} + */ async stats (this: That, params?: T.IndicesStatsRequest | TB.IndicesStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stats (this: That, params?: T.IndicesStatsRequest | TB.IndicesStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async stats (this: That, params?: T.IndicesStatsRequest | TB.IndicesStatsRequest, options?: TransportRequestOptions): Promise @@ -1628,6 +1840,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Unfreezes an index. When a frozen index is unfrozen, the index goes through the normal recovery process and becomes writeable again. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/unfreeze-index-api.html Elasticsearch API docs} + */ async unfreeze (this: That, params: T.IndicesUnfreezeRequest | TB.IndicesUnfreezeRequest, options?: TransportRequestOptionsWithOutMeta): Promise async unfreeze (this: That, params: T.IndicesUnfreezeRequest | TB.IndicesUnfreezeRequest, options?: TransportRequestOptionsWithMeta): Promise> async unfreeze (this: That, params: T.IndicesUnfreezeRequest | TB.IndicesUnfreezeRequest, options?: TransportRequestOptions): Promise @@ -1650,6 +1866,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates index aliases. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/indices-aliases.html Elasticsearch API docs} + */ async updateAliases (this: That, params?: T.IndicesUpdateAliasesRequest | TB.IndicesUpdateAliasesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async updateAliases (this: That, params?: T.IndicesUpdateAliasesRequest | TB.IndicesUpdateAliasesRequest, options?: TransportRequestOptionsWithMeta): Promise> async updateAliases (this: That, params?: T.IndicesUpdateAliasesRequest | TB.IndicesUpdateAliasesRequest, options?: TransportRequestOptions): Promise @@ -1685,6 +1905,10 @@ export default class Indices { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Allows a user to validate a potentially expensive query without executing it. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-validate.html Elasticsearch API docs} + */ async validateQuery (this: That, params?: T.IndicesValidateQueryRequest | TB.IndicesValidateQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async validateQuery (this: That, params?: T.IndicesValidateQueryRequest | TB.IndicesValidateQueryRequest, options?: TransportRequestOptionsWithMeta): Promise> async validateQuery (this: That, params?: T.IndicesValidateQueryRequest | TB.IndicesValidateQueryRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/info.ts b/src/api/api/info.ts index b7d58c650..83478097f 100644 --- a/src/api/api/info.ts +++ b/src/api/api/info.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns basic information about the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/index.html Elasticsearch API docs} + */ export default async function InfoApi (this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function InfoApi (this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function InfoApi (this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/ingest.ts b/src/api/api/ingest.ts index ac7b77cd2..ea0d7dae5 100644 --- a/src/api/api/ingest.ts +++ b/src/api/api/ingest.ts @@ -43,6 +43,10 @@ export default class Ingest { this.transport = transport } + /** + * Deletes a pipeline. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-pipeline-api.html Elasticsearch API docs} + */ async deletePipeline (this: That, params: T.IngestDeletePipelineRequest | TB.IngestDeletePipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deletePipeline (this: That, params: T.IngestDeletePipelineRequest | TB.IngestDeletePipelineRequest, options?: TransportRequestOptionsWithMeta): Promise> async deletePipeline (this: That, params: T.IngestDeletePipelineRequest | TB.IngestDeletePipelineRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Ingest { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns statistical information about geoip databases + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/geoip-stats-api.html Elasticsearch API docs} + */ async geoIpStats (this: That, params?: T.IngestGeoIpStatsRequest | TB.IngestGeoIpStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async geoIpStats (this: That, params?: T.IngestGeoIpStatsRequest | TB.IngestGeoIpStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async geoIpStats (this: That, params?: T.IngestGeoIpStatsRequest | TB.IngestGeoIpStatsRequest, options?: TransportRequestOptions): Promise @@ -88,6 +96,10 @@ export default class Ingest { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns a pipeline. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-pipeline-api.html Elasticsearch API docs} + */ async getPipeline (this: That, params?: T.IngestGetPipelineRequest | TB.IngestGetPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getPipeline (this: That, params?: T.IngestGetPipelineRequest | TB.IngestGetPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise> async getPipeline (this: That, params?: T.IngestGetPipelineRequest | TB.IngestGetPipelineRequest, options?: TransportRequestOptions): Promise @@ -118,6 +130,10 @@ export default class Ingest { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns a list of the built-in patterns. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/grok-processor.html#grok-processor-rest-get Elasticsearch API docs} + */ async processorGrok (this: That, params?: T.IngestProcessorGrokRequest | TB.IngestProcessorGrokRequest, options?: TransportRequestOptionsWithOutMeta): Promise async processorGrok (this: That, params?: T.IngestProcessorGrokRequest | TB.IngestProcessorGrokRequest, options?: TransportRequestOptionsWithMeta): Promise> async processorGrok (this: That, params?: T.IngestProcessorGrokRequest | TB.IngestProcessorGrokRequest, options?: TransportRequestOptions): Promise @@ -141,6 +157,10 @@ export default class Ingest { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates or updates a pipeline. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-pipeline-api.html Elasticsearch API docs} + */ async putPipeline (this: That, params: T.IngestPutPipelineRequest | TB.IngestPutPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putPipeline (this: That, params: T.IngestPutPipelineRequest | TB.IngestPutPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise> async putPipeline (this: That, params: T.IngestPutPipelineRequest | TB.IngestPutPipelineRequest, options?: TransportRequestOptions): Promise @@ -175,6 +195,10 @@ export default class Ingest { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Allows to simulate a pipeline with example documents. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/simulate-pipeline-api.html Elasticsearch API docs} + */ async simulate (this: That, params?: T.IngestSimulateRequest | TB.IngestSimulateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async simulate (this: That, params?: T.IngestSimulateRequest | TB.IngestSimulateRequest, options?: TransportRequestOptionsWithMeta): Promise> async simulate (this: That, params?: T.IngestSimulateRequest | TB.IngestSimulateRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/knn_search.ts b/src/api/api/knn_search.ts index dbe6f9c5f..ac7729167 100644 --- a/src/api/api/knn_search.ts +++ b/src/api/api/knn_search.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Performs a kNN search. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-search.html Elasticsearch API docs} + */ export default async function KnnSearchApi (this: That, params: T.KnnSearchRequest | TB.KnnSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function KnnSearchApi (this: That, params: T.KnnSearchRequest | TB.KnnSearchRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function KnnSearchApi (this: That, params: T.KnnSearchRequest | TB.KnnSearchRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/license.ts b/src/api/api/license.ts index 26c4e59e7..fb257ad1c 100644 --- a/src/api/api/license.ts +++ b/src/api/api/license.ts @@ -43,6 +43,10 @@ export default class License { this.transport = transport } + /** + * Deletes licensing information for the cluster + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-license.html Elasticsearch API docs} + */ async delete (this: That, params?: T.LicenseDeleteRequest | TB.LicenseDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise async delete (this: That, params?: T.LicenseDeleteRequest | TB.LicenseDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise> async delete (this: That, params?: T.LicenseDeleteRequest | TB.LicenseDeleteRequest, options?: TransportRequestOptions): Promise @@ -66,6 +70,10 @@ export default class License { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves licensing information for the cluster + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-license.html Elasticsearch API docs} + */ async get (this: That, params?: T.LicenseGetRequest | TB.LicenseGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise async get (this: That, params?: T.LicenseGetRequest | TB.LicenseGetRequest, options?: TransportRequestOptionsWithMeta): Promise> async get (this: That, params?: T.LicenseGetRequest | TB.LicenseGetRequest, options?: TransportRequestOptions): Promise @@ -89,6 +97,10 @@ export default class License { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information about the status of the basic license. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-basic-status.html Elasticsearch API docs} + */ async getBasicStatus (this: That, params?: T.LicenseGetBasicStatusRequest | TB.LicenseGetBasicStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getBasicStatus (this: That, params?: T.LicenseGetBasicStatusRequest | TB.LicenseGetBasicStatusRequest, options?: TransportRequestOptionsWithMeta): Promise> async getBasicStatus (this: That, params?: T.LicenseGetBasicStatusRequest | TB.LicenseGetBasicStatusRequest, options?: TransportRequestOptions): Promise @@ -112,6 +124,10 @@ export default class License { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information about the status of the trial license. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-trial-status.html Elasticsearch API docs} + */ async getTrialStatus (this: That, params?: T.LicenseGetTrialStatusRequest | TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getTrialStatus (this: That, params?: T.LicenseGetTrialStatusRequest | TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptionsWithMeta): Promise> async getTrialStatus (this: That, params?: T.LicenseGetTrialStatusRequest | TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptions): Promise @@ -135,6 +151,10 @@ export default class License { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates the license for the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/update-license.html Elasticsearch API docs} + */ async post (this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithOutMeta): Promise async post (this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithMeta): Promise> async post (this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise @@ -170,6 +190,10 @@ export default class License { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Starts an indefinite basic license. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/start-basic.html Elasticsearch API docs} + */ async postStartBasic (this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptionsWithOutMeta): Promise async postStartBasic (this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptionsWithMeta): Promise> async postStartBasic (this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptions): Promise @@ -193,6 +217,10 @@ export default class License { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * starts a limited time trial license. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/start-trial.html Elasticsearch API docs} + */ async postStartTrial (this: That, params?: T.LicensePostStartTrialRequest | TB.LicensePostStartTrialRequest, options?: TransportRequestOptionsWithOutMeta): Promise async postStartTrial (this: That, params?: T.LicensePostStartTrialRequest | TB.LicensePostStartTrialRequest, options?: TransportRequestOptionsWithMeta): Promise> async postStartTrial (this: That, params?: T.LicensePostStartTrialRequest | TB.LicensePostStartTrialRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/logstash.ts b/src/api/api/logstash.ts index 0a516c08c..c9d547266 100644 --- a/src/api/api/logstash.ts +++ b/src/api/api/logstash.ts @@ -43,6 +43,10 @@ export default class Logstash { this.transport = transport } + /** + * Deletes Logstash Pipelines used by Central Management + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/logstash-api-delete-pipeline.html Elasticsearch API docs} + */ async deletePipeline (this: That, params: T.LogstashDeletePipelineRequest | TB.LogstashDeletePipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deletePipeline (this: That, params: T.LogstashDeletePipelineRequest | TB.LogstashDeletePipelineRequest, options?: TransportRequestOptionsWithMeta): Promise> async deletePipeline (this: That, params: T.LogstashDeletePipelineRequest | TB.LogstashDeletePipelineRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Logstash { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves Logstash Pipelines used by Central Management + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/logstash-api-get-pipeline.html Elasticsearch API docs} + */ async getPipeline (this: That, params: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getPipeline (this: That, params: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise> async getPipeline (this: That, params: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptions): Promise @@ -94,6 +102,10 @@ export default class Logstash { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Adds and updates Logstash Pipelines used for Central Management + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/logstash-api-put-pipeline.html Elasticsearch API docs} + */ async putPipeline (this: That, params: T.LogstashPutPipelineRequest | TB.LogstashPutPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putPipeline (this: That, params: T.LogstashPutPipelineRequest | TB.LogstashPutPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise> async putPipeline (this: That, params: T.LogstashPutPipelineRequest | TB.LogstashPutPipelineRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/mget.ts b/src/api/api/mget.ts index a0d678656..0b69f08d9 100644 --- a/src/api/api/mget.ts +++ b/src/api/api/mget.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows to get multiple documents in one request. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-multi-get.html Elasticsearch API docs} + */ export default async function MgetApi (this: That, params?: T.MgetRequest | TB.MgetRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function MgetApi (this: That, params?: T.MgetRequest | TB.MgetRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function MgetApi (this: That, params?: T.MgetRequest | TB.MgetRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/migration.ts b/src/api/api/migration.ts index 069ed2d66..ac09d60e4 100644 --- a/src/api/api/migration.ts +++ b/src/api/api/migration.ts @@ -43,6 +43,10 @@ export default class Migration { this.transport = transport } + /** + * Retrieves information about different cluster, node, and index level settings that use deprecated features that will be removed or changed in the next major version. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/migration-api-deprecation.html Elasticsearch API docs} + */ async deprecations (this: That, params?: T.MigrationDeprecationsRequest | TB.MigrationDeprecationsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deprecations (this: That, params?: T.MigrationDeprecationsRequest | TB.MigrationDeprecationsRequest, options?: TransportRequestOptionsWithMeta): Promise> async deprecations (this: That, params?: T.MigrationDeprecationsRequest | TB.MigrationDeprecationsRequest, options?: TransportRequestOptions): Promise @@ -73,6 +77,10 @@ export default class Migration { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Find out whether system features need to be upgraded or not + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/migration-api-feature-upgrade.html Elasticsearch API docs} + */ async getFeatureUpgradeStatus (this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getFeatureUpgradeStatus (this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptionsWithMeta): Promise> async getFeatureUpgradeStatus (this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptions): Promise @@ -96,6 +104,10 @@ export default class Migration { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Begin upgrades for system features + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/migration-api-feature-upgrade.html Elasticsearch API docs} + */ async postFeatureUpgrade (this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptionsWithOutMeta): Promise async postFeatureUpgrade (this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptionsWithMeta): Promise> async postFeatureUpgrade (this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/ml.ts b/src/api/api/ml.ts index 75a62305e..97f0b0ddd 100644 --- a/src/api/api/ml.ts +++ b/src/api/api/ml.ts @@ -43,6 +43,10 @@ export default class Ml { this.transport = transport } + /** + * Clear the cached results from a trained model deployment + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/clear-trained-model-deployment-cache.html Elasticsearch API docs} + */ async clearTrainedModelDeploymentCache (this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearTrainedModelDeploymentCache (this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearTrainedModelDeploymentCache (this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Closes one or more anomaly detection jobs. A job can be opened and closed multiple times throughout its lifecycle. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-close-job.html Elasticsearch API docs} + */ async closeJob (this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async closeJob (this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async closeJob (this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptions): Promise @@ -99,6 +107,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes a calendar. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-delete-calendar.html Elasticsearch API docs} + */ async deleteCalendar (this: That, params: T.MlDeleteCalendarRequest | TB.MlDeleteCalendarRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteCalendar (this: That, params: T.MlDeleteCalendarRequest | TB.MlDeleteCalendarRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteCalendar (this: That, params: T.MlDeleteCalendarRequest | TB.MlDeleteCalendarRequest, options?: TransportRequestOptions): Promise @@ -121,6 +133,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes scheduled events from a calendar. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-delete-calendar-event.html Elasticsearch API docs} + */ async deleteCalendarEvent (this: That, params: T.MlDeleteCalendarEventRequest | TB.MlDeleteCalendarEventRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteCalendarEvent (this: That, params: T.MlDeleteCalendarEventRequest | TB.MlDeleteCalendarEventRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteCalendarEvent (this: That, params: T.MlDeleteCalendarEventRequest | TB.MlDeleteCalendarEventRequest, options?: TransportRequestOptions): Promise @@ -143,6 +159,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes anomaly detection jobs from a calendar. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-delete-calendar-job.html Elasticsearch API docs} + */ async deleteCalendarJob (this: That, params: T.MlDeleteCalendarJobRequest | TB.MlDeleteCalendarJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteCalendarJob (this: That, params: T.MlDeleteCalendarJobRequest | TB.MlDeleteCalendarJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteCalendarJob (this: That, params: T.MlDeleteCalendarJobRequest | TB.MlDeleteCalendarJobRequest, options?: TransportRequestOptions): Promise @@ -165,6 +185,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an existing data frame analytics job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-dfanalytics.html Elasticsearch API docs} + */ async deleteDataFrameAnalytics (this: That, params: T.MlDeleteDataFrameAnalyticsRequest | TB.MlDeleteDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteDataFrameAnalytics (this: That, params: T.MlDeleteDataFrameAnalyticsRequest | TB.MlDeleteDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteDataFrameAnalytics (this: That, params: T.MlDeleteDataFrameAnalyticsRequest | TB.MlDeleteDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise @@ -187,6 +211,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an existing datafeed. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-delete-datafeed.html Elasticsearch API docs} + */ async deleteDatafeed (this: That, params: T.MlDeleteDatafeedRequest | TB.MlDeleteDatafeedRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteDatafeed (this: That, params: T.MlDeleteDatafeedRequest | TB.MlDeleteDatafeedRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteDatafeed (this: That, params: T.MlDeleteDatafeedRequest | TB.MlDeleteDatafeedRequest, options?: TransportRequestOptions): Promise @@ -209,6 +237,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes expired and unused machine learning data. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-delete-expired-data.html Elasticsearch API docs} + */ async deleteExpiredData (this: That, params?: T.MlDeleteExpiredDataRequest | TB.MlDeleteExpiredDataRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteExpiredData (this: That, params?: T.MlDeleteExpiredDataRequest | TB.MlDeleteExpiredDataRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteExpiredData (this: That, params?: T.MlDeleteExpiredDataRequest | TB.MlDeleteExpiredDataRequest, options?: TransportRequestOptions): Promise @@ -251,6 +283,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes a filter. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-delete-filter.html Elasticsearch API docs} + */ async deleteFilter (this: That, params: T.MlDeleteFilterRequest | TB.MlDeleteFilterRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteFilter (this: That, params: T.MlDeleteFilterRequest | TB.MlDeleteFilterRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteFilter (this: That, params: T.MlDeleteFilterRequest | TB.MlDeleteFilterRequest, options?: TransportRequestOptions): Promise @@ -273,6 +309,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes forecasts from a machine learning job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-delete-forecast.html Elasticsearch API docs} + */ async deleteForecast (this: That, params: T.MlDeleteForecastRequest | TB.MlDeleteForecastRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteForecast (this: That, params: T.MlDeleteForecastRequest | TB.MlDeleteForecastRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteForecast (this: That, params: T.MlDeleteForecastRequest | TB.MlDeleteForecastRequest, options?: TransportRequestOptions): Promise @@ -302,6 +342,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an existing anomaly detection job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-delete-job.html Elasticsearch API docs} + */ async deleteJob (this: That, params: T.MlDeleteJobRequest | TB.MlDeleteJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteJob (this: That, params: T.MlDeleteJobRequest | TB.MlDeleteJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteJob (this: That, params: T.MlDeleteJobRequest | TB.MlDeleteJobRequest, options?: TransportRequestOptions): Promise @@ -324,6 +368,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an existing model snapshot. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-delete-snapshot.html Elasticsearch API docs} + */ async deleteModelSnapshot (this: That, params: T.MlDeleteModelSnapshotRequest | TB.MlDeleteModelSnapshotRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteModelSnapshot (this: That, params: T.MlDeleteModelSnapshotRequest | TB.MlDeleteModelSnapshotRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteModelSnapshot (this: That, params: T.MlDeleteModelSnapshotRequest | TB.MlDeleteModelSnapshotRequest, options?: TransportRequestOptions): Promise @@ -346,6 +394,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an existing trained inference model that is currently not referenced by an ingest pipeline. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-trained-models.html Elasticsearch API docs} + */ async deleteTrainedModel (this: That, params: T.MlDeleteTrainedModelRequest | TB.MlDeleteTrainedModelRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteTrainedModel (this: That, params: T.MlDeleteTrainedModelRequest | TB.MlDeleteTrainedModelRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteTrainedModel (this: That, params: T.MlDeleteTrainedModelRequest | TB.MlDeleteTrainedModelRequest, options?: TransportRequestOptions): Promise @@ -368,6 +420,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes a model alias that refers to the trained model + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-trained-models-aliases.html Elasticsearch API docs} + */ async deleteTrainedModelAlias (this: That, params: T.MlDeleteTrainedModelAliasRequest | TB.MlDeleteTrainedModelAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteTrainedModelAlias (this: That, params: T.MlDeleteTrainedModelAliasRequest | TB.MlDeleteTrainedModelAliasRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteTrainedModelAlias (this: That, params: T.MlDeleteTrainedModelAliasRequest | TB.MlDeleteTrainedModelAliasRequest, options?: TransportRequestOptions): Promise @@ -390,6 +446,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Estimates the model memory + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-apis.html Elasticsearch API docs} + */ async estimateModelMemory (this: That, params?: T.MlEstimateModelMemoryRequest | TB.MlEstimateModelMemoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async estimateModelMemory (this: That, params?: T.MlEstimateModelMemoryRequest | TB.MlEstimateModelMemoryRequest, options?: TransportRequestOptionsWithMeta): Promise> async estimateModelMemory (this: That, params?: T.MlEstimateModelMemoryRequest | TB.MlEstimateModelMemoryRequest, options?: TransportRequestOptions): Promise @@ -425,6 +485,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Evaluates the data frame analytics for an annotated index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/evaluate-dfanalytics.html Elasticsearch API docs} + */ async evaluateDataFrame (this: That, params: T.MlEvaluateDataFrameRequest | TB.MlEvaluateDataFrameRequest, options?: TransportRequestOptionsWithOutMeta): Promise async evaluateDataFrame (this: That, params: T.MlEvaluateDataFrameRequest | TB.MlEvaluateDataFrameRequest, options?: TransportRequestOptionsWithMeta): Promise> async evaluateDataFrame (this: That, params: T.MlEvaluateDataFrameRequest | TB.MlEvaluateDataFrameRequest, options?: TransportRequestOptions): Promise @@ -459,6 +523,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Explains a data frame analytics config. + * @see {@link http://www.elastic.co/guide/en/elasticsearch/reference/main/explain-dfanalytics.html Elasticsearch API docs} + */ async explainDataFrameAnalytics (this: That, params?: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async explainDataFrameAnalytics (this: That, params?: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> async explainDataFrameAnalytics (this: That, params?: T.MlExplainDataFrameAnalyticsRequest | TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise @@ -501,6 +569,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Forces any buffered data to be processed by the job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-flush-job.html Elasticsearch API docs} + */ async flushJob (this: That, params: T.MlFlushJobRequest | TB.MlFlushJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async flushJob (this: That, params: T.MlFlushJobRequest | TB.MlFlushJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async flushJob (this: That, params: T.MlFlushJobRequest | TB.MlFlushJobRequest, options?: TransportRequestOptions): Promise @@ -535,6 +607,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Predicts the future behavior of a time series by using its historical behavior. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-forecast.html Elasticsearch API docs} + */ async forecast (this: That, params: T.MlForecastRequest | TB.MlForecastRequest, options?: TransportRequestOptionsWithOutMeta): Promise async forecast (this: That, params: T.MlForecastRequest | TB.MlForecastRequest, options?: TransportRequestOptionsWithMeta): Promise> async forecast (this: That, params: T.MlForecastRequest | TB.MlForecastRequest, options?: TransportRequestOptions): Promise @@ -569,6 +645,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves anomaly detection job results for one or more buckets. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-bucket.html Elasticsearch API docs} + */ async getBuckets (this: That, params: T.MlGetBucketsRequest | TB.MlGetBucketsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getBuckets (this: That, params: T.MlGetBucketsRequest | TB.MlGetBucketsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getBuckets (this: That, params: T.MlGetBucketsRequest | TB.MlGetBucketsRequest, options?: TransportRequestOptions): Promise @@ -610,6 +690,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information about the scheduled events in calendars. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-calendar-event.html Elasticsearch API docs} + */ async getCalendarEvents (this: That, params: T.MlGetCalendarEventsRequest | TB.MlGetCalendarEventsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getCalendarEvents (this: That, params: T.MlGetCalendarEventsRequest | TB.MlGetCalendarEventsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getCalendarEvents (this: That, params: T.MlGetCalendarEventsRequest | TB.MlGetCalendarEventsRequest, options?: TransportRequestOptions): Promise @@ -632,6 +716,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves configuration information for calendars. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-calendar.html Elasticsearch API docs} + */ async getCalendars (this: That, params?: T.MlGetCalendarsRequest | TB.MlGetCalendarsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getCalendars (this: That, params?: T.MlGetCalendarsRequest | TB.MlGetCalendarsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getCalendars (this: That, params?: T.MlGetCalendarsRequest | TB.MlGetCalendarsRequest, options?: TransportRequestOptions): Promise @@ -674,6 +762,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves anomaly detection job results for one or more categories. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-category.html Elasticsearch API docs} + */ async getCategories (this: That, params: T.MlGetCategoriesRequest | TB.MlGetCategoriesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getCategories (this: That, params: T.MlGetCategoriesRequest | TB.MlGetCategoriesRequest, options?: TransportRequestOptionsWithMeta): Promise> async getCategories (this: That, params: T.MlGetCategoriesRequest | TB.MlGetCategoriesRequest, options?: TransportRequestOptions): Promise @@ -715,6 +807,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves configuration information for data frame analytics jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-dfanalytics.html Elasticsearch API docs} + */ async getDataFrameAnalytics (this: That, params?: T.MlGetDataFrameAnalyticsRequest | TB.MlGetDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getDataFrameAnalytics (this: That, params?: T.MlGetDataFrameAnalyticsRequest | TB.MlGetDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getDataFrameAnalytics (this: That, params?: T.MlGetDataFrameAnalyticsRequest | TB.MlGetDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise @@ -745,6 +841,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves usage information for data frame analytics jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-dfanalytics-stats.html Elasticsearch API docs} + */ async getDataFrameAnalyticsStats (this: That, params?: T.MlGetDataFrameAnalyticsStatsRequest | TB.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getDataFrameAnalyticsStats (this: That, params?: T.MlGetDataFrameAnalyticsStatsRequest | TB.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getDataFrameAnalyticsStats (this: That, params?: T.MlGetDataFrameAnalyticsStatsRequest | TB.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptions): Promise @@ -775,6 +875,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves usage information for datafeeds. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-datafeed-stats.html Elasticsearch API docs} + */ async getDatafeedStats (this: That, params?: T.MlGetDatafeedStatsRequest | TB.MlGetDatafeedStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getDatafeedStats (this: That, params?: T.MlGetDatafeedStatsRequest | TB.MlGetDatafeedStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getDatafeedStats (this: That, params?: T.MlGetDatafeedStatsRequest | TB.MlGetDatafeedStatsRequest, options?: TransportRequestOptions): Promise @@ -805,6 +909,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves configuration information for datafeeds. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-datafeed.html Elasticsearch API docs} + */ async getDatafeeds (this: That, params?: T.MlGetDatafeedsRequest | TB.MlGetDatafeedsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getDatafeeds (this: That, params?: T.MlGetDatafeedsRequest | TB.MlGetDatafeedsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getDatafeeds (this: That, params?: T.MlGetDatafeedsRequest | TB.MlGetDatafeedsRequest, options?: TransportRequestOptions): Promise @@ -835,6 +943,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves filters. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-filter.html Elasticsearch API docs} + */ async getFilters (this: That, params?: T.MlGetFiltersRequest | TB.MlGetFiltersRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getFilters (this: That, params?: T.MlGetFiltersRequest | TB.MlGetFiltersRequest, options?: TransportRequestOptionsWithMeta): Promise> async getFilters (this: That, params?: T.MlGetFiltersRequest | TB.MlGetFiltersRequest, options?: TransportRequestOptions): Promise @@ -865,6 +977,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves anomaly detection job results for one or more influencers. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-influencer.html Elasticsearch API docs} + */ async getInfluencers (this: That, params: T.MlGetInfluencersRequest | TB.MlGetInfluencersRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getInfluencers (this: That, params: T.MlGetInfluencersRequest | TB.MlGetInfluencersRequest, options?: TransportRequestOptionsWithMeta): Promise> async getInfluencers (this: That, params: T.MlGetInfluencersRequest | TB.MlGetInfluencersRequest, options?: TransportRequestOptions): Promise @@ -899,6 +1015,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves usage information for anomaly detection jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-job-stats.html Elasticsearch API docs} + */ async getJobStats (this: That, params?: T.MlGetJobStatsRequest | TB.MlGetJobStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getJobStats (this: That, params?: T.MlGetJobStatsRequest | TB.MlGetJobStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getJobStats (this: That, params?: T.MlGetJobStatsRequest | TB.MlGetJobStatsRequest, options?: TransportRequestOptions): Promise @@ -929,6 +1049,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves configuration information for anomaly detection jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-job.html Elasticsearch API docs} + */ async getJobs (this: That, params?: T.MlGetJobsRequest | TB.MlGetJobsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getJobs (this: That, params?: T.MlGetJobsRequest | TB.MlGetJobsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getJobs (this: That, params?: T.MlGetJobsRequest | TB.MlGetJobsRequest, options?: TransportRequestOptions): Promise @@ -959,6 +1083,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information on how ML is using memory. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-ml-memory.html Elasticsearch API docs} + */ async getMemoryStats (this: That, params?: T.MlGetMemoryStatsRequest | TB.MlGetMemoryStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getMemoryStats (this: That, params?: T.MlGetMemoryStatsRequest | TB.MlGetMemoryStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getMemoryStats (this: That, params?: T.MlGetMemoryStatsRequest | TB.MlGetMemoryStatsRequest, options?: TransportRequestOptions): Promise @@ -989,6 +1117,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Gets stats for anomaly detection job model snapshot upgrades that are in progress. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-job-model-snapshot-upgrade-stats.html Elasticsearch API docs} + */ async getModelSnapshotUpgradeStats (this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getModelSnapshotUpgradeStats (this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getModelSnapshotUpgradeStats (this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptions): Promise @@ -1011,6 +1143,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information about model snapshots. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-snapshot.html Elasticsearch API docs} + */ async getModelSnapshots (this: That, params: T.MlGetModelSnapshotsRequest | TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getModelSnapshots (this: That, params: T.MlGetModelSnapshotsRequest | TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getModelSnapshots (this: That, params: T.MlGetModelSnapshotsRequest | TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptions): Promise @@ -1052,6 +1188,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves overall bucket results that summarize the bucket results of multiple anomaly detection jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-overall-buckets.html Elasticsearch API docs} + */ async getOverallBuckets (this: That, params: T.MlGetOverallBucketsRequest | TB.MlGetOverallBucketsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getOverallBuckets (this: That, params: T.MlGetOverallBucketsRequest | TB.MlGetOverallBucketsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getOverallBuckets (this: That, params: T.MlGetOverallBucketsRequest | TB.MlGetOverallBucketsRequest, options?: TransportRequestOptions): Promise @@ -1086,6 +1226,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves anomaly records for an anomaly detection job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-get-record.html Elasticsearch API docs} + */ async getRecords (this: That, params: T.MlGetRecordsRequest | TB.MlGetRecordsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getRecords (this: That, params: T.MlGetRecordsRequest | TB.MlGetRecordsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getRecords (this: That, params: T.MlGetRecordsRequest | TB.MlGetRecordsRequest, options?: TransportRequestOptions): Promise @@ -1120,6 +1264,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves configuration information for a trained inference model. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-trained-models.html Elasticsearch API docs} + */ async getTrainedModels (this: That, params?: T.MlGetTrainedModelsRequest | TB.MlGetTrainedModelsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getTrainedModels (this: That, params?: T.MlGetTrainedModelsRequest | TB.MlGetTrainedModelsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getTrainedModels (this: That, params?: T.MlGetTrainedModelsRequest | TB.MlGetTrainedModelsRequest, options?: TransportRequestOptions): Promise @@ -1150,6 +1298,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves usage information for trained inference models. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-trained-models-stats.html Elasticsearch API docs} + */ async getTrainedModelsStats (this: That, params?: T.MlGetTrainedModelsStatsRequest | TB.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getTrainedModelsStats (this: That, params?: T.MlGetTrainedModelsStatsRequest | TB.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getTrainedModelsStats (this: That, params?: T.MlGetTrainedModelsStatsRequest | TB.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptions): Promise @@ -1180,6 +1332,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Evaluate a trained model. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/infer-trained-model.html Elasticsearch API docs} + */ async inferTrainedModel (this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptionsWithOutMeta): Promise async inferTrainedModel (this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptionsWithMeta): Promise> async inferTrainedModel (this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptions): Promise @@ -1214,6 +1370,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns defaults and limits used by machine learning. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-ml-info.html Elasticsearch API docs} + */ async info (this: That, params?: T.MlInfoRequest | TB.MlInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise async info (this: That, params?: T.MlInfoRequest | TB.MlInfoRequest, options?: TransportRequestOptionsWithMeta): Promise> async info (this: That, params?: T.MlInfoRequest | TB.MlInfoRequest, options?: TransportRequestOptions): Promise @@ -1237,6 +1397,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Opens one or more anomaly detection jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-open-job.html Elasticsearch API docs} + */ async openJob (this: That, params: T.MlOpenJobRequest | TB.MlOpenJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async openJob (this: That, params: T.MlOpenJobRequest | TB.MlOpenJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async openJob (this: That, params: T.MlOpenJobRequest | TB.MlOpenJobRequest, options?: TransportRequestOptions): Promise @@ -1271,6 +1435,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Posts scheduled events in a calendar. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-post-calendar-event.html Elasticsearch API docs} + */ async postCalendarEvents (this: That, params: T.MlPostCalendarEventsRequest | TB.MlPostCalendarEventsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async postCalendarEvents (this: That, params: T.MlPostCalendarEventsRequest | TB.MlPostCalendarEventsRequest, options?: TransportRequestOptionsWithMeta): Promise> async postCalendarEvents (this: That, params: T.MlPostCalendarEventsRequest | TB.MlPostCalendarEventsRequest, options?: TransportRequestOptions): Promise @@ -1305,6 +1473,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Sends data to an anomaly detection job for analysis. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-post-data.html Elasticsearch API docs} + */ async postData (this: That, params: T.MlPostDataRequest | TB.MlPostDataRequest, options?: TransportRequestOptionsWithOutMeta): Promise async postData (this: That, params: T.MlPostDataRequest | TB.MlPostDataRequest, options?: TransportRequestOptionsWithMeta): Promise> async postData (this: That, params: T.MlPostDataRequest | TB.MlPostDataRequest, options?: TransportRequestOptions): Promise @@ -1332,6 +1504,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, bulkBody: body }, options) } + /** + * Previews that will be analyzed given a data frame analytics config. + * @see {@link http://www.elastic.co/guide/en/elasticsearch/reference/main/preview-dfanalytics.html Elasticsearch API docs} + */ async previewDataFrameAnalytics (this: That, params?: T.MlPreviewDataFrameAnalyticsRequest | TB.MlPreviewDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async previewDataFrameAnalytics (this: That, params?: T.MlPreviewDataFrameAnalyticsRequest | TB.MlPreviewDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> async previewDataFrameAnalytics (this: That, params?: T.MlPreviewDataFrameAnalyticsRequest | TB.MlPreviewDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise @@ -1374,6 +1550,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Previews a datafeed. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-preview-datafeed.html Elasticsearch API docs} + */ async previewDatafeed (this: That, params?: T.MlPreviewDatafeedRequest | TB.MlPreviewDatafeedRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async previewDatafeed (this: That, params?: T.MlPreviewDatafeedRequest | TB.MlPreviewDatafeedRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async previewDatafeed (this: That, params?: T.MlPreviewDatafeedRequest | TB.MlPreviewDatafeedRequest, options?: TransportRequestOptions): Promise> @@ -1416,6 +1596,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Instantiates a calendar. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-put-calendar.html Elasticsearch API docs} + */ async putCalendar (this: That, params: T.MlPutCalendarRequest | TB.MlPutCalendarRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putCalendar (this: That, params: T.MlPutCalendarRequest | TB.MlPutCalendarRequest, options?: TransportRequestOptionsWithMeta): Promise> async putCalendar (this: That, params: T.MlPutCalendarRequest | TB.MlPutCalendarRequest, options?: TransportRequestOptions): Promise @@ -1450,6 +1634,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Adds an anomaly detection job to a calendar. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-put-calendar-job.html Elasticsearch API docs} + */ async putCalendarJob (this: That, params: T.MlPutCalendarJobRequest | TB.MlPutCalendarJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putCalendarJob (this: That, params: T.MlPutCalendarJobRequest | TB.MlPutCalendarJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async putCalendarJob (this: That, params: T.MlPutCalendarJobRequest | TB.MlPutCalendarJobRequest, options?: TransportRequestOptions): Promise @@ -1472,6 +1660,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Instantiates a data frame analytics job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-dfanalytics.html Elasticsearch API docs} + */ async putDataFrameAnalytics (this: That, params: T.MlPutDataFrameAnalyticsRequest | TB.MlPutDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putDataFrameAnalytics (this: That, params: T.MlPutDataFrameAnalyticsRequest | TB.MlPutDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> async putDataFrameAnalytics (this: That, params: T.MlPutDataFrameAnalyticsRequest | TB.MlPutDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise @@ -1506,6 +1698,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Instantiates a datafeed. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-put-datafeed.html Elasticsearch API docs} + */ async putDatafeed (this: That, params: T.MlPutDatafeedRequest | TB.MlPutDatafeedRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putDatafeed (this: That, params: T.MlPutDatafeedRequest | TB.MlPutDatafeedRequest, options?: TransportRequestOptionsWithMeta): Promise> async putDatafeed (this: That, params: T.MlPutDatafeedRequest | TB.MlPutDatafeedRequest, options?: TransportRequestOptions): Promise @@ -1540,6 +1736,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Instantiates a filter. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-put-filter.html Elasticsearch API docs} + */ async putFilter (this: That, params: T.MlPutFilterRequest | TB.MlPutFilterRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putFilter (this: That, params: T.MlPutFilterRequest | TB.MlPutFilterRequest, options?: TransportRequestOptionsWithMeta): Promise> async putFilter (this: That, params: T.MlPutFilterRequest | TB.MlPutFilterRequest, options?: TransportRequestOptions): Promise @@ -1574,6 +1774,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Instantiates an anomaly detection job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-put-job.html Elasticsearch API docs} + */ async putJob (this: That, params: T.MlPutJobRequest | TB.MlPutJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putJob (this: That, params: T.MlPutJobRequest | TB.MlPutJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async putJob (this: That, params: T.MlPutJobRequest | TB.MlPutJobRequest, options?: TransportRequestOptions): Promise @@ -1608,6 +1812,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates an inference trained model. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-trained-models.html Elasticsearch API docs} + */ async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptionsWithMeta): Promise> async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptions): Promise @@ -1642,6 +1850,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a new model alias (or reassigns an existing one) to refer to the trained model + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-trained-models-aliases.html Elasticsearch API docs} + */ async putTrainedModelAlias (this: That, params: T.MlPutTrainedModelAliasRequest | TB.MlPutTrainedModelAliasRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putTrainedModelAlias (this: That, params: T.MlPutTrainedModelAliasRequest | TB.MlPutTrainedModelAliasRequest, options?: TransportRequestOptionsWithMeta): Promise> async putTrainedModelAlias (this: That, params: T.MlPutTrainedModelAliasRequest | TB.MlPutTrainedModelAliasRequest, options?: TransportRequestOptions): Promise @@ -1664,6 +1876,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates part of a trained model definition + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-trained-model-definition-part.html Elasticsearch API docs} + */ async putTrainedModelDefinitionPart (this: That, params: T.MlPutTrainedModelDefinitionPartRequest | TB.MlPutTrainedModelDefinitionPartRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putTrainedModelDefinitionPart (this: That, params: T.MlPutTrainedModelDefinitionPartRequest | TB.MlPutTrainedModelDefinitionPartRequest, options?: TransportRequestOptionsWithMeta): Promise> async putTrainedModelDefinitionPart (this: That, params: T.MlPutTrainedModelDefinitionPartRequest | TB.MlPutTrainedModelDefinitionPartRequest, options?: TransportRequestOptions): Promise @@ -1698,6 +1914,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a trained model vocabulary + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-trained-model-vocabulary.html Elasticsearch API docs} + */ async putTrainedModelVocabulary (this: That, params: T.MlPutTrainedModelVocabularyRequest | TB.MlPutTrainedModelVocabularyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putTrainedModelVocabulary (this: That, params: T.MlPutTrainedModelVocabularyRequest | TB.MlPutTrainedModelVocabularyRequest, options?: TransportRequestOptionsWithMeta): Promise> async putTrainedModelVocabulary (this: That, params: T.MlPutTrainedModelVocabularyRequest | TB.MlPutTrainedModelVocabularyRequest, options?: TransportRequestOptions): Promise @@ -1732,6 +1952,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Resets an existing anomaly detection job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-reset-job.html Elasticsearch API docs} + */ async resetJob (this: That, params: T.MlResetJobRequest | TB.MlResetJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async resetJob (this: That, params: T.MlResetJobRequest | TB.MlResetJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async resetJob (this: That, params: T.MlResetJobRequest | TB.MlResetJobRequest, options?: TransportRequestOptions): Promise @@ -1754,6 +1978,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Reverts to a specific snapshot. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-revert-snapshot.html Elasticsearch API docs} + */ async revertModelSnapshot (this: That, params: T.MlRevertModelSnapshotRequest | TB.MlRevertModelSnapshotRequest, options?: TransportRequestOptionsWithOutMeta): Promise async revertModelSnapshot (this: That, params: T.MlRevertModelSnapshotRequest | TB.MlRevertModelSnapshotRequest, options?: TransportRequestOptionsWithMeta): Promise> async revertModelSnapshot (this: That, params: T.MlRevertModelSnapshotRequest | TB.MlRevertModelSnapshotRequest, options?: TransportRequestOptions): Promise @@ -1788,6 +2016,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Sets a cluster wide upgrade_mode setting that prepares machine learning indices for an upgrade. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-set-upgrade-mode.html Elasticsearch API docs} + */ async setUpgradeMode (this: That, params?: T.MlSetUpgradeModeRequest | TB.MlSetUpgradeModeRequest, options?: TransportRequestOptionsWithOutMeta): Promise async setUpgradeMode (this: That, params?: T.MlSetUpgradeModeRequest | TB.MlSetUpgradeModeRequest, options?: TransportRequestOptionsWithMeta): Promise> async setUpgradeMode (this: That, params?: T.MlSetUpgradeModeRequest | TB.MlSetUpgradeModeRequest, options?: TransportRequestOptions): Promise @@ -1811,6 +2043,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Starts a data frame analytics job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/start-dfanalytics.html Elasticsearch API docs} + */ async startDataFrameAnalytics (this: That, params: T.MlStartDataFrameAnalyticsRequest | TB.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async startDataFrameAnalytics (this: That, params: T.MlStartDataFrameAnalyticsRequest | TB.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> async startDataFrameAnalytics (this: That, params: T.MlStartDataFrameAnalyticsRequest | TB.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise @@ -1833,6 +2069,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Starts one or more datafeeds. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-start-datafeed.html Elasticsearch API docs} + */ async startDatafeed (this: That, params: T.MlStartDatafeedRequest | TB.MlStartDatafeedRequest, options?: TransportRequestOptionsWithOutMeta): Promise async startDatafeed (this: That, params: T.MlStartDatafeedRequest | TB.MlStartDatafeedRequest, options?: TransportRequestOptionsWithMeta): Promise> async startDatafeed (this: That, params: T.MlStartDatafeedRequest | TB.MlStartDatafeedRequest, options?: TransportRequestOptions): Promise @@ -1867,6 +2107,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Start a trained model deployment. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/start-trained-model-deployment.html Elasticsearch API docs} + */ async startTrainedModelDeployment (this: That, params: T.MlStartTrainedModelDeploymentRequest | TB.MlStartTrainedModelDeploymentRequest, options?: TransportRequestOptionsWithOutMeta): Promise async startTrainedModelDeployment (this: That, params: T.MlStartTrainedModelDeploymentRequest | TB.MlStartTrainedModelDeploymentRequest, options?: TransportRequestOptionsWithMeta): Promise> async startTrainedModelDeployment (this: That, params: T.MlStartTrainedModelDeploymentRequest | TB.MlStartTrainedModelDeploymentRequest, options?: TransportRequestOptions): Promise @@ -1889,6 +2133,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Stops one or more data frame analytics jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/stop-dfanalytics.html Elasticsearch API docs} + */ async stopDataFrameAnalytics (this: That, params: T.MlStopDataFrameAnalyticsRequest | TB.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stopDataFrameAnalytics (this: That, params: T.MlStopDataFrameAnalyticsRequest | TB.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> async stopDataFrameAnalytics (this: That, params: T.MlStopDataFrameAnalyticsRequest | TB.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise @@ -1911,6 +2159,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Stops one or more datafeeds. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-stop-datafeed.html Elasticsearch API docs} + */ async stopDatafeed (this: That, params: T.MlStopDatafeedRequest | TB.MlStopDatafeedRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stopDatafeed (this: That, params: T.MlStopDatafeedRequest | TB.MlStopDatafeedRequest, options?: TransportRequestOptionsWithMeta): Promise> async stopDatafeed (this: That, params: T.MlStopDatafeedRequest | TB.MlStopDatafeedRequest, options?: TransportRequestOptions): Promise @@ -1945,6 +2197,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Stop a trained model deployment. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/stop-trained-model-deployment.html Elasticsearch API docs} + */ async stopTrainedModelDeployment (this: That, params: T.MlStopTrainedModelDeploymentRequest | TB.MlStopTrainedModelDeploymentRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stopTrainedModelDeployment (this: That, params: T.MlStopTrainedModelDeploymentRequest | TB.MlStopTrainedModelDeploymentRequest, options?: TransportRequestOptionsWithMeta): Promise> async stopTrainedModelDeployment (this: That, params: T.MlStopTrainedModelDeploymentRequest | TB.MlStopTrainedModelDeploymentRequest, options?: TransportRequestOptions): Promise @@ -1967,6 +2223,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates certain properties of a data frame analytics job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/update-dfanalytics.html Elasticsearch API docs} + */ async updateDataFrameAnalytics (this: That, params: T.MlUpdateDataFrameAnalyticsRequest | TB.MlUpdateDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async updateDataFrameAnalytics (this: That, params: T.MlUpdateDataFrameAnalyticsRequest | TB.MlUpdateDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> async updateDataFrameAnalytics (this: That, params: T.MlUpdateDataFrameAnalyticsRequest | TB.MlUpdateDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise @@ -2001,6 +2261,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates certain properties of a datafeed. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-update-datafeed.html Elasticsearch API docs} + */ async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptionsWithOutMeta): Promise async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptionsWithMeta): Promise> async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptions): Promise @@ -2035,6 +2299,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates the description of a filter, adds items, or removes items. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-update-filter.html Elasticsearch API docs} + */ async updateFilter (this: That, params: T.MlUpdateFilterRequest | TB.MlUpdateFilterRequest, options?: TransportRequestOptionsWithOutMeta): Promise async updateFilter (this: That, params: T.MlUpdateFilterRequest | TB.MlUpdateFilterRequest, options?: TransportRequestOptionsWithMeta): Promise> async updateFilter (this: That, params: T.MlUpdateFilterRequest | TB.MlUpdateFilterRequest, options?: TransportRequestOptions): Promise @@ -2069,6 +2337,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates certain properties of an anomaly detection job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-update-job.html Elasticsearch API docs} + */ async updateJob (this: That, params: T.MlUpdateJobRequest | TB.MlUpdateJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async updateJob (this: That, params: T.MlUpdateJobRequest | TB.MlUpdateJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async updateJob (this: That, params: T.MlUpdateJobRequest | TB.MlUpdateJobRequest, options?: TransportRequestOptions): Promise @@ -2103,6 +2375,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates certain properties of a snapshot. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-update-snapshot.html Elasticsearch API docs} + */ async updateModelSnapshot (this: That, params: T.MlUpdateModelSnapshotRequest | TB.MlUpdateModelSnapshotRequest, options?: TransportRequestOptionsWithOutMeta): Promise async updateModelSnapshot (this: That, params: T.MlUpdateModelSnapshotRequest | TB.MlUpdateModelSnapshotRequest, options?: TransportRequestOptionsWithMeta): Promise> async updateModelSnapshot (this: That, params: T.MlUpdateModelSnapshotRequest | TB.MlUpdateModelSnapshotRequest, options?: TransportRequestOptions): Promise @@ -2137,6 +2413,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates certain properties of trained model deployment. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/update-trained-model-deployment.html Elasticsearch API docs} + */ async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise @@ -2159,6 +2439,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Upgrades a given job snapshot to the current major version. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/ml-upgrade-job-model-snapshot.html Elasticsearch API docs} + */ async upgradeJobSnapshot (this: That, params: T.MlUpgradeJobSnapshotRequest | TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptionsWithOutMeta): Promise async upgradeJobSnapshot (this: That, params: T.MlUpgradeJobSnapshotRequest | TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptionsWithMeta): Promise> async upgradeJobSnapshot (this: That, params: T.MlUpgradeJobSnapshotRequest | TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptions): Promise @@ -2181,6 +2465,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Validates an anomaly detection job. + * @see {@link https://www.elastic.co/guide/en/machine-learning/main/ml-jobs.html Elasticsearch API docs} + */ async validate (this: That, params?: T.MlValidateRequest | TB.MlValidateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async validate (this: That, params?: T.MlValidateRequest | TB.MlValidateRequest, options?: TransportRequestOptionsWithMeta): Promise> async validate (this: That, params?: T.MlValidateRequest | TB.MlValidateRequest, options?: TransportRequestOptions): Promise @@ -2216,6 +2504,10 @@ export default class Ml { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Validates an anomaly detection detector. + * @see {@link https://www.elastic.co/guide/en/machine-learning/main/ml-jobs.html Elasticsearch API docs} + */ async validateDetector (this: That, params: T.MlValidateDetectorRequest | TB.MlValidateDetectorRequest, options?: TransportRequestOptionsWithOutMeta): Promise async validateDetector (this: That, params: T.MlValidateDetectorRequest | TB.MlValidateDetectorRequest, options?: TransportRequestOptionsWithMeta): Promise> async validateDetector (this: That, params: T.MlValidateDetectorRequest | TB.MlValidateDetectorRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/monitoring.ts b/src/api/api/monitoring.ts index 8cf13c461..6ca1c152c 100644 --- a/src/api/api/monitoring.ts +++ b/src/api/api/monitoring.ts @@ -43,6 +43,10 @@ export default class Monitoring { this.transport = transport } + /** + * Used by the monitoring features to send monitoring data. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/monitor-elasticsearch-cluster.html Elasticsearch API docs} + */ async bulk (this: That, params: T.MonitoringBulkRequest | TB.MonitoringBulkRequest, options?: TransportRequestOptionsWithOutMeta): Promise async bulk (this: That, params: T.MonitoringBulkRequest | TB.MonitoringBulkRequest, options?: TransportRequestOptionsWithMeta): Promise> async bulk (this: That, params: T.MonitoringBulkRequest | TB.MonitoringBulkRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/msearch.ts b/src/api/api/msearch.ts index 523885cd3..5580751d1 100644 --- a/src/api/api/msearch.ts +++ b/src/api/api/msearch.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows to execute several search operations in one request. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-multi-search.html Elasticsearch API docs} + */ export default async function MsearchApi> (this: That, params: T.MsearchRequest | TB.MsearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function MsearchApi> (this: That, params: T.MsearchRequest | TB.MsearchRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function MsearchApi> (this: That, params: T.MsearchRequest | TB.MsearchRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/msearch_template.ts b/src/api/api/msearch_template.ts index ea9f3dfd7..000477486 100644 --- a/src/api/api/msearch_template.ts +++ b/src/api/api/msearch_template.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows to execute several search template operations in one request. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-multi-search.html Elasticsearch API docs} + */ export default async function MsearchTemplateApi> (this: That, params: T.MsearchTemplateRequest | TB.MsearchTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function MsearchTemplateApi> (this: That, params: T.MsearchTemplateRequest | TB.MsearchTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function MsearchTemplateApi> (this: That, params: T.MsearchTemplateRequest | TB.MsearchTemplateRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/mtermvectors.ts b/src/api/api/mtermvectors.ts index c3dcf2e07..6f5a1d197 100644 --- a/src/api/api/mtermvectors.ts +++ b/src/api/api/mtermvectors.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns multiple termvectors in one request. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-multi-termvectors.html Elasticsearch API docs} + */ export default async function MtermvectorsApi (this: That, params?: T.MtermvectorsRequest | TB.MtermvectorsRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function MtermvectorsApi (this: That, params?: T.MtermvectorsRequest | TB.MtermvectorsRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function MtermvectorsApi (this: That, params?: T.MtermvectorsRequest | TB.MtermvectorsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/nodes.ts b/src/api/api/nodes.ts index 6dadf200b..97e10edbf 100644 --- a/src/api/api/nodes.ts +++ b/src/api/api/nodes.ts @@ -43,6 +43,10 @@ export default class Nodes { this.transport = transport } + /** + * Removes the archived repositories metering information present in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/clear-repositories-metering-archive-api.html Elasticsearch API docs} + */ async clearRepositoriesMeteringArchive (this: That, params: T.NodesClearRepositoriesMeteringArchiveRequest | TB.NodesClearRepositoriesMeteringArchiveRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearRepositoriesMeteringArchive (this: That, params: T.NodesClearRepositoriesMeteringArchiveRequest | TB.NodesClearRepositoriesMeteringArchiveRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearRepositoriesMeteringArchive (this: That, params: T.NodesClearRepositoriesMeteringArchiveRequest | TB.NodesClearRepositoriesMeteringArchiveRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Nodes { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns cluster repositories metering information. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-repositories-metering-api.html Elasticsearch API docs} + */ async getRepositoriesMeteringInfo (this: That, params: T.NodesGetRepositoriesMeteringInfoRequest | TB.NodesGetRepositoriesMeteringInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getRepositoriesMeteringInfo (this: That, params: T.NodesGetRepositoriesMeteringInfoRequest | TB.NodesGetRepositoriesMeteringInfoRequest, options?: TransportRequestOptionsWithMeta): Promise> async getRepositoriesMeteringInfo (this: That, params: T.NodesGetRepositoriesMeteringInfoRequest | TB.NodesGetRepositoriesMeteringInfoRequest, options?: TransportRequestOptions): Promise @@ -87,6 +95,10 @@ export default class Nodes { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about hot threads on each node in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-nodes-hot-threads.html Elasticsearch API docs} + */ async hotThreads (this: That, params?: T.NodesHotThreadsRequest | TB.NodesHotThreadsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async hotThreads (this: That, params?: T.NodesHotThreadsRequest | TB.NodesHotThreadsRequest, options?: TransportRequestOptionsWithMeta): Promise> async hotThreads (this: That, params?: T.NodesHotThreadsRequest | TB.NodesHotThreadsRequest, options?: TransportRequestOptions): Promise @@ -117,6 +129,10 @@ export default class Nodes { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about nodes in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-nodes-info.html Elasticsearch API docs} + */ async info (this: That, params?: T.NodesInfoRequest | TB.NodesInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise async info (this: That, params?: T.NodesInfoRequest | TB.NodesInfoRequest, options?: TransportRequestOptionsWithMeta): Promise> async info (this: That, params?: T.NodesInfoRequest | TB.NodesInfoRequest, options?: TransportRequestOptions): Promise @@ -153,6 +169,10 @@ export default class Nodes { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Reloads secure settings. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/secure-settings.html#reloadable-secure-settings Elasticsearch API docs} + */ async reloadSecureSettings (this: That, params?: T.NodesReloadSecureSettingsRequest | TB.NodesReloadSecureSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async reloadSecureSettings (this: That, params?: T.NodesReloadSecureSettingsRequest | TB.NodesReloadSecureSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise> async reloadSecureSettings (this: That, params?: T.NodesReloadSecureSettingsRequest | TB.NodesReloadSecureSettingsRequest, options?: TransportRequestOptions): Promise @@ -195,6 +215,10 @@ export default class Nodes { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns statistical information about nodes in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-nodes-stats.html Elasticsearch API docs} + */ async stats (this: That, params?: T.NodesStatsRequest | TB.NodesStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stats (this: That, params?: T.NodesStatsRequest | TB.NodesStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async stats (this: That, params?: T.NodesStatsRequest | TB.NodesStatsRequest, options?: TransportRequestOptions): Promise @@ -237,6 +261,10 @@ export default class Nodes { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns low-level information about REST actions usage on nodes. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/cluster-nodes-usage.html Elasticsearch API docs} + */ async usage (this: That, params?: T.NodesUsageRequest | TB.NodesUsageRequest, options?: TransportRequestOptionsWithOutMeta): Promise async usage (this: That, params?: T.NodesUsageRequest | TB.NodesUsageRequest, options?: TransportRequestOptionsWithMeta): Promise> async usage (this: That, params?: T.NodesUsageRequest | TB.NodesUsageRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/open_point_in_time.ts b/src/api/api/open_point_in_time.ts index 81507983a..38e0165b7 100644 --- a/src/api/api/open_point_in_time.ts +++ b/src/api/api/open_point_in_time.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Open a point in time that can be used in subsequent searches + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/point-in-time-api.html Elasticsearch API docs} + */ export default async function OpenPointInTimeApi (this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function OpenPointInTimeApi (this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function OpenPointInTimeApi (this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/ping.ts b/src/api/api/ping.ts index 4b8a07e8f..b2db543f2 100644 --- a/src/api/api/ping.ts +++ b/src/api/api/ping.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns whether the cluster is running. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/index.html Elasticsearch API docs} + */ export default async function PingApi (this: That, params?: T.PingRequest | TB.PingRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function PingApi (this: That, params?: T.PingRequest | TB.PingRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function PingApi (this: That, params?: T.PingRequest | TB.PingRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/put_script.ts b/src/api/api/put_script.ts index 5d6711fd0..0aec2b2d7 100644 --- a/src/api/api/put_script.ts +++ b/src/api/api/put_script.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Creates or updates a script. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-scripting.html Elasticsearch API docs} + */ export default async function PutScriptApi (this: That, params: T.PutScriptRequest | TB.PutScriptRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function PutScriptApi (this: That, params: T.PutScriptRequest | TB.PutScriptRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function PutScriptApi (this: That, params: T.PutScriptRequest | TB.PutScriptRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/rank_eval.ts b/src/api/api/rank_eval.ts index 056e5bf7f..e3618721b 100644 --- a/src/api/api/rank_eval.ts +++ b/src/api/api/rank_eval.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows to evaluate the quality of ranked search results over a set of typical search queries + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-rank-eval.html Elasticsearch API docs} + */ export default async function RankEvalApi (this: That, params: T.RankEvalRequest | TB.RankEvalRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function RankEvalApi (this: That, params: T.RankEvalRequest | TB.RankEvalRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function RankEvalApi (this: That, params: T.RankEvalRequest | TB.RankEvalRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/reindex.ts b/src/api/api/reindex.ts index 3dadca6b6..43aa34f1f 100644 --- a/src/api/api/reindex.ts +++ b/src/api/api/reindex.ts @@ -37,6 +37,12 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows to copy documents from one index to another, optionally filtering the source +documents by a query, changing the destination index settings, or fetching the +documents from a remote cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-reindex.html Elasticsearch API docs} + */ export default async function ReindexApi (this: That, params: T.ReindexRequest | TB.ReindexRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function ReindexApi (this: That, params: T.ReindexRequest | TB.ReindexRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function ReindexApi (this: That, params: T.ReindexRequest | TB.ReindexRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/reindex_rethrottle.ts b/src/api/api/reindex_rethrottle.ts index 030ff50a5..9127d4a0f 100644 --- a/src/api/api/reindex_rethrottle.ts +++ b/src/api/api/reindex_rethrottle.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Changes the number of requests per second for a particular Reindex operation. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-reindex.html Elasticsearch API docs} + */ export default async function ReindexRethrottleApi (this: That, params: T.ReindexRethrottleRequest | TB.ReindexRethrottleRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function ReindexRethrottleApi (this: That, params: T.ReindexRethrottleRequest | TB.ReindexRethrottleRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function ReindexRethrottleApi (this: That, params: T.ReindexRethrottleRequest | TB.ReindexRethrottleRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/render_search_template.ts b/src/api/api/render_search_template.ts index bf4d68841..3081bdfa6 100644 --- a/src/api/api/render_search_template.ts +++ b/src/api/api/render_search_template.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows to use the Mustache language to pre-render a search definition. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/render-search-template-api.html Elasticsearch API docs} + */ export default async function RenderSearchTemplateApi (this: That, params?: T.RenderSearchTemplateRequest | TB.RenderSearchTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function RenderSearchTemplateApi (this: That, params?: T.RenderSearchTemplateRequest | TB.RenderSearchTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function RenderSearchTemplateApi (this: That, params?: T.RenderSearchTemplateRequest | TB.RenderSearchTemplateRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/rollup.ts b/src/api/api/rollup.ts index e75fcdfd7..ccdfca6ac 100644 --- a/src/api/api/rollup.ts +++ b/src/api/api/rollup.ts @@ -43,6 +43,10 @@ export default class Rollup { this.transport = transport } + /** + * Deletes an existing rollup job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/rollup-delete-job.html Elasticsearch API docs} + */ async deleteJob (this: That, params: T.RollupDeleteJobRequest | TB.RollupDeleteJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteJob (this: That, params: T.RollupDeleteJobRequest | TB.RollupDeleteJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteJob (this: That, params: T.RollupDeleteJobRequest | TB.RollupDeleteJobRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Rollup { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves the configuration, stats, and status of rollup jobs. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/rollup-get-job.html Elasticsearch API docs} + */ async getJobs (this: That, params?: T.RollupGetJobsRequest | TB.RollupGetJobsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getJobs (this: That, params?: T.RollupGetJobsRequest | TB.RollupGetJobsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getJobs (this: That, params?: T.RollupGetJobsRequest | TB.RollupGetJobsRequest, options?: TransportRequestOptions): Promise @@ -95,6 +103,10 @@ export default class Rollup { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the capabilities of any rollup jobs that have been configured for a specific index or index pattern. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/rollup-get-rollup-caps.html Elasticsearch API docs} + */ async getRollupCaps (this: That, params?: T.RollupGetRollupCapsRequest | TB.RollupGetRollupCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getRollupCaps (this: That, params?: T.RollupGetRollupCapsRequest | TB.RollupGetRollupCapsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getRollupCaps (this: That, params?: T.RollupGetRollupCapsRequest | TB.RollupGetRollupCapsRequest, options?: TransportRequestOptions): Promise @@ -125,6 +137,10 @@ export default class Rollup { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the rollup capabilities of all jobs inside of a rollup index (e.g. the index where rollup data is stored). + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/rollup-get-rollup-index-caps.html Elasticsearch API docs} + */ async getRollupIndexCaps (this: That, params: T.RollupGetRollupIndexCapsRequest | TB.RollupGetRollupIndexCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getRollupIndexCaps (this: That, params: T.RollupGetRollupIndexCapsRequest | TB.RollupGetRollupIndexCapsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getRollupIndexCaps (this: That, params: T.RollupGetRollupIndexCapsRequest | TB.RollupGetRollupIndexCapsRequest, options?: TransportRequestOptions): Promise @@ -147,6 +163,10 @@ export default class Rollup { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a rollup job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/rollup-put-job.html Elasticsearch API docs} + */ async putJob (this: That, params: T.RollupPutJobRequest | TB.RollupPutJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putJob (this: That, params: T.RollupPutJobRequest | TB.RollupPutJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async putJob (this: That, params: T.RollupPutJobRequest | TB.RollupPutJobRequest, options?: TransportRequestOptions): Promise @@ -181,6 +201,10 @@ export default class Rollup { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Enables searching rolled-up data using the standard query DSL. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/rollup-search.html Elasticsearch API docs} + */ async rollupSearch> (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async rollupSearch> (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async rollupSearch> (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptions): Promise> @@ -215,6 +239,10 @@ export default class Rollup { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Starts an existing, stopped rollup job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/rollup-start-job.html Elasticsearch API docs} + */ async startJob (this: That, params: T.RollupStartJobRequest | TB.RollupStartJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async startJob (this: That, params: T.RollupStartJobRequest | TB.RollupStartJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async startJob (this: That, params: T.RollupStartJobRequest | TB.RollupStartJobRequest, options?: TransportRequestOptions): Promise @@ -237,6 +265,10 @@ export default class Rollup { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Stops an existing, started rollup job. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/rollup-stop-job.html Elasticsearch API docs} + */ async stopJob (this: That, params: T.RollupStopJobRequest | TB.RollupStopJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stopJob (this: That, params: T.RollupStopJobRequest | TB.RollupStopJobRequest, options?: TransportRequestOptionsWithMeta): Promise> async stopJob (this: That, params: T.RollupStopJobRequest | TB.RollupStopJobRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/scripts_painless_execute.ts b/src/api/api/scripts_painless_execute.ts index f7757f513..a002cef20 100644 --- a/src/api/api/scripts_painless_execute.ts +++ b/src/api/api/scripts_painless_execute.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows an arbitrary script to be executed and a result to be returned + * @see {@link https://www.elastic.co/guide/en/elasticsearch/painless/main/painless-execute-api.html Elasticsearch API docs} + */ export default async function ScriptsPainlessExecuteApi (this: That, params?: T.ScriptsPainlessExecuteRequest | TB.ScriptsPainlessExecuteRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function ScriptsPainlessExecuteApi (this: That, params?: T.ScriptsPainlessExecuteRequest | TB.ScriptsPainlessExecuteRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function ScriptsPainlessExecuteApi (this: That, params?: T.ScriptsPainlessExecuteRequest | TB.ScriptsPainlessExecuteRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/scroll.ts b/src/api/api/scroll.ts index e04fd9aba..812526193 100644 --- a/src/api/api/scroll.ts +++ b/src/api/api/scroll.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows to retrieve a large numbers of results from a single search request. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-request-body.html#request-body-search-scroll Elasticsearch API docs} + */ export default async function ScrollApi> (this: That, params: T.ScrollRequest | TB.ScrollRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function ScrollApi> (this: That, params: T.ScrollRequest | TB.ScrollRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function ScrollApi> (this: That, params: T.ScrollRequest | TB.ScrollRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/search.ts b/src/api/api/search.ts index 6c757cc9b..e4d909e54 100644 --- a/src/api/api/search.ts +++ b/src/api/api/search.ts @@ -37,12 +37,16 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns results matching a query. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-search.html Elasticsearch API docs} + */ export default async function SearchApi> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function SearchApi> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function SearchApi> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise> export default async function SearchApi> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['index'] - const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'knn', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'] + const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'knn', 'rank', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats'] const querystring: Record = {} // @ts-expect-error const userBody: any = params?.body diff --git a/src/api/api/search_application.ts b/src/api/api/search_application.ts index 98ea8bd60..2ddb8749a 100644 --- a/src/api/api/search_application.ts +++ b/src/api/api/search_application.ts @@ -43,6 +43,10 @@ export default class SearchApplication { this.transport = transport } + /** + * Deletes a search application. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-search-application.html Elasticsearch API docs} + */ async delete (this: That, params: T.SearchApplicationDeleteRequest | TB.SearchApplicationDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise async delete (this: That, params: T.SearchApplicationDeleteRequest | TB.SearchApplicationDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise> async delete (this: That, params: T.SearchApplicationDeleteRequest | TB.SearchApplicationDeleteRequest, options?: TransportRequestOptions): Promise @@ -65,19 +69,23 @@ export default class SearchApplication { return await this.transport.request({ path, method, querystring, body }, options) } - async deleteBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async deleteBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async deleteBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async deleteBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + /** + * Delete a behavioral analytics collection. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-analytics-collection.html Elasticsearch API docs} + */ + async deleteBehavioralAnalytics (this: That, params: T.SearchApplicationDeleteBehavioralAnalyticsRequest | TB.SearchApplicationDeleteBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async deleteBehavioralAnalytics (this: That, params: T.SearchApplicationDeleteBehavioralAnalyticsRequest | TB.SearchApplicationDeleteBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> + async deleteBehavioralAnalytics (this: That, params: T.SearchApplicationDeleteBehavioralAnalyticsRequest | TB.SearchApplicationDeleteBehavioralAnalyticsRequest, options?: TransportRequestOptions): Promise + async deleteBehavioralAnalytics (this: That, params: T.SearchApplicationDeleteBehavioralAnalyticsRequest | TB.SearchApplicationDeleteBehavioralAnalyticsRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['name'] const querystring: Record = {} const body = undefined - params = params ?? {} for (const key in params) { if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { + // @ts-expect-error querystring[key] = params[key] } } @@ -87,6 +95,10 @@ export default class SearchApplication { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the details about a search application. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-search-application.html Elasticsearch API docs} + */ async get (this: That, params: T.SearchApplicationGetRequest | TB.SearchApplicationGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise async get (this: That, params: T.SearchApplicationGetRequest | TB.SearchApplicationGetRequest, options?: TransportRequestOptionsWithMeta): Promise> async get (this: That, params: T.SearchApplicationGetRequest | TB.SearchApplicationGetRequest, options?: TransportRequestOptions): Promise @@ -109,10 +121,14 @@ export default class SearchApplication { return await this.transport.request({ path, method, querystring, body }, options) } - async getBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async getBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async getBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async getBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + /** + * Returns the existing behavioral analytics collections. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/list-analytics-collection.html Elasticsearch API docs} + */ + async getBehavioralAnalytics (this: That, params?: T.SearchApplicationGetBehavioralAnalyticsRequest | TB.SearchApplicationGetBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async getBehavioralAnalytics (this: That, params?: T.SearchApplicationGetBehavioralAnalyticsRequest | TB.SearchApplicationGetBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> + async getBehavioralAnalytics (this: That, params?: T.SearchApplicationGetBehavioralAnalyticsRequest | TB.SearchApplicationGetBehavioralAnalyticsRequest, options?: TransportRequestOptions): Promise + async getBehavioralAnalytics (this: That, params?: T.SearchApplicationGetBehavioralAnalyticsRequest | TB.SearchApplicationGetBehavioralAnalyticsRequest, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['name'] const querystring: Record = {} const body = undefined @@ -122,6 +138,7 @@ export default class SearchApplication { if (acceptedPath.includes(key)) { continue } else if (key !== 'body') { + // @ts-expect-error querystring[key] = params[key] } } @@ -138,6 +155,10 @@ export default class SearchApplication { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the existing search applications. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/list-search-applications.html Elasticsearch API docs} + */ async list (this: That, params?: T.SearchApplicationListRequest | TB.SearchApplicationListRequest, options?: TransportRequestOptionsWithOutMeta): Promise async list (this: That, params?: T.SearchApplicationListRequest | TB.SearchApplicationListRequest, options?: TransportRequestOptionsWithMeta): Promise> async list (this: That, params?: T.SearchApplicationListRequest | TB.SearchApplicationListRequest, options?: TransportRequestOptions): Promise @@ -161,6 +182,10 @@ export default class SearchApplication { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a behavioral analytics event for existing collection. + * @see {@link http://todo.com/tbd Elasticsearch API docs} + */ async postBehavioralAnalyticsEvent (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise async postBehavioralAnalyticsEvent (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> async postBehavioralAnalyticsEvent (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise @@ -183,6 +208,10 @@ export default class SearchApplication { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates or updates a search application. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-search-application.html Elasticsearch API docs} + */ async put (this: That, params: T.SearchApplicationPutRequest | TB.SearchApplicationPutRequest, options?: TransportRequestOptionsWithOutMeta): Promise async put (this: That, params: T.SearchApplicationPutRequest | TB.SearchApplicationPutRequest, options?: TransportRequestOptionsWithMeta): Promise> async put (this: That, params: T.SearchApplicationPutRequest | TB.SearchApplicationPutRequest, options?: TransportRequestOptions): Promise @@ -210,10 +239,40 @@ export default class SearchApplication { return await this.transport.request({ path, method, querystring, body }, options) } - async putBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise - async putBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> - async putBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise - async putBehavioralAnalytics (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + /** + * Creates a behavioral analytics collection. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-analytics-collection.html Elasticsearch API docs} + */ + async putBehavioralAnalytics (this: That, params: T.SearchApplicationPutBehavioralAnalyticsRequest | TB.SearchApplicationPutBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise + async putBehavioralAnalytics (this: That, params: T.SearchApplicationPutBehavioralAnalyticsRequest | TB.SearchApplicationPutBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise> + async putBehavioralAnalytics (this: That, params: T.SearchApplicationPutBehavioralAnalyticsRequest | TB.SearchApplicationPutBehavioralAnalyticsRequest, options?: TransportRequestOptions): Promise + async putBehavioralAnalytics (this: That, params: T.SearchApplicationPutBehavioralAnalyticsRequest | TB.SearchApplicationPutBehavioralAnalyticsRequest, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = ['name'] + const querystring: Record = {} + const body = undefined + + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + // @ts-expect-error + querystring[key] = params[key] + } + } + + const method = 'PUT' + const path = `/_application/analytics/${encodeURIComponent(params.name.toString())}` + return await this.transport.request({ path, method, querystring, body }, options) + } + + /** + * Renders a query for given search application search parameters + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-application-render-query.html Elasticsearch API docs} + */ + async renderQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async renderQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async renderQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async renderQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { const acceptedPath: string[] = ['name'] const querystring: Record = {} const body = undefined @@ -227,11 +286,15 @@ export default class SearchApplication { } } - const method = 'PUT' - const path = `/_application/analytics/${encodeURIComponent(params.name.toString())}` + const method = 'POST' + const path = `/_application/search_application/${encodeURIComponent(params.name.toString())}/_render_query` return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Perform a search against a search application + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-application-search.html Elasticsearch API docs} + */ async search> (this: That, params: T.SearchApplicationSearchRequest | TB.SearchApplicationSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async search> (this: That, params: T.SearchApplicationSearchRequest | TB.SearchApplicationSearchRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async search> (this: That, params: T.SearchApplicationSearchRequest | TB.SearchApplicationSearchRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/search_mvt.ts b/src/api/api/search_mvt.ts index 16f4759f9..9f8b0fdc4 100644 --- a/src/api/api/search_mvt.ts +++ b/src/api/api/search_mvt.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Searches a vector tile for geospatial values. Returns results as a binary Mapbox vector tile. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-vector-tile-api.html Elasticsearch API docs} + */ export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/search_shards.ts b/src/api/api/search_shards.ts index 999ea6be4..7cf6a048d 100644 --- a/src/api/api/search_shards.ts +++ b/src/api/api/search_shards.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns information about the indices and shards that a search request would be executed against. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-shards.html Elasticsearch API docs} + */ export default async function SearchShardsApi (this: That, params?: T.SearchShardsRequest | TB.SearchShardsRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function SearchShardsApi (this: That, params?: T.SearchShardsRequest | TB.SearchShardsRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function SearchShardsApi (this: That, params?: T.SearchShardsRequest | TB.SearchShardsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/search_template.ts b/src/api/api/search_template.ts index 84c0fb9df..2ba27129d 100644 --- a/src/api/api/search_template.ts +++ b/src/api/api/search_template.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Allows to use the Mustache language to pre-render a search definition. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-template.html Elasticsearch API docs} + */ export default async function SearchTemplateApi (this: That, params?: T.SearchTemplateRequest | TB.SearchTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function SearchTemplateApi (this: That, params?: T.SearchTemplateRequest | TB.SearchTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function SearchTemplateApi (this: That, params?: T.SearchTemplateRequest | TB.SearchTemplateRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/searchable_snapshots.ts b/src/api/api/searchable_snapshots.ts index 725d72d22..5ed863d2e 100644 --- a/src/api/api/searchable_snapshots.ts +++ b/src/api/api/searchable_snapshots.ts @@ -43,6 +43,10 @@ export default class SearchableSnapshots { this.transport = transport } + /** + * Retrieve node-level cache statistics about searchable snapshots. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/searchable-snapshots-apis.html Elasticsearch API docs} + */ async cacheStats (this: That, params?: T.SearchableSnapshotsCacheStatsRequest | TB.SearchableSnapshotsCacheStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async cacheStats (this: That, params?: T.SearchableSnapshotsCacheStatsRequest | TB.SearchableSnapshotsCacheStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async cacheStats (this: That, params?: T.SearchableSnapshotsCacheStatsRequest | TB.SearchableSnapshotsCacheStatsRequest, options?: TransportRequestOptions): Promise @@ -73,6 +77,10 @@ export default class SearchableSnapshots { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Clear the cache of searchable snapshots. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/searchable-snapshots-apis.html Elasticsearch API docs} + */ async clearCache (this: That, params?: T.SearchableSnapshotsClearCacheRequest | TB.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearCache (this: That, params?: T.SearchableSnapshotsClearCacheRequest | TB.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearCache (this: That, params?: T.SearchableSnapshotsClearCacheRequest | TB.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptions): Promise @@ -103,6 +111,10 @@ export default class SearchableSnapshots { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Mount a snapshot as a searchable index. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/searchable-snapshots-api-mount-snapshot.html Elasticsearch API docs} + */ async mount (this: That, params: T.SearchableSnapshotsMountRequest | TB.SearchableSnapshotsMountRequest, options?: TransportRequestOptionsWithOutMeta): Promise async mount (this: That, params: T.SearchableSnapshotsMountRequest | TB.SearchableSnapshotsMountRequest, options?: TransportRequestOptionsWithMeta): Promise> async mount (this: That, params: T.SearchableSnapshotsMountRequest | TB.SearchableSnapshotsMountRequest, options?: TransportRequestOptions): Promise @@ -137,6 +149,10 @@ export default class SearchableSnapshots { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieve shard-level statistics about searchable snapshots. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/searchable-snapshots-apis.html Elasticsearch API docs} + */ async stats (this: That, params?: T.SearchableSnapshotsStatsRequest | TB.SearchableSnapshotsStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stats (this: That, params?: T.SearchableSnapshotsStatsRequest | TB.SearchableSnapshotsStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async stats (this: That, params?: T.SearchableSnapshotsStatsRequest | TB.SearchableSnapshotsStatsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/security.ts b/src/api/api/security.ts index d4ed0d109..4332002fe 100644 --- a/src/api/api/security.ts +++ b/src/api/api/security.ts @@ -43,6 +43,10 @@ export default class Security { this.transport = transport } + /** + * Creates or updates the user profile on behalf of another user. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-activate-user-profile.html Elasticsearch API docs} + */ async activateUserProfile (this: That, params: T.SecurityActivateUserProfileRequest | TB.SecurityActivateUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise async activateUserProfile (this: That, params: T.SecurityActivateUserProfileRequest | TB.SecurityActivateUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise> async activateUserProfile (this: That, params: T.SecurityActivateUserProfileRequest | TB.SecurityActivateUserProfileRequest, options?: TransportRequestOptions): Promise @@ -77,6 +81,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Enables authentication as a user and retrieve information about the authenticated user. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-authenticate.html Elasticsearch API docs} + */ async authenticate (this: That, params?: T.SecurityAuthenticateRequest | TB.SecurityAuthenticateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async authenticate (this: That, params?: T.SecurityAuthenticateRequest | TB.SecurityAuthenticateRequest, options?: TransportRequestOptionsWithMeta): Promise> async authenticate (this: That, params?: T.SecurityAuthenticateRequest | TB.SecurityAuthenticateRequest, options?: TransportRequestOptions): Promise @@ -100,6 +108,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates the attributes of multiple existing API keys. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-bulk-update-api-keys.html Elasticsearch API docs} + */ async bulkUpdateApiKeys (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise async bulkUpdateApiKeys (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> async bulkUpdateApiKeys (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise @@ -122,6 +134,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Changes the passwords of users in the native realm and built-in users. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-change-password.html Elasticsearch API docs} + */ async changePassword (this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptionsWithOutMeta): Promise async changePassword (this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptionsWithMeta): Promise> async changePassword (this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptions): Promise @@ -164,6 +180,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Clear a subset or all entries from the API key cache. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-clear-api-key-cache.html Elasticsearch API docs} + */ async clearApiKeyCache (this: That, params: T.SecurityClearApiKeyCacheRequest | TB.SecurityClearApiKeyCacheRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearApiKeyCache (this: That, params: T.SecurityClearApiKeyCacheRequest | TB.SecurityClearApiKeyCacheRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearApiKeyCache (this: That, params: T.SecurityClearApiKeyCacheRequest | TB.SecurityClearApiKeyCacheRequest, options?: TransportRequestOptions): Promise @@ -186,6 +206,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Evicts application privileges from the native application privileges cache. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-clear-privilege-cache.html Elasticsearch API docs} + */ async clearCachedPrivileges (this: That, params: T.SecurityClearCachedPrivilegesRequest | TB.SecurityClearCachedPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearCachedPrivileges (this: That, params: T.SecurityClearCachedPrivilegesRequest | TB.SecurityClearCachedPrivilegesRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearCachedPrivileges (this: That, params: T.SecurityClearCachedPrivilegesRequest | TB.SecurityClearCachedPrivilegesRequest, options?: TransportRequestOptions): Promise @@ -208,6 +232,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Evicts users from the user cache. Can completely clear the cache or evict specific users. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-clear-cache.html Elasticsearch API docs} + */ async clearCachedRealms (this: That, params: T.SecurityClearCachedRealmsRequest | TB.SecurityClearCachedRealmsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearCachedRealms (this: That, params: T.SecurityClearCachedRealmsRequest | TB.SecurityClearCachedRealmsRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearCachedRealms (this: That, params: T.SecurityClearCachedRealmsRequest | TB.SecurityClearCachedRealmsRequest, options?: TransportRequestOptions): Promise @@ -230,6 +258,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Evicts roles from the native role cache. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-clear-role-cache.html Elasticsearch API docs} + */ async clearCachedRoles (this: That, params: T.SecurityClearCachedRolesRequest | TB.SecurityClearCachedRolesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearCachedRoles (this: That, params: T.SecurityClearCachedRolesRequest | TB.SecurityClearCachedRolesRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearCachedRoles (this: That, params: T.SecurityClearCachedRolesRequest | TB.SecurityClearCachedRolesRequest, options?: TransportRequestOptions): Promise @@ -252,6 +284,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Evicts tokens from the service account token caches. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-clear-service-token-caches.html Elasticsearch API docs} + */ async clearCachedServiceTokens (this: That, params: T.SecurityClearCachedServiceTokensRequest | TB.SecurityClearCachedServiceTokensRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearCachedServiceTokens (this: That, params: T.SecurityClearCachedServiceTokensRequest | TB.SecurityClearCachedServiceTokensRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearCachedServiceTokens (this: That, params: T.SecurityClearCachedServiceTokensRequest | TB.SecurityClearCachedServiceTokensRequest, options?: TransportRequestOptions): Promise @@ -274,6 +310,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates an API key for access without requiring basic authentication. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-create-api-key.html Elasticsearch API docs} + */ async createApiKey (this: That, params?: T.SecurityCreateApiKeyRequest | TB.SecurityCreateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async createApiKey (this: That, params?: T.SecurityCreateApiKeyRequest | TB.SecurityCreateApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise> async createApiKey (this: That, params?: T.SecurityCreateApiKeyRequest | TB.SecurityCreateApiKeyRequest, options?: TransportRequestOptions): Promise @@ -309,6 +349,36 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a cross-cluster API key for API key based remote cluster access. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-create-cross-cluster-api-key.html Elasticsearch API docs} + */ + async createCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async createCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async createCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async createCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = [] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'POST' + const path = '/_security/cross_cluster/api_key' + return await this.transport.request({ path, method, querystring, body }, options) + } + + /** + * Creates a service account token for access without requiring basic authentication. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-create-service-token.html Elasticsearch API docs} + */ async createServiceToken (this: That, params: T.SecurityCreateServiceTokenRequest | TB.SecurityCreateServiceTokenRequest, options?: TransportRequestOptionsWithOutMeta): Promise async createServiceToken (this: That, params: T.SecurityCreateServiceTokenRequest | TB.SecurityCreateServiceTokenRequest, options?: TransportRequestOptionsWithMeta): Promise> async createServiceToken (this: That, params: T.SecurityCreateServiceTokenRequest | TB.SecurityCreateServiceTokenRequest, options?: TransportRequestOptions): Promise @@ -338,6 +408,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Removes application privileges. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-delete-privilege.html Elasticsearch API docs} + */ async deletePrivileges (this: That, params: T.SecurityDeletePrivilegesRequest | TB.SecurityDeletePrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deletePrivileges (this: That, params: T.SecurityDeletePrivilegesRequest | TB.SecurityDeletePrivilegesRequest, options?: TransportRequestOptionsWithMeta): Promise> async deletePrivileges (this: That, params: T.SecurityDeletePrivilegesRequest | TB.SecurityDeletePrivilegesRequest, options?: TransportRequestOptions): Promise @@ -360,6 +434,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Removes roles in the native realm. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-delete-role.html Elasticsearch API docs} + */ async deleteRole (this: That, params: T.SecurityDeleteRoleRequest | TB.SecurityDeleteRoleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteRole (this: That, params: T.SecurityDeleteRoleRequest | TB.SecurityDeleteRoleRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteRole (this: That, params: T.SecurityDeleteRoleRequest | TB.SecurityDeleteRoleRequest, options?: TransportRequestOptions): Promise @@ -382,6 +460,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Removes role mappings. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-delete-role-mapping.html Elasticsearch API docs} + */ async deleteRoleMapping (this: That, params: T.SecurityDeleteRoleMappingRequest | TB.SecurityDeleteRoleMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteRoleMapping (this: That, params: T.SecurityDeleteRoleMappingRequest | TB.SecurityDeleteRoleMappingRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteRoleMapping (this: That, params: T.SecurityDeleteRoleMappingRequest | TB.SecurityDeleteRoleMappingRequest, options?: TransportRequestOptions): Promise @@ -404,6 +486,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes a service account token. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-delete-service-token.html Elasticsearch API docs} + */ async deleteServiceToken (this: That, params: T.SecurityDeleteServiceTokenRequest | TB.SecurityDeleteServiceTokenRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteServiceToken (this: That, params: T.SecurityDeleteServiceTokenRequest | TB.SecurityDeleteServiceTokenRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteServiceToken (this: That, params: T.SecurityDeleteServiceTokenRequest | TB.SecurityDeleteServiceTokenRequest, options?: TransportRequestOptions): Promise @@ -426,6 +512,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes users from the native realm. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-delete-user.html Elasticsearch API docs} + */ async deleteUser (this: That, params: T.SecurityDeleteUserRequest | TB.SecurityDeleteUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteUser (this: That, params: T.SecurityDeleteUserRequest | TB.SecurityDeleteUserRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteUser (this: That, params: T.SecurityDeleteUserRequest | TB.SecurityDeleteUserRequest, options?: TransportRequestOptions): Promise @@ -448,6 +538,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Disables users in the native realm. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-disable-user.html Elasticsearch API docs} + */ async disableUser (this: That, params: T.SecurityDisableUserRequest | TB.SecurityDisableUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise async disableUser (this: That, params: T.SecurityDisableUserRequest | TB.SecurityDisableUserRequest, options?: TransportRequestOptionsWithMeta): Promise> async disableUser (this: That, params: T.SecurityDisableUserRequest | TB.SecurityDisableUserRequest, options?: TransportRequestOptions): Promise @@ -470,6 +564,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Disables a user profile so it's not visible in user profile searches. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-disable-user-profile.html Elasticsearch API docs} + */ async disableUserProfile (this: That, params: T.SecurityDisableUserProfileRequest | TB.SecurityDisableUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise async disableUserProfile (this: That, params: T.SecurityDisableUserProfileRequest | TB.SecurityDisableUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise> async disableUserProfile (this: That, params: T.SecurityDisableUserProfileRequest | TB.SecurityDisableUserProfileRequest, options?: TransportRequestOptions): Promise @@ -492,6 +590,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Enables users in the native realm. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-enable-user.html Elasticsearch API docs} + */ async enableUser (this: That, params: T.SecurityEnableUserRequest | TB.SecurityEnableUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise async enableUser (this: That, params: T.SecurityEnableUserRequest | TB.SecurityEnableUserRequest, options?: TransportRequestOptionsWithMeta): Promise> async enableUser (this: That, params: T.SecurityEnableUserRequest | TB.SecurityEnableUserRequest, options?: TransportRequestOptions): Promise @@ -514,6 +616,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Enables a user profile so it's visible in user profile searches. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-enable-user-profile.html Elasticsearch API docs} + */ async enableUserProfile (this: That, params: T.SecurityEnableUserProfileRequest | TB.SecurityEnableUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise async enableUserProfile (this: That, params: T.SecurityEnableUserProfileRequest | TB.SecurityEnableUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise> async enableUserProfile (this: That, params: T.SecurityEnableUserProfileRequest | TB.SecurityEnableUserProfileRequest, options?: TransportRequestOptions): Promise @@ -536,6 +642,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Allows a kibana instance to configure itself to communicate with a secured elasticsearch cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-kibana-enrollment.html Elasticsearch API docs} + */ async enrollKibana (this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptionsWithOutMeta): Promise async enrollKibana (this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptionsWithMeta): Promise> async enrollKibana (this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptions): Promise @@ -559,6 +669,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Allows a new node to enroll to an existing cluster with security enabled. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-node-enrollment.html Elasticsearch API docs} + */ async enrollNode (this: That, params?: T.SecurityEnrollNodeRequest | TB.SecurityEnrollNodeRequest, options?: TransportRequestOptionsWithOutMeta): Promise async enrollNode (this: That, params?: T.SecurityEnrollNodeRequest | TB.SecurityEnrollNodeRequest, options?: TransportRequestOptionsWithMeta): Promise> async enrollNode (this: That, params?: T.SecurityEnrollNodeRequest | TB.SecurityEnrollNodeRequest, options?: TransportRequestOptions): Promise @@ -582,6 +696,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information for one or more API keys. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-api-key.html Elasticsearch API docs} + */ async getApiKey (this: That, params?: T.SecurityGetApiKeyRequest | TB.SecurityGetApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getApiKey (this: That, params?: T.SecurityGetApiKeyRequest | TB.SecurityGetApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise> async getApiKey (this: That, params?: T.SecurityGetApiKeyRequest | TB.SecurityGetApiKeyRequest, options?: TransportRequestOptions): Promise @@ -605,6 +723,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves the list of cluster privileges and index privileges that are available in this version of Elasticsearch. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-builtin-privileges.html Elasticsearch API docs} + */ async getBuiltinPrivileges (this: That, params?: T.SecurityGetBuiltinPrivilegesRequest | TB.SecurityGetBuiltinPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getBuiltinPrivileges (this: That, params?: T.SecurityGetBuiltinPrivilegesRequest | TB.SecurityGetBuiltinPrivilegesRequest, options?: TransportRequestOptionsWithMeta): Promise> async getBuiltinPrivileges (this: That, params?: T.SecurityGetBuiltinPrivilegesRequest | TB.SecurityGetBuiltinPrivilegesRequest, options?: TransportRequestOptions): Promise @@ -628,6 +750,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves application privileges. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-privileges.html Elasticsearch API docs} + */ async getPrivileges (this: That, params?: T.SecurityGetPrivilegesRequest | TB.SecurityGetPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getPrivileges (this: That, params?: T.SecurityGetPrivilegesRequest | TB.SecurityGetPrivilegesRequest, options?: TransportRequestOptionsWithMeta): Promise> async getPrivileges (this: That, params?: T.SecurityGetPrivilegesRequest | TB.SecurityGetPrivilegesRequest, options?: TransportRequestOptions): Promise @@ -661,6 +787,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves roles in the native realm. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-role.html Elasticsearch API docs} + */ async getRole (this: That, params?: T.SecurityGetRoleRequest | TB.SecurityGetRoleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getRole (this: That, params?: T.SecurityGetRoleRequest | TB.SecurityGetRoleRequest, options?: TransportRequestOptionsWithMeta): Promise> async getRole (this: That, params?: T.SecurityGetRoleRequest | TB.SecurityGetRoleRequest, options?: TransportRequestOptions): Promise @@ -691,6 +821,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves role mappings. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-role-mapping.html Elasticsearch API docs} + */ async getRoleMapping (this: That, params?: T.SecurityGetRoleMappingRequest | TB.SecurityGetRoleMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getRoleMapping (this: That, params?: T.SecurityGetRoleMappingRequest | TB.SecurityGetRoleMappingRequest, options?: TransportRequestOptionsWithMeta): Promise> async getRoleMapping (this: That, params?: T.SecurityGetRoleMappingRequest | TB.SecurityGetRoleMappingRequest, options?: TransportRequestOptions): Promise @@ -721,6 +855,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information about service accounts. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-service-accounts.html Elasticsearch API docs} + */ async getServiceAccounts (this: That, params?: T.SecurityGetServiceAccountsRequest | TB.SecurityGetServiceAccountsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getServiceAccounts (this: That, params?: T.SecurityGetServiceAccountsRequest | TB.SecurityGetServiceAccountsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getServiceAccounts (this: That, params?: T.SecurityGetServiceAccountsRequest | TB.SecurityGetServiceAccountsRequest, options?: TransportRequestOptions): Promise @@ -754,6 +892,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information of all service credentials for a service account. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-service-credentials.html Elasticsearch API docs} + */ async getServiceCredentials (this: That, params: T.SecurityGetServiceCredentialsRequest | TB.SecurityGetServiceCredentialsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getServiceCredentials (this: That, params: T.SecurityGetServiceCredentialsRequest | TB.SecurityGetServiceCredentialsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getServiceCredentials (this: That, params: T.SecurityGetServiceCredentialsRequest | TB.SecurityGetServiceCredentialsRequest, options?: TransportRequestOptions): Promise @@ -776,6 +918,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a bearer token for access without requiring basic authentication. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-token.html Elasticsearch API docs} + */ async getToken (this: That, params?: T.SecurityGetTokenRequest | TB.SecurityGetTokenRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getToken (this: That, params?: T.SecurityGetTokenRequest | TB.SecurityGetTokenRequest, options?: TransportRequestOptionsWithMeta): Promise> async getToken (this: That, params?: T.SecurityGetTokenRequest | TB.SecurityGetTokenRequest, options?: TransportRequestOptions): Promise @@ -811,6 +957,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information about users in the native realm and built-in users. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-user.html Elasticsearch API docs} + */ async getUser (this: That, params?: T.SecurityGetUserRequest | TB.SecurityGetUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getUser (this: That, params?: T.SecurityGetUserRequest | TB.SecurityGetUserRequest, options?: TransportRequestOptionsWithMeta): Promise> async getUser (this: That, params?: T.SecurityGetUserRequest | TB.SecurityGetUserRequest, options?: TransportRequestOptions): Promise @@ -841,6 +991,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves security privileges for the logged in user. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-user-privileges.html Elasticsearch API docs} + */ async getUserPrivileges (this: That, params?: T.SecurityGetUserPrivilegesRequest | TB.SecurityGetUserPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getUserPrivileges (this: That, params?: T.SecurityGetUserPrivilegesRequest | TB.SecurityGetUserPrivilegesRequest, options?: TransportRequestOptionsWithMeta): Promise> async getUserPrivileges (this: That, params?: T.SecurityGetUserPrivilegesRequest | TB.SecurityGetUserPrivilegesRequest, options?: TransportRequestOptions): Promise @@ -864,6 +1018,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves user profiles for the given unique ID(s). + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-get-user-profile.html Elasticsearch API docs} + */ async getUserProfile (this: That, params: T.SecurityGetUserProfileRequest | TB.SecurityGetUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getUserProfile (this: That, params: T.SecurityGetUserProfileRequest | TB.SecurityGetUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise> async getUserProfile (this: That, params: T.SecurityGetUserProfileRequest | TB.SecurityGetUserProfileRequest, options?: TransportRequestOptions): Promise @@ -886,6 +1044,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates an API key on behalf of another user. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-grant-api-key.html Elasticsearch API docs} + */ async grantApiKey (this: That, params: T.SecurityGrantApiKeyRequest | TB.SecurityGrantApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async grantApiKey (this: That, params: T.SecurityGrantApiKeyRequest | TB.SecurityGrantApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise> async grantApiKey (this: That, params: T.SecurityGrantApiKeyRequest | TB.SecurityGrantApiKeyRequest, options?: TransportRequestOptions): Promise @@ -920,6 +1082,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Determines whether the specified user has a specified list of privileges. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-has-privileges.html Elasticsearch API docs} + */ async hasPrivileges (this: That, params?: T.SecurityHasPrivilegesRequest | TB.SecurityHasPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async hasPrivileges (this: That, params?: T.SecurityHasPrivilegesRequest | TB.SecurityHasPrivilegesRequest, options?: TransportRequestOptionsWithMeta): Promise> async hasPrivileges (this: That, params?: T.SecurityHasPrivilegesRequest | TB.SecurityHasPrivilegesRequest, options?: TransportRequestOptions): Promise @@ -962,6 +1128,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Determines whether the users associated with the specified profile IDs have all the requested privileges. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-has-privileges-user-profile.html Elasticsearch API docs} + */ async hasPrivilegesUserProfile (this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise async hasPrivilegesUserProfile (this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise> async hasPrivilegesUserProfile (this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptions): Promise @@ -996,6 +1166,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Invalidates one or more API keys. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-invalidate-api-key.html Elasticsearch API docs} + */ async invalidateApiKey (this: That, params?: T.SecurityInvalidateApiKeyRequest | TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async invalidateApiKey (this: That, params?: T.SecurityInvalidateApiKeyRequest | TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise> async invalidateApiKey (this: That, params?: T.SecurityInvalidateApiKeyRequest | TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptions): Promise @@ -1031,6 +1205,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Invalidates one or more access tokens or refresh tokens. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-invalidate-token.html Elasticsearch API docs} + */ async invalidateToken (this: That, params?: T.SecurityInvalidateTokenRequest | TB.SecurityInvalidateTokenRequest, options?: TransportRequestOptionsWithOutMeta): Promise async invalidateToken (this: That, params?: T.SecurityInvalidateTokenRequest | TB.SecurityInvalidateTokenRequest, options?: TransportRequestOptionsWithMeta): Promise> async invalidateToken (this: That, params?: T.SecurityInvalidateTokenRequest | TB.SecurityInvalidateTokenRequest, options?: TransportRequestOptions): Promise @@ -1066,6 +1244,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Exchanges an OpenID Connection authentication response message for an Elasticsearch access token and refresh token pair + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-oidc-authenticate.html Elasticsearch API docs} + */ async oidcAuthenticate (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise async oidcAuthenticate (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> async oidcAuthenticate (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise @@ -1088,6 +1270,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Invalidates a refresh token and access token that was generated from the OpenID Connect Authenticate API + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-oidc-logout.html Elasticsearch API docs} + */ async oidcLogout (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise async oidcLogout (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> async oidcLogout (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise @@ -1110,6 +1296,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates an OAuth 2.0 authentication request as a URL string + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-oidc-prepare-authentication.html Elasticsearch API docs} + */ async oidcPrepareAuthentication (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise async oidcPrepareAuthentication (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> async oidcPrepareAuthentication (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise @@ -1132,6 +1322,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Adds or updates application privileges. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-put-privileges.html Elasticsearch API docs} + */ async putPrivileges (this: That, params: T.SecurityPutPrivilegesRequest | TB.SecurityPutPrivilegesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putPrivileges (this: That, params: T.SecurityPutPrivilegesRequest | TB.SecurityPutPrivilegesRequest, options?: TransportRequestOptionsWithMeta): Promise> async putPrivileges (this: That, params: T.SecurityPutPrivilegesRequest | TB.SecurityPutPrivilegesRequest, options?: TransportRequestOptions): Promise @@ -1159,6 +1353,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Adds and updates roles in the native realm. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-put-role.html Elasticsearch API docs} + */ async putRole (this: That, params: T.SecurityPutRoleRequest | TB.SecurityPutRoleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putRole (this: That, params: T.SecurityPutRoleRequest | TB.SecurityPutRoleRequest, options?: TransportRequestOptionsWithMeta): Promise> async putRole (this: That, params: T.SecurityPutRoleRequest | TB.SecurityPutRoleRequest, options?: TransportRequestOptions): Promise @@ -1193,6 +1391,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates and updates role mappings. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-put-role-mapping.html Elasticsearch API docs} + */ async putRoleMapping (this: That, params: T.SecurityPutRoleMappingRequest | TB.SecurityPutRoleMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putRoleMapping (this: That, params: T.SecurityPutRoleMappingRequest | TB.SecurityPutRoleMappingRequest, options?: TransportRequestOptionsWithMeta): Promise> async putRoleMapping (this: That, params: T.SecurityPutRoleMappingRequest | TB.SecurityPutRoleMappingRequest, options?: TransportRequestOptions): Promise @@ -1227,6 +1429,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Adds and updates users in the native realm. These users are commonly referred to as native users. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-put-user.html Elasticsearch API docs} + */ async putUser (this: That, params: T.SecurityPutUserRequest | TB.SecurityPutUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putUser (this: That, params: T.SecurityPutUserRequest | TB.SecurityPutUserRequest, options?: TransportRequestOptionsWithMeta): Promise> async putUser (this: That, params: T.SecurityPutUserRequest | TB.SecurityPutUserRequest, options?: TransportRequestOptions): Promise @@ -1261,6 +1467,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves information for API keys using a subset of query DSL + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-query-api-key.html Elasticsearch API docs} + */ async queryApiKeys (this: That, params?: T.SecurityQueryApiKeysRequest | TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptionsWithOutMeta): Promise async queryApiKeys (this: That, params?: T.SecurityQueryApiKeysRequest | TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptionsWithMeta): Promise> async queryApiKeys (this: That, params?: T.SecurityQueryApiKeysRequest | TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptions): Promise @@ -1296,6 +1506,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Exchanges a SAML Response message for an Elasticsearch access token and refresh token pair + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-saml-authenticate.html Elasticsearch API docs} + */ async samlAuthenticate (this: That, params: T.SecuritySamlAuthenticateRequest | TB.SecuritySamlAuthenticateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async samlAuthenticate (this: That, params: T.SecuritySamlAuthenticateRequest | TB.SecuritySamlAuthenticateRequest, options?: TransportRequestOptionsWithMeta): Promise> async samlAuthenticate (this: That, params: T.SecuritySamlAuthenticateRequest | TB.SecuritySamlAuthenticateRequest, options?: TransportRequestOptions): Promise @@ -1330,6 +1544,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Verifies the logout response sent from the SAML IdP + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-saml-complete-logout.html Elasticsearch API docs} + */ async samlCompleteLogout (this: That, params: T.SecuritySamlCompleteLogoutRequest | TB.SecuritySamlCompleteLogoutRequest, options?: TransportRequestOptionsWithOutMeta): Promise async samlCompleteLogout (this: That, params: T.SecuritySamlCompleteLogoutRequest | TB.SecuritySamlCompleteLogoutRequest, options?: TransportRequestOptionsWithMeta): Promise> async samlCompleteLogout (this: That, params: T.SecuritySamlCompleteLogoutRequest | TB.SecuritySamlCompleteLogoutRequest, options?: TransportRequestOptions): Promise @@ -1364,6 +1582,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Consumes a SAML LogoutRequest + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-saml-invalidate.html Elasticsearch API docs} + */ async samlInvalidate (this: That, params: T.SecuritySamlInvalidateRequest | TB.SecuritySamlInvalidateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async samlInvalidate (this: That, params: T.SecuritySamlInvalidateRequest | TB.SecuritySamlInvalidateRequest, options?: TransportRequestOptionsWithMeta): Promise> async samlInvalidate (this: That, params: T.SecuritySamlInvalidateRequest | TB.SecuritySamlInvalidateRequest, options?: TransportRequestOptions): Promise @@ -1398,6 +1620,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Invalidates an access token and a refresh token that were generated via the SAML Authenticate API + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-saml-logout.html Elasticsearch API docs} + */ async samlLogout (this: That, params: T.SecuritySamlLogoutRequest | TB.SecuritySamlLogoutRequest, options?: TransportRequestOptionsWithOutMeta): Promise async samlLogout (this: That, params: T.SecuritySamlLogoutRequest | TB.SecuritySamlLogoutRequest, options?: TransportRequestOptionsWithMeta): Promise> async samlLogout (this: That, params: T.SecuritySamlLogoutRequest | TB.SecuritySamlLogoutRequest, options?: TransportRequestOptions): Promise @@ -1432,6 +1658,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a SAML authentication request + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-saml-prepare-authentication.html Elasticsearch API docs} + */ async samlPrepareAuthentication (this: That, params?: T.SecuritySamlPrepareAuthenticationRequest | TB.SecuritySamlPrepareAuthenticationRequest, options?: TransportRequestOptionsWithOutMeta): Promise async samlPrepareAuthentication (this: That, params?: T.SecuritySamlPrepareAuthenticationRequest | TB.SecuritySamlPrepareAuthenticationRequest, options?: TransportRequestOptionsWithMeta): Promise> async samlPrepareAuthentication (this: That, params?: T.SecuritySamlPrepareAuthenticationRequest | TB.SecuritySamlPrepareAuthenticationRequest, options?: TransportRequestOptions): Promise @@ -1467,6 +1697,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Generates SAML metadata for the Elastic stack SAML 2.0 Service Provider + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-saml-sp-metadata.html Elasticsearch API docs} + */ async samlServiceProviderMetadata (this: That, params: T.SecuritySamlServiceProviderMetadataRequest | TB.SecuritySamlServiceProviderMetadataRequest, options?: TransportRequestOptionsWithOutMeta): Promise async samlServiceProviderMetadata (this: That, params: T.SecuritySamlServiceProviderMetadataRequest | TB.SecuritySamlServiceProviderMetadataRequest, options?: TransportRequestOptionsWithMeta): Promise> async samlServiceProviderMetadata (this: That, params: T.SecuritySamlServiceProviderMetadataRequest | TB.SecuritySamlServiceProviderMetadataRequest, options?: TransportRequestOptions): Promise @@ -1489,6 +1723,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Get suggestions for user profiles that match specified search criteria. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-suggest-user-profile.html Elasticsearch API docs} + */ async suggestUserProfiles (this: That, params?: T.SecuritySuggestUserProfilesRequest | TB.SecuritySuggestUserProfilesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async suggestUserProfiles (this: That, params?: T.SecuritySuggestUserProfilesRequest | TB.SecuritySuggestUserProfilesRequest, options?: TransportRequestOptionsWithMeta): Promise> async suggestUserProfiles (this: That, params?: T.SecuritySuggestUserProfilesRequest | TB.SecuritySuggestUserProfilesRequest, options?: TransportRequestOptions): Promise @@ -1524,6 +1762,10 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates attributes of an existing API key. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-update-api-key.html Elasticsearch API docs} + */ async updateApiKey (this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise async updateApiKey (this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise> async updateApiKey (this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptions): Promise @@ -1558,6 +1800,36 @@ export default class Security { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates attributes of an existing cross-cluster API key. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-update-cross-cluster-api-key.html Elasticsearch API docs} + */ + async updateCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async updateCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async updateCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async updateCrossClusterApiKey (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = ['id'] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'PUT' + const path = `/_security/cross_cluster/api_key/${encodeURIComponent(params.id.toString())}` + return await this.transport.request({ path, method, querystring, body }, options) + } + + /** + * Update application specific data for the user profile of the given unique ID. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-update-user-profile-data.html Elasticsearch API docs} + */ async updateUserProfileData (this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptionsWithOutMeta): Promise async updateUserProfileData (this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptionsWithMeta): Promise> async updateUserProfileData (this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/shutdown.ts b/src/api/api/shutdown.ts index c995623c7..69ae52852 100644 --- a/src/api/api/shutdown.ts +++ b/src/api/api/shutdown.ts @@ -43,6 +43,10 @@ export default class Shutdown { this.transport = transport } + /** + * Removes a node from the shutdown list. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/current Elasticsearch API docs} + */ async deleteNode (this: That, params: T.ShutdownDeleteNodeRequest | TB.ShutdownDeleteNodeRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteNode (this: That, params: T.ShutdownDeleteNodeRequest | TB.ShutdownDeleteNodeRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteNode (this: That, params: T.ShutdownDeleteNodeRequest | TB.ShutdownDeleteNodeRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Shutdown { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieve status of a node or nodes that are currently marked as shutting down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/current Elasticsearch API docs} + */ async getNode (this: That, params?: T.ShutdownGetNodeRequest | TB.ShutdownGetNodeRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getNode (this: That, params?: T.ShutdownGetNodeRequest | TB.ShutdownGetNodeRequest, options?: TransportRequestOptionsWithMeta): Promise> async getNode (this: That, params?: T.ShutdownGetNodeRequest | TB.ShutdownGetNodeRequest, options?: TransportRequestOptions): Promise @@ -95,6 +103,10 @@ export default class Shutdown { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Adds a node to be shut down. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/current Elasticsearch API docs} + */ async putNode (this: That, params: T.ShutdownPutNodeRequest | TB.ShutdownPutNodeRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putNode (this: That, params: T.ShutdownPutNodeRequest | TB.ShutdownPutNodeRequest, options?: TransportRequestOptionsWithMeta): Promise> async putNode (this: That, params: T.ShutdownPutNodeRequest | TB.ShutdownPutNodeRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/slm.ts b/src/api/api/slm.ts index a24fa13e5..e73f9233d 100644 --- a/src/api/api/slm.ts +++ b/src/api/api/slm.ts @@ -43,6 +43,10 @@ export default class Slm { this.transport = transport } + /** + * Deletes an existing snapshot lifecycle policy. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/slm-api-delete-policy.html Elasticsearch API docs} + */ async deleteLifecycle (this: That, params: T.SlmDeleteLifecycleRequest | TB.SlmDeleteLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteLifecycle (this: That, params: T.SlmDeleteLifecycleRequest | TB.SlmDeleteLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteLifecycle (this: That, params: T.SlmDeleteLifecycleRequest | TB.SlmDeleteLifecycleRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Slm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/slm-api-execute-lifecycle.html Elasticsearch API docs} + */ async executeLifecycle (this: That, params: T.SlmExecuteLifecycleRequest | TB.SlmExecuteLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async executeLifecycle (this: That, params: T.SlmExecuteLifecycleRequest | TB.SlmExecuteLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> async executeLifecycle (this: That, params: T.SlmExecuteLifecycleRequest | TB.SlmExecuteLifecycleRequest, options?: TransportRequestOptions): Promise @@ -87,6 +95,10 @@ export default class Slm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes any snapshots that are expired according to the policy's retention rules. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/slm-api-execute-retention.html Elasticsearch API docs} + */ async executeRetention (this: That, params?: T.SlmExecuteRetentionRequest | TB.SlmExecuteRetentionRequest, options?: TransportRequestOptionsWithOutMeta): Promise async executeRetention (this: That, params?: T.SlmExecuteRetentionRequest | TB.SlmExecuteRetentionRequest, options?: TransportRequestOptionsWithMeta): Promise> async executeRetention (this: That, params?: T.SlmExecuteRetentionRequest | TB.SlmExecuteRetentionRequest, options?: TransportRequestOptions): Promise @@ -110,6 +122,10 @@ export default class Slm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/slm-api-get-policy.html Elasticsearch API docs} + */ async getLifecycle (this: That, params?: T.SlmGetLifecycleRequest | TB.SlmGetLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getLifecycle (this: That, params?: T.SlmGetLifecycleRequest | TB.SlmGetLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> async getLifecycle (this: That, params?: T.SlmGetLifecycleRequest | TB.SlmGetLifecycleRequest, options?: TransportRequestOptions): Promise @@ -140,6 +156,10 @@ export default class Slm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns global and policy-level statistics about actions taken by snapshot lifecycle management. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/slm-api-get-stats.html Elasticsearch API docs} + */ async getStats (this: That, params?: T.SlmGetStatsRequest | TB.SlmGetStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getStats (this: That, params?: T.SlmGetStatsRequest | TB.SlmGetStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getStats (this: That, params?: T.SlmGetStatsRequest | TB.SlmGetStatsRequest, options?: TransportRequestOptions): Promise @@ -163,6 +183,10 @@ export default class Slm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves the status of snapshot lifecycle management (SLM). + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/slm-api-get-status.html Elasticsearch API docs} + */ async getStatus (this: That, params?: T.SlmGetStatusRequest | TB.SlmGetStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getStatus (this: That, params?: T.SlmGetStatusRequest | TB.SlmGetStatusRequest, options?: TransportRequestOptionsWithMeta): Promise> async getStatus (this: That, params?: T.SlmGetStatusRequest | TB.SlmGetStatusRequest, options?: TransportRequestOptions): Promise @@ -186,6 +210,10 @@ export default class Slm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates or updates a snapshot lifecycle policy. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/slm-api-put-policy.html Elasticsearch API docs} + */ async putLifecycle (this: That, params: T.SlmPutLifecycleRequest | TB.SlmPutLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putLifecycle (this: That, params: T.SlmPutLifecycleRequest | TB.SlmPutLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise> async putLifecycle (this: That, params: T.SlmPutLifecycleRequest | TB.SlmPutLifecycleRequest, options?: TransportRequestOptions): Promise @@ -220,6 +248,10 @@ export default class Slm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Turns on snapshot lifecycle management (SLM). + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/slm-api-start.html Elasticsearch API docs} + */ async start (this: That, params?: T.SlmStartRequest | TB.SlmStartRequest, options?: TransportRequestOptionsWithOutMeta): Promise async start (this: That, params?: T.SlmStartRequest | TB.SlmStartRequest, options?: TransportRequestOptionsWithMeta): Promise> async start (this: That, params?: T.SlmStartRequest | TB.SlmStartRequest, options?: TransportRequestOptions): Promise @@ -243,6 +275,10 @@ export default class Slm { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Turns off snapshot lifecycle management (SLM). + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/slm-api-stop.html Elasticsearch API docs} + */ async stop (this: That, params?: T.SlmStopRequest | TB.SlmStopRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stop (this: That, params?: T.SlmStopRequest | TB.SlmStopRequest, options?: TransportRequestOptionsWithMeta): Promise> async stop (this: That, params?: T.SlmStopRequest | TB.SlmStopRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/snapshot.ts b/src/api/api/snapshot.ts index fa3fa0b03..09245f182 100644 --- a/src/api/api/snapshot.ts +++ b/src/api/api/snapshot.ts @@ -43,6 +43,10 @@ export default class Snapshot { this.transport = transport } + /** + * Removes stale data from repository. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/clean-up-snapshot-repo-api.html Elasticsearch API docs} + */ async cleanupRepository (this: That, params: T.SnapshotCleanupRepositoryRequest | TB.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async cleanupRepository (this: That, params: T.SnapshotCleanupRepositoryRequest | TB.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise> async cleanupRepository (this: That, params: T.SnapshotCleanupRepositoryRequest | TB.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Clones indices from one snapshot into another snapshot in the same repository. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async clone (this: That, params: T.SnapshotCloneRequest | TB.SnapshotCloneRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clone (this: That, params: T.SnapshotCloneRequest | TB.SnapshotCloneRequest, options?: TransportRequestOptionsWithMeta): Promise> async clone (this: That, params: T.SnapshotCloneRequest | TB.SnapshotCloneRequest, options?: TransportRequestOptions): Promise @@ -99,6 +107,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a snapshot in a repository. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async create (this: That, params: T.SnapshotCreateRequest | TB.SnapshotCreateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async create (this: That, params: T.SnapshotCreateRequest | TB.SnapshotCreateRequest, options?: TransportRequestOptionsWithMeta): Promise> async create (this: That, params: T.SnapshotCreateRequest | TB.SnapshotCreateRequest, options?: TransportRequestOptions): Promise @@ -133,6 +145,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a repository. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async createRepository (this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async createRepository (this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise> async createRepository (this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): Promise @@ -167,6 +183,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes one or more snapshots. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async delete (this: That, params: T.SnapshotDeleteRequest | TB.SnapshotDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise async delete (this: That, params: T.SnapshotDeleteRequest | TB.SnapshotDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise> async delete (this: That, params: T.SnapshotDeleteRequest | TB.SnapshotDeleteRequest, options?: TransportRequestOptions): Promise @@ -189,6 +209,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes a repository. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async deleteRepository (this: That, params: T.SnapshotDeleteRepositoryRequest | TB.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteRepository (this: That, params: T.SnapshotDeleteRepositoryRequest | TB.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteRepository (this: That, params: T.SnapshotDeleteRepositoryRequest | TB.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions): Promise @@ -211,6 +235,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about a snapshot. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async get (this: That, params: T.SnapshotGetRequest | TB.SnapshotGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise async get (this: That, params: T.SnapshotGetRequest | TB.SnapshotGetRequest, options?: TransportRequestOptionsWithMeta): Promise> async get (this: That, params: T.SnapshotGetRequest | TB.SnapshotGetRequest, options?: TransportRequestOptions): Promise @@ -233,6 +261,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about a repository. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async getRepository (this: That, params?: T.SnapshotGetRepositoryRequest | TB.SnapshotGetRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getRepository (this: That, params?: T.SnapshotGetRepositoryRequest | TB.SnapshotGetRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise> async getRepository (this: That, params?: T.SnapshotGetRepositoryRequest | TB.SnapshotGetRepositoryRequest, options?: TransportRequestOptions): Promise @@ -263,6 +295,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Analyzes a repository for correctness and performance + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async repositoryAnalyze (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise async repositoryAnalyze (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> async repositoryAnalyze (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise @@ -285,6 +321,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Restores a snapshot. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async restore (this: That, params: T.SnapshotRestoreRequest | TB.SnapshotRestoreRequest, options?: TransportRequestOptionsWithOutMeta): Promise async restore (this: That, params: T.SnapshotRestoreRequest | TB.SnapshotRestoreRequest, options?: TransportRequestOptionsWithMeta): Promise> async restore (this: That, params: T.SnapshotRestoreRequest | TB.SnapshotRestoreRequest, options?: TransportRequestOptions): Promise @@ -319,6 +359,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about the status of a snapshot. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async status (this: That, params?: T.SnapshotStatusRequest | TB.SnapshotStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise async status (this: That, params?: T.SnapshotStatusRequest | TB.SnapshotStatusRequest, options?: TransportRequestOptionsWithMeta): Promise> async status (this: That, params?: T.SnapshotStatusRequest | TB.SnapshotStatusRequest, options?: TransportRequestOptions): Promise @@ -352,6 +396,10 @@ export default class Snapshot { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Verifies a repository. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/modules-snapshots.html Elasticsearch API docs} + */ async verifyRepository (this: That, params: T.SnapshotVerifyRepositoryRequest | TB.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async verifyRepository (this: That, params: T.SnapshotVerifyRepositoryRequest | TB.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptionsWithMeta): Promise> async verifyRepository (this: That, params: T.SnapshotVerifyRepositoryRequest | TB.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/sql.ts b/src/api/api/sql.ts index 63e808ff6..b3434a35c 100644 --- a/src/api/api/sql.ts +++ b/src/api/api/sql.ts @@ -43,6 +43,10 @@ export default class Sql { this.transport = transport } + /** + * Clears the SQL cursor + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/clear-sql-cursor-api.html Elasticsearch API docs} + */ async clearCursor (this: That, params: T.SqlClearCursorRequest | TB.SqlClearCursorRequest, options?: TransportRequestOptionsWithOutMeta): Promise async clearCursor (this: That, params: T.SqlClearCursorRequest | TB.SqlClearCursorRequest, options?: TransportRequestOptionsWithMeta): Promise> async clearCursor (this: That, params: T.SqlClearCursorRequest | TB.SqlClearCursorRequest, options?: TransportRequestOptions): Promise @@ -77,6 +81,10 @@ export default class Sql { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deletes an async SQL search or a stored synchronous SQL search. If the search is still running, the API cancels it. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-async-sql-search-api.html Elasticsearch API docs} + */ async deleteAsync (this: That, params: T.SqlDeleteAsyncRequest | TB.SqlDeleteAsyncRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteAsync (this: That, params: T.SqlDeleteAsyncRequest | TB.SqlDeleteAsyncRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteAsync (this: That, params: T.SqlDeleteAsyncRequest | TB.SqlDeleteAsyncRequest, options?: TransportRequestOptions): Promise @@ -99,6 +107,10 @@ export default class Sql { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the current status and available results for an async SQL search or stored synchronous SQL search + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-async-sql-search-api.html Elasticsearch API docs} + */ async getAsync (this: That, params: T.SqlGetAsyncRequest | TB.SqlGetAsyncRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getAsync (this: That, params: T.SqlGetAsyncRequest | TB.SqlGetAsyncRequest, options?: TransportRequestOptionsWithMeta): Promise> async getAsync (this: That, params: T.SqlGetAsyncRequest | TB.SqlGetAsyncRequest, options?: TransportRequestOptions): Promise @@ -121,6 +133,10 @@ export default class Sql { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns the current status of an async SQL search or a stored synchronous SQL search + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-async-sql-search-status-api.html Elasticsearch API docs} + */ async getAsyncStatus (this: That, params: T.SqlGetAsyncStatusRequest | TB.SqlGetAsyncStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getAsyncStatus (this: That, params: T.SqlGetAsyncStatusRequest | TB.SqlGetAsyncStatusRequest, options?: TransportRequestOptionsWithMeta): Promise> async getAsyncStatus (this: That, params: T.SqlGetAsyncStatusRequest | TB.SqlGetAsyncStatusRequest, options?: TransportRequestOptions): Promise @@ -143,6 +159,10 @@ export default class Sql { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Executes a SQL request + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/sql-search-api.html Elasticsearch API docs} + */ async query (this: That, params?: T.SqlQueryRequest | TB.SqlQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise async query (this: That, params?: T.SqlQueryRequest | TB.SqlQueryRequest, options?: TransportRequestOptionsWithMeta): Promise> async query (this: That, params?: T.SqlQueryRequest | TB.SqlQueryRequest, options?: TransportRequestOptions): Promise @@ -178,6 +198,10 @@ export default class Sql { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Translates SQL into Elasticsearch queries + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/sql-translate-api.html Elasticsearch API docs} + */ async translate (this: That, params: T.SqlTranslateRequest | TB.SqlTranslateRequest, options?: TransportRequestOptionsWithOutMeta): Promise async translate (this: That, params: T.SqlTranslateRequest | TB.SqlTranslateRequest, options?: TransportRequestOptionsWithMeta): Promise> async translate (this: That, params: T.SqlTranslateRequest | TB.SqlTranslateRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/ssl.ts b/src/api/api/ssl.ts index 08c360806..333be7894 100644 --- a/src/api/api/ssl.ts +++ b/src/api/api/ssl.ts @@ -43,6 +43,10 @@ export default class Ssl { this.transport = transport } + /** + * Retrieves information about the X.509 certificates used to encrypt communications in the cluster. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/security-api-ssl.html Elasticsearch API docs} + */ async certificates (this: That, params?: T.SslCertificatesRequest | TB.SslCertificatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async certificates (this: That, params?: T.SslCertificatesRequest | TB.SslCertificatesRequest, options?: TransportRequestOptionsWithMeta): Promise> async certificates (this: That, params?: T.SslCertificatesRequest | TB.SslCertificatesRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/synonyms.ts b/src/api/api/synonyms.ts new file mode 100644 index 000000000..bf1de39e0 --- /dev/null +++ b/src/api/api/synonyms.ts @@ -0,0 +1,123 @@ +/* + * 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. + */ + +/* eslint-disable import/export */ +/* eslint-disable @typescript-eslint/no-misused-new */ +/* eslint-disable @typescript-eslint/no-extraneous-class */ +/* eslint-disable @typescript-eslint/no-unused-vars */ + +// This file was automatically generated by elastic/elastic-client-generator-js +// DO NOT MODIFY IT BY HAND. Instead, modify the source open api file, +// and elastic/elastic-client-generator-js to regenerate this file again. + +import { + Transport, + TransportRequestOptions, + TransportRequestOptionsWithMeta, + TransportRequestOptionsWithOutMeta, + TransportResult +} from '@elastic/transport' +import * as T from '../types' +import * as TB from '../typesWithBodyKey' +interface That { transport: Transport } + +export default class Synonyms { + transport: Transport + constructor (transport: Transport) { + this.transport = transport + } + + /** + * Deletes a synonym set + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-synonyms.html Elasticsearch API docs} + */ + async delete (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async delete (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async delete (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async delete (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = ['synonyms_set'] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'DELETE' + const path = `/_synonyms/${encodeURIComponent(params.synonyms_set.toString())}` + return await this.transport.request({ path, method, querystring, body }, options) + } + + /** + * Retrieves a synonym set + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-synonyms.html Elasticsearch API docs} + */ + async get (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async get (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async get (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async get (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = ['synonyms_set'] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'GET' + const path = `/_synonyms/${encodeURIComponent(params.synonyms_set.toString())}` + return await this.transport.request({ path, method, querystring, body }, options) + } + + /** + * Creates or updates a synonyms set + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-synonyms.html Elasticsearch API docs} + */ + async put (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async put (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async put (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async put (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = ['synonyms_set'] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'PUT' + const path = `/_synonyms/${encodeURIComponent(params.synonyms_set.toString())}` + return await this.transport.request({ path, method, querystring, body }, options) + } +} diff --git a/src/api/api/tasks.ts b/src/api/api/tasks.ts index def117eaa..36d317804 100644 --- a/src/api/api/tasks.ts +++ b/src/api/api/tasks.ts @@ -43,6 +43,10 @@ export default class Tasks { this.transport = transport } + /** + * Cancels a task, if it can be cancelled through an API. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/tasks.html Elasticsearch API docs} + */ async cancel (this: That, params?: T.TasksCancelRequest | TB.TasksCancelRequest, options?: TransportRequestOptionsWithOutMeta): Promise async cancel (this: That, params?: T.TasksCancelRequest | TB.TasksCancelRequest, options?: TransportRequestOptionsWithMeta): Promise> async cancel (this: That, params?: T.TasksCancelRequest | TB.TasksCancelRequest, options?: TransportRequestOptions): Promise @@ -73,6 +77,10 @@ export default class Tasks { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns information about a task. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/tasks.html Elasticsearch API docs} + */ async get (this: That, params: T.TasksGetRequest | TB.TasksGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise async get (this: That, params: T.TasksGetRequest | TB.TasksGetRequest, options?: TransportRequestOptionsWithMeta): Promise> async get (this: That, params: T.TasksGetRequest | TB.TasksGetRequest, options?: TransportRequestOptions): Promise @@ -95,6 +103,10 @@ export default class Tasks { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Returns a list of tasks. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/tasks.html Elasticsearch API docs} + */ async list (this: That, params?: T.TasksListRequest | TB.TasksListRequest, options?: TransportRequestOptionsWithOutMeta): Promise async list (this: That, params?: T.TasksListRequest | TB.TasksListRequest, options?: TransportRequestOptionsWithMeta): Promise> async list (this: That, params?: T.TasksListRequest | TB.TasksListRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/terms_enum.ts b/src/api/api/terms_enum.ts index eb88eb9db..1bff21cb8 100644 --- a/src/api/api/terms_enum.ts +++ b/src/api/api/terms_enum.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * The terms enum API can be used to discover terms in the index that begin with the provided string. It is designed for low-latency look-ups used in auto-complete scenarios. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/search-terms-enum.html Elasticsearch API docs} + */ export default async function TermsEnumApi (this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function TermsEnumApi (this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function TermsEnumApi (this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/termvectors.ts b/src/api/api/termvectors.ts index d2cf887ba..2c3f11472 100644 --- a/src/api/api/termvectors.ts +++ b/src/api/api/termvectors.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Returns information and statistics about terms in the fields of a particular document. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-termvectors.html Elasticsearch API docs} + */ export default async function TermvectorsApi (this: That, params: T.TermvectorsRequest | TB.TermvectorsRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function TermvectorsApi (this: That, params: T.TermvectorsRequest | TB.TermvectorsRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function TermvectorsApi (this: That, params: T.TermvectorsRequest | TB.TermvectorsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/text_structure.ts b/src/api/api/text_structure.ts index 6274fca23..59e153bcc 100644 --- a/src/api/api/text_structure.ts +++ b/src/api/api/text_structure.ts @@ -43,6 +43,10 @@ export default class TextStructure { this.transport = transport } + /** + * Finds the structure of a text file. The text file must contain data that is suitable to be ingested into Elasticsearch. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/find-structure.html Elasticsearch API docs} + */ async findStructure (this: That, params: T.TextStructureFindStructureRequest | TB.TextStructureFindStructureRequest, options?: TransportRequestOptionsWithOutMeta): Promise async findStructure (this: That, params: T.TextStructureFindStructureRequest | TB.TextStructureFindStructureRequest, options?: TransportRequestOptionsWithMeta): Promise> async findStructure (this: That, params: T.TextStructureFindStructureRequest | TB.TextStructureFindStructureRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/transform.ts b/src/api/api/transform.ts index 904c40d37..104619bd7 100644 --- a/src/api/api/transform.ts +++ b/src/api/api/transform.ts @@ -43,6 +43,10 @@ export default class Transform { this.transport = transport } + /** + * Deletes an existing transform. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/delete-transform.html Elasticsearch API docs} + */ async deleteTransform (this: That, params: T.TransformDeleteTransformRequest | TB.TransformDeleteTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteTransform (this: That, params: T.TransformDeleteTransformRequest | TB.TransformDeleteTransformRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteTransform (this: That, params: T.TransformDeleteTransformRequest | TB.TransformDeleteTransformRequest, options?: TransportRequestOptions): Promise @@ -65,6 +69,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves configuration information for transforms. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-transform.html Elasticsearch API docs} + */ async getTransform (this: That, params?: T.TransformGetTransformRequest | TB.TransformGetTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getTransform (this: That, params?: T.TransformGetTransformRequest | TB.TransformGetTransformRequest, options?: TransportRequestOptionsWithMeta): Promise> async getTransform (this: That, params?: T.TransformGetTransformRequest | TB.TransformGetTransformRequest, options?: TransportRequestOptions): Promise @@ -95,6 +103,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves usage information for transforms. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/get-transform-stats.html Elasticsearch API docs} + */ async getTransformStats (this: That, params: T.TransformGetTransformStatsRequest | TB.TransformGetTransformStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getTransformStats (this: That, params: T.TransformGetTransformStatsRequest | TB.TransformGetTransformStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async getTransformStats (this: That, params: T.TransformGetTransformStatsRequest | TB.TransformGetTransformStatsRequest, options?: TransportRequestOptions): Promise @@ -117,6 +129,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Previews a transform. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/preview-transform.html Elasticsearch API docs} + */ async previewTransform (this: That, params?: T.TransformPreviewTransformRequest | TB.TransformPreviewTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise> async previewTransform (this: That, params?: T.TransformPreviewTransformRequest | TB.TransformPreviewTransformRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> async previewTransform (this: That, params?: T.TransformPreviewTransformRequest | TB.TransformPreviewTransformRequest, options?: TransportRequestOptions): Promise> @@ -159,6 +175,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Instantiates a transform. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/put-transform.html Elasticsearch API docs} + */ async putTransform (this: That, params: T.TransformPutTransformRequest | TB.TransformPutTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putTransform (this: That, params: T.TransformPutTransformRequest | TB.TransformPutTransformRequest, options?: TransportRequestOptionsWithMeta): Promise> async putTransform (this: That, params: T.TransformPutTransformRequest | TB.TransformPutTransformRequest, options?: TransportRequestOptions): Promise @@ -193,6 +213,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Resets an existing transform. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/reset-transform.html Elasticsearch API docs} + */ async resetTransform (this: That, params: T.TransformResetTransformRequest | TB.TransformResetTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise async resetTransform (this: That, params: T.TransformResetTransformRequest | TB.TransformResetTransformRequest, options?: TransportRequestOptionsWithMeta): Promise> async resetTransform (this: That, params: T.TransformResetTransformRequest | TB.TransformResetTransformRequest, options?: TransportRequestOptions): Promise @@ -215,6 +239,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Schedules now a transform. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/schedule-now-transform.html Elasticsearch API docs} + */ async scheduleNowTransform (this: That, params: T.TransformScheduleNowTransformRequest | TB.TransformScheduleNowTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise async scheduleNowTransform (this: That, params: T.TransformScheduleNowTransformRequest | TB.TransformScheduleNowTransformRequest, options?: TransportRequestOptionsWithMeta): Promise> async scheduleNowTransform (this: That, params: T.TransformScheduleNowTransformRequest | TB.TransformScheduleNowTransformRequest, options?: TransportRequestOptions): Promise @@ -237,6 +265,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Starts one or more transforms. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/start-transform.html Elasticsearch API docs} + */ async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptionsWithMeta): Promise> async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptions): Promise @@ -259,6 +291,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Stops one or more transforms. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/stop-transform.html Elasticsearch API docs} + */ async stopTransform (this: That, params: T.TransformStopTransformRequest | TB.TransformStopTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stopTransform (this: That, params: T.TransformStopTransformRequest | TB.TransformStopTransformRequest, options?: TransportRequestOptionsWithMeta): Promise> async stopTransform (this: That, params: T.TransformStopTransformRequest | TB.TransformStopTransformRequest, options?: TransportRequestOptions): Promise @@ -281,6 +317,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Updates certain properties of a transform. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/update-transform.html Elasticsearch API docs} + */ async updateTransform (this: That, params: T.TransformUpdateTransformRequest | TB.TransformUpdateTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise async updateTransform (this: That, params: T.TransformUpdateTransformRequest | TB.TransformUpdateTransformRequest, options?: TransportRequestOptionsWithMeta): Promise> async updateTransform (this: That, params: T.TransformUpdateTransformRequest | TB.TransformUpdateTransformRequest, options?: TransportRequestOptions): Promise @@ -315,6 +355,10 @@ export default class Transform { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Upgrades all transforms. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/upgrade-transforms.html Elasticsearch API docs} + */ async upgradeTransforms (this: That, params?: T.TransformUpgradeTransformsRequest | TB.TransformUpgradeTransformsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async upgradeTransforms (this: That, params?: T.TransformUpgradeTransformsRequest | TB.TransformUpgradeTransformsRequest, options?: TransportRequestOptionsWithMeta): Promise> async upgradeTransforms (this: That, params?: T.TransformUpgradeTransformsRequest | TB.TransformUpgradeTransformsRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/update.ts b/src/api/api/update.ts index 52be55709..f5170e64c 100644 --- a/src/api/api/update.ts +++ b/src/api/api/update.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Updates a document with a script or partial document. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-update.html Elasticsearch API docs} + */ export default async function UpdateApi (this: That, params: T.UpdateRequest | TB.UpdateRequest, options?: TransportRequestOptionsWithOutMeta): Promise> export default async function UpdateApi (this: That, params: T.UpdateRequest | TB.UpdateRequest, options?: TransportRequestOptionsWithMeta): Promise, unknown>> export default async function UpdateApi (this: That, params: T.UpdateRequest | TB.UpdateRequest, options?: TransportRequestOptions): Promise> diff --git a/src/api/api/update_by_query.ts b/src/api/api/update_by_query.ts index ada1a9595..cdf1cac3a 100644 --- a/src/api/api/update_by_query.ts +++ b/src/api/api/update_by_query.ts @@ -37,6 +37,11 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Performs an update on every document in the index without changing the source, +for example to pick up a mapping change. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-update-by-query.html Elasticsearch API docs} + */ export default async function UpdateByQueryApi (this: That, params: T.UpdateByQueryRequest | TB.UpdateByQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function UpdateByQueryApi (this: That, params: T.UpdateByQueryRequest | TB.UpdateByQueryRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function UpdateByQueryApi (this: That, params: T.UpdateByQueryRequest | TB.UpdateByQueryRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/update_by_query_rethrottle.ts b/src/api/api/update_by_query_rethrottle.ts index 8af59d09b..c91c4b0fa 100644 --- a/src/api/api/update_by_query_rethrottle.ts +++ b/src/api/api/update_by_query_rethrottle.ts @@ -37,6 +37,10 @@ import * as T from '../types' import * as TB from '../typesWithBodyKey' interface That { transport: Transport } +/** + * Changes the number of requests per second for a particular Update By Query operation. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/docs-update-by-query.html Elasticsearch API docs} + */ export default async function UpdateByQueryRethrottleApi (this: That, params: T.UpdateByQueryRethrottleRequest | TB.UpdateByQueryRethrottleRequest, options?: TransportRequestOptionsWithOutMeta): Promise export default async function UpdateByQueryRethrottleApi (this: That, params: T.UpdateByQueryRethrottleRequest | TB.UpdateByQueryRethrottleRequest, options?: TransportRequestOptionsWithMeta): Promise> export default async function UpdateByQueryRethrottleApi (this: That, params: T.UpdateByQueryRethrottleRequest | TB.UpdateByQueryRethrottleRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/api/watcher.ts b/src/api/api/watcher.ts index d01f43cf3..a026dbc1f 100644 --- a/src/api/api/watcher.ts +++ b/src/api/api/watcher.ts @@ -43,6 +43,10 @@ export default class Watcher { this.transport = transport } + /** + * Acknowledges a watch, manually throttling the execution of the watch's actions. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-ack-watch.html Elasticsearch API docs} + */ async ackWatch (this: That, params: T.WatcherAckWatchRequest | TB.WatcherAckWatchRequest, options?: TransportRequestOptionsWithOutMeta): Promise async ackWatch (this: That, params: T.WatcherAckWatchRequest | TB.WatcherAckWatchRequest, options?: TransportRequestOptionsWithMeta): Promise> async ackWatch (this: That, params: T.WatcherAckWatchRequest | TB.WatcherAckWatchRequest, options?: TransportRequestOptions): Promise @@ -72,6 +76,10 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Activates a currently inactive watch. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-activate-watch.html Elasticsearch API docs} + */ async activateWatch (this: That, params: T.WatcherActivateWatchRequest | TB.WatcherActivateWatchRequest, options?: TransportRequestOptionsWithOutMeta): Promise async activateWatch (this: That, params: T.WatcherActivateWatchRequest | TB.WatcherActivateWatchRequest, options?: TransportRequestOptionsWithMeta): Promise> async activateWatch (this: That, params: T.WatcherActivateWatchRequest | TB.WatcherActivateWatchRequest, options?: TransportRequestOptions): Promise @@ -94,6 +102,10 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Deactivates a currently active watch. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-deactivate-watch.html Elasticsearch API docs} + */ async deactivateWatch (this: That, params: T.WatcherDeactivateWatchRequest | TB.WatcherDeactivateWatchRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deactivateWatch (this: That, params: T.WatcherDeactivateWatchRequest | TB.WatcherDeactivateWatchRequest, options?: TransportRequestOptionsWithMeta): Promise> async deactivateWatch (this: That, params: T.WatcherDeactivateWatchRequest | TB.WatcherDeactivateWatchRequest, options?: TransportRequestOptions): Promise @@ -116,6 +128,10 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Removes a watch from Watcher. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-delete-watch.html Elasticsearch API docs} + */ async deleteWatch (this: That, params: T.WatcherDeleteWatchRequest | TB.WatcherDeleteWatchRequest, options?: TransportRequestOptionsWithOutMeta): Promise async deleteWatch (this: That, params: T.WatcherDeleteWatchRequest | TB.WatcherDeleteWatchRequest, options?: TransportRequestOptionsWithMeta): Promise> async deleteWatch (this: That, params: T.WatcherDeleteWatchRequest | TB.WatcherDeleteWatchRequest, options?: TransportRequestOptions): Promise @@ -138,6 +154,10 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Forces the execution of a stored watch. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-execute-watch.html Elasticsearch API docs} + */ async executeWatch (this: That, params?: T.WatcherExecuteWatchRequest | TB.WatcherExecuteWatchRequest, options?: TransportRequestOptionsWithOutMeta): Promise async executeWatch (this: That, params?: T.WatcherExecuteWatchRequest | TB.WatcherExecuteWatchRequest, options?: TransportRequestOptionsWithMeta): Promise> async executeWatch (this: That, params?: T.WatcherExecuteWatchRequest | TB.WatcherExecuteWatchRequest, options?: TransportRequestOptions): Promise @@ -180,6 +200,36 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieve settings for the watcher system index + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-get-settings.html Elasticsearch API docs} + */ + async getSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async getSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async getSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async getSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = [] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'GET' + const path = '/_watcher/settings' + return await this.transport.request({ path, method, querystring, body }, options) + } + + /** + * Retrieves a watch by its ID. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-get-watch.html Elasticsearch API docs} + */ async getWatch (this: That, params: T.WatcherGetWatchRequest | TB.WatcherGetWatchRequest, options?: TransportRequestOptionsWithOutMeta): Promise async getWatch (this: That, params: T.WatcherGetWatchRequest | TB.WatcherGetWatchRequest, options?: TransportRequestOptionsWithMeta): Promise> async getWatch (this: That, params: T.WatcherGetWatchRequest | TB.WatcherGetWatchRequest, options?: TransportRequestOptions): Promise @@ -202,6 +252,10 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Creates a new watch, or updates an existing one. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-put-watch.html Elasticsearch API docs} + */ async putWatch (this: That, params: T.WatcherPutWatchRequest | TB.WatcherPutWatchRequest, options?: TransportRequestOptionsWithOutMeta): Promise async putWatch (this: That, params: T.WatcherPutWatchRequest | TB.WatcherPutWatchRequest, options?: TransportRequestOptionsWithMeta): Promise> async putWatch (this: That, params: T.WatcherPutWatchRequest | TB.WatcherPutWatchRequest, options?: TransportRequestOptions): Promise @@ -236,6 +290,10 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves stored watches. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-query-watches.html Elasticsearch API docs} + */ async queryWatches (this: That, params?: T.WatcherQueryWatchesRequest | TB.WatcherQueryWatchesRequest, options?: TransportRequestOptionsWithOutMeta): Promise async queryWatches (this: That, params?: T.WatcherQueryWatchesRequest | TB.WatcherQueryWatchesRequest, options?: TransportRequestOptionsWithMeta): Promise> async queryWatches (this: That, params?: T.WatcherQueryWatchesRequest | TB.WatcherQueryWatchesRequest, options?: TransportRequestOptions): Promise @@ -271,6 +329,10 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Starts Watcher if it is not already running. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-start.html Elasticsearch API docs} + */ async start (this: That, params?: T.WatcherStartRequest | TB.WatcherStartRequest, options?: TransportRequestOptionsWithOutMeta): Promise async start (this: That, params?: T.WatcherStartRequest | TB.WatcherStartRequest, options?: TransportRequestOptionsWithMeta): Promise> async start (this: That, params?: T.WatcherStartRequest | TB.WatcherStartRequest, options?: TransportRequestOptions): Promise @@ -294,6 +356,10 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves the current Watcher metrics. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-stats.html Elasticsearch API docs} + */ async stats (this: That, params?: T.WatcherStatsRequest | TB.WatcherStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stats (this: That, params?: T.WatcherStatsRequest | TB.WatcherStatsRequest, options?: TransportRequestOptionsWithMeta): Promise> async stats (this: That, params?: T.WatcherStatsRequest | TB.WatcherStatsRequest, options?: TransportRequestOptions): Promise @@ -324,6 +390,10 @@ export default class Watcher { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Stops Watcher if it is running. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-stop.html Elasticsearch API docs} + */ async stop (this: That, params?: T.WatcherStopRequest | TB.WatcherStopRequest, options?: TransportRequestOptionsWithOutMeta): Promise async stop (this: That, params?: T.WatcherStopRequest | TB.WatcherStopRequest, options?: TransportRequestOptionsWithMeta): Promise> async stop (this: That, params?: T.WatcherStopRequest | TB.WatcherStopRequest, options?: TransportRequestOptions): Promise @@ -346,4 +416,30 @@ export default class Watcher { const path = '/_watcher/_stop' return await this.transport.request({ path, method, querystring, body }, options) } + + /** + * Update settings for the watcher system index + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/watcher-api-update-settings.html Elasticsearch API docs} + */ + async updateSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise + async updateSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise> + async updateSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise + async updateSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise { + const acceptedPath: string[] = [] + const querystring: Record = {} + const body = undefined + + params = params ?? {} + for (const key in params) { + if (acceptedPath.includes(key)) { + continue + } else if (key !== 'body') { + querystring[key] = params[key] + } + } + + const method = 'PUT' + const path = '/_watcher/settings' + return await this.transport.request({ path, method, querystring, body }, options) + } } diff --git a/src/api/api/xpack.ts b/src/api/api/xpack.ts index 8e67e2635..eab5e38c1 100644 --- a/src/api/api/xpack.ts +++ b/src/api/api/xpack.ts @@ -43,6 +43,10 @@ export default class Xpack { this.transport = transport } + /** + * Retrieves information about the installed X-Pack features. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/info-api.html Elasticsearch API docs} + */ async info (this: That, params?: T.XpackInfoRequest | TB.XpackInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise async info (this: That, params?: T.XpackInfoRequest | TB.XpackInfoRequest, options?: TransportRequestOptionsWithMeta): Promise> async info (this: That, params?: T.XpackInfoRequest | TB.XpackInfoRequest, options?: TransportRequestOptions): Promise @@ -66,6 +70,10 @@ export default class Xpack { return await this.transport.request({ path, method, querystring, body }, options) } + /** + * Retrieves usage information about the installed X-Pack features. + * @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/main/usage-api.html Elasticsearch API docs} + */ async usage (this: That, params?: T.XpackUsageRequest | TB.XpackUsageRequest, options?: TransportRequestOptionsWithOutMeta): Promise async usage (this: That, params?: T.XpackUsageRequest | TB.XpackUsageRequest, options?: TransportRequestOptionsWithMeta): Promise> async usage (this: That, params?: T.XpackUsageRequest | TB.XpackUsageRequest, options?: TransportRequestOptions): Promise diff --git a/src/api/index.ts b/src/api/index.ts index a76458829..46efbd366 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -94,6 +94,7 @@ import SlmApi from './api/slm' import SnapshotApi from './api/snapshot' import SqlApi from './api/sql' import SslApi from './api/ssl' +import SynonymsApi from './api/synonyms' import TasksApi from './api/tasks' import termsEnumApi from './api/terms_enum' import termvectorsApi from './api/termvectors' @@ -175,6 +176,7 @@ export default interface API { snapshot: SnapshotApi sql: SqlApi ssl: SslApi + synonyms: SynonymsApi tasks: TasksApi termsEnum: typeof termsEnumApi termvectors: typeof termvectorsApi @@ -216,6 +218,7 @@ const kSlm = Symbol('Slm') const kSnapshot = Symbol('Snapshot') const kSql = Symbol('Sql') const kSsl = Symbol('Ssl') +const kSynonyms = Symbol('Synonyms') const kTasks = Symbol('Tasks') const kTextStructure = Symbol('TextStructure') const kTransform = Symbol('Transform') @@ -252,6 +255,7 @@ export default class API { [kSnapshot]: symbol | null [kSql]: symbol | null [kSsl]: symbol | null + [kSynonyms]: symbol | null [kTasks]: symbol | null [kTextStructure]: symbol | null [kTransform]: symbol | null @@ -287,6 +291,7 @@ export default class API { this[kSnapshot] = null this[kSql] = null this[kSsl] = null + this[kSynonyms] = null this[kTasks] = null this[kTextStructure] = null this[kTransform] = null @@ -428,6 +433,9 @@ Object.defineProperties(API.prototype, { ssl: { get () { return this[kSsl] === null ? (this[kSsl] = new SslApi(this.transport)) : this[kSsl] } }, + synonyms: { + get () { return this[kSynonyms] === null ? (this[kSynonyms] = new SynonymsApi(this.transport)) : this[kSynonyms] } + }, tasks: { get () { return this[kTasks] === null ? (this[kTasks] = new TasksApi(this.transport)) : this[kTasks] } }, diff --git a/src/api/types.ts b/src/api/types.ts index c5388ce4a..44a5659fd 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -229,9 +229,9 @@ export interface DeleteByQueryResponse { slice_id?: integer task?: TaskId throttled?: Duration - throttled_millis: DurationValue + throttled_millis?: DurationValue throttled_until?: Duration - throttled_until_millis: DurationValue + throttled_until_millis?: DurationValue timed_out?: boolean took?: DurationValue total?: long @@ -1140,6 +1140,7 @@ export interface SearchRequest extends RequestBase { indices_boost?: Record[] docvalue_fields?: (QueryDslFieldAndFormat | Field)[] knn?: KnnQuery | KnnQuery[] + rank?: RankContainer min_score?: double post_filter?: QueryDslQueryContainer profile?: boolean @@ -1969,6 +1970,10 @@ export type Bytes = 'b' | 'kb' | 'mb' | 'gb' | 'tb' | 'pb' export type CategoryId = string +export type ClusterInfoTarget = '_all' | 'http' | 'ingest' | 'thread_pool' | 'script' + +export type ClusterInfoTargets = ClusterInfoTarget | ClusterInfoTarget[] + export interface ClusterStatistics { skipped: integer successful: integer @@ -2368,6 +2373,13 @@ export interface QueryVectorBuilder { text_embedding?: TextEmbedding } +export interface RankBase { +} + +export interface RankContainer { + rrf?: RrfRank +} + export interface RecoveryStats { current_as_source: long current_as_target: long @@ -2412,6 +2424,11 @@ export interface Retries { export type Routing = string +export interface RrfRank { + rank_constant?: long + window_size?: long +} + export interface ScoreSort { order?: SortOrder } @@ -5138,7 +5155,7 @@ export interface MappingTextProperty extends MappingCorePropertyBase { type: 'text' } -export type MappingTimeSeriesMetricType = 'gauge' | 'counter' | 'summary' | 'histogram' +export type MappingTimeSeriesMetricType = 'gauge' | 'counter' | 'summary' | 'histogram' | 'position' export interface MappingTokenCountProperty extends MappingDocValuesPropertyBase { analyzer?: string @@ -5695,6 +5712,7 @@ export interface QueryDslQueryContainer { term?: Partial> terms?: QueryDslTermsQuery terms_set?: Partial> + text_expansion?: QueryDslTextExpansionQuery | Field wildcard?: Partial> wrapper?: QueryDslWrapperQuery type?: QueryDslTypeQuery @@ -5908,6 +5926,12 @@ export interface QueryDslTermsSetQuery extends QueryDslQueryBase { terms: string[] } +export interface QueryDslTextExpansionQuery extends QueryDslQueryBase { + value: Field + model_id: string + model_text: string +} + export type QueryDslTextQueryType = 'best_fields' | 'most_fields' | 'cross_fields' | 'phrase' | 'phrase_prefix' | 'bool_prefix' export interface QueryDslTypeQuery extends QueryDslQueryBase { @@ -6300,6 +6324,7 @@ export interface CatHealthHealthRecord { } export interface CatHealthRequest extends CatCatRequestBase { + time?: TimeUnit ts?: boolean } @@ -7270,6 +7295,7 @@ export interface CatNodesNodesRecord { export interface CatNodesRequest extends CatCatRequestBase { bytes?: Bytes full_id?: boolean | string + include_unloaded_segments?: boolean } export type CatNodesResponse = CatNodesNodesRecord[] @@ -7703,7 +7729,7 @@ export interface CatTasksRequest extends CatCatRequestBase { actions?: string[] detailed?: boolean node_id?: string[] - parent_task?: long + parent_task_id?: string } export type CatTasksResponse = CatTasksTasksRecord[] @@ -8153,6 +8179,7 @@ export interface ClusterComponentTemplateSummary { settings?: Record mappings?: MappingTypeMapping aliases?: Record + lifecycle?: IndicesDataLifecycleWithRollover } export interface ClusterAllocationExplainAllocationDecision { @@ -8299,6 +8326,7 @@ export interface ClusterGetComponentTemplateRequest extends RequestBase { flat_settings?: boolean local?: boolean master_timeout?: Duration + include_defaults?: boolean } export interface ClusterGetComponentTemplateResponse { @@ -8376,6 +8404,18 @@ export interface ClusterHealthShardHealthStats { unassigned_shards: integer } +export interface ClusterInfoRequest extends RequestBase { + target: ClusterInfoTargets +} + +export interface ClusterInfoResponse { + cluster_name: Name + http?: NodesHttp + ingest?: NodesIngest + thread_pool?: Record + script?: NodesScripting +} + export interface ClusterPendingTasksPendingTask { executing: boolean insert_order: integer @@ -9403,6 +9443,15 @@ export interface IndicesCacheQueries { enabled: boolean } +export interface IndicesDataLifecycle { + data_retention?: Duration +} + +export interface IndicesDataLifecycleWithRollover { + data_retention?: Duration + rollover?: IndicesDlmRolloverConditions +} + export interface IndicesDataStream { name: DataStreamName timestamp_field: IndicesDataStreamTimestampField @@ -9416,6 +9465,7 @@ export interface IndicesDataStream { ilm_policy?: Name _meta?: Metadata allow_custom_routing?: boolean + lifecycle?: IndicesDataLifecycleWithRollover } export interface IndicesDataStreamIndex { @@ -9431,6 +9481,19 @@ export interface IndicesDataStreamVisibility { hidden?: boolean } +export interface IndicesDlmRolloverConditions { + min_age?: Duration + max_age?: string + min_docs?: long + max_docs?: long + min_size?: ByteSize + max_size?: ByteSize + min_primary_shard_size?: ByteSize + max_primary_shard_size?: ByteSize + min_primary_shard_docs?: long + max_primary_shard_docs?: long +} + export interface IndicesDownsampleConfig { fixed_interval: DurationLarge } @@ -9484,10 +9547,10 @@ export interface IndicesIndexSegmentSort { } export interface IndicesIndexSettingBlocks { - read_only?: boolean - read_only_allow_delete?: boolean - read?: boolean - write?: boolean | string + read_only?: SpecUtilsStringified + read_only_allow_delete?: SpecUtilsStringified + read?: SpecUtilsStringified + write?: SpecUtilsStringified metadata?: SpecUtilsStringified } @@ -9585,6 +9648,7 @@ export interface IndicesIndexState { settings?: IndicesIndexSettings defaults?: IndicesIndexSettings data_stream?: DataStreamName + lifecycle?: IndicesDataLifecycle } export interface IndicesIndexTemplate { @@ -9607,6 +9671,7 @@ export interface IndicesIndexTemplateSummary { aliases?: Record mappings?: MappingTypeMapping settings?: IndicesIndexSettings + lifecycle?: IndicesDataLifecycleWithRollover } export interface IndicesIndexVersioning { @@ -10020,6 +10085,15 @@ export interface IndicesDeleteAliasRequest extends RequestBase { export type IndicesDeleteAliasResponse = AcknowledgedResponseBase +export interface IndicesDeleteDataLifecycleRequest extends RequestBase { + name: DataStreamNames + expand_wildcards?: ExpandWildcards + master_timeout?: Duration + timeout?: Duration +} + +export type IndicesDeleteDataLifecycleResponse = AcknowledgedResponseBase + export interface IndicesDeleteDataStreamRequest extends RequestBase { name: DataStreamNames expand_wildcards?: ExpandWildcards @@ -10101,6 +10175,28 @@ export interface IndicesExistsTemplateRequest extends RequestBase { export type IndicesExistsTemplateResponse = boolean +export interface IndicesExplainDataLifecycleDataLifecycleExplain { + index: IndexName + managed_by_dlm: boolean + index_creation_date_millis?: EpochTime + time_since_index_creation?: Duration + rollover_date_millis?: EpochTime + time_since_rollover?: Duration + lifecycle?: IndicesDataLifecycleWithRollover + generation_time?: Duration + error?: string +} + +export interface IndicesExplainDataLifecycleRequest extends RequestBase { + index: Indices + include_defaults?: boolean + master_timeout?: Duration +} + +export interface IndicesExplainDataLifecycleResponse { + indices: Record +} + export interface IndicesFieldUsageStatsFieldSummary { any: uint stored_fields: uint @@ -10218,9 +10314,25 @@ export interface IndicesGetAliasRequest extends RequestBase { export type IndicesGetAliasResponse = Record +export interface IndicesGetDataLifecycleDataStreamLifecycle { + name: DataStreamName + lifecycle?: IndicesDataLifecycle +} + +export interface IndicesGetDataLifecycleRequest extends RequestBase { + name: DataStreamNames + expand_wildcards?: ExpandWildcards + include_defaults?: boolean +} + +export interface IndicesGetDataLifecycleResponse { + data_streams: IndicesGetDataLifecycleDataStreamLifecycle[] +} + export interface IndicesGetDataStreamRequest extends RequestBase { name?: DataStreamNames expand_wildcards?: ExpandWildcards + include_defaults?: boolean } export interface IndicesGetDataStreamResponse { @@ -10253,6 +10365,7 @@ export interface IndicesGetIndexTemplateRequest extends RequestBase { local?: boolean flat_settings?: boolean master_timeout?: Duration + include_defaults?: boolean } export interface IndicesGetIndexTemplateResponse { @@ -10355,10 +10468,21 @@ export interface IndicesPutAliasRequest extends RequestBase { export type IndicesPutAliasResponse = AcknowledgedResponseBase +export interface IndicesPutDataLifecycleRequest extends RequestBase { + name: DataStreamNames + expand_wildcards?: ExpandWildcards + master_timeout?: Duration + timeout?: Duration + data_retention?: Duration +} + +export type IndicesPutDataLifecycleResponse = AcknowledgedResponseBase + export interface IndicesPutIndexTemplateIndexTemplateMapping { aliases?: Record mappings?: MappingTypeMapping settings?: IndicesIndexSettings + lifecycle?: IndicesDataLifecycle } export interface IndicesPutIndexTemplateRequest extends RequestBase { @@ -10740,6 +10864,7 @@ export interface IndicesSimulateIndexTemplateRequest extends RequestBase { name: Name create?: boolean master_timeout?: Duration + include_defaults?: boolean allow_auto_create?: boolean index_patterns?: Indices composed_of?: Name[] @@ -10762,6 +10887,7 @@ export interface IndicesSimulateTemplateRequest extends RequestBase { name?: Name create?: boolean master_timeout?: Duration + include_defaults?: boolean template?: IndicesIndexTemplate } @@ -15188,6 +15314,14 @@ export interface RollupStopJobResponse { stopped: boolean } +export interface SearchApplicationAnalyticsCollection { + event_data_stream: SearchApplicationEventDataStream +} + +export interface SearchApplicationEventDataStream { + name: IndexName +} + export interface SearchApplicationSearchApplication { name: Name indices: IndexName[] @@ -15206,12 +15340,24 @@ export interface SearchApplicationDeleteRequest extends RequestBase { export type SearchApplicationDeleteResponse = AcknowledgedResponseBase +export interface SearchApplicationDeleteBehavioralAnalyticsRequest extends RequestBase { + name: Name +} + +export type SearchApplicationDeleteBehavioralAnalyticsResponse = AcknowledgedResponseBase + export interface SearchApplicationGetRequest extends RequestBase { name: Name } export type SearchApplicationGetResponse = SearchApplicationSearchApplication +export interface SearchApplicationGetBehavioralAnalyticsRequest extends RequestBase { + name?: Name[] +} + +export type SearchApplicationGetBehavioralAnalyticsResponse = Record + export interface SearchApplicationListRequest extends RequestBase { q?: string from?: integer @@ -15240,6 +15386,16 @@ export interface SearchApplicationPutResponse { result: Result } +export interface SearchApplicationPutBehavioralAnalyticsAnalyticsAcknowledgeResponseBase extends AcknowledgedResponseBase { + name: Name +} + +export interface SearchApplicationPutBehavioralAnalyticsRequest extends RequestBase { + name: Name +} + +export type SearchApplicationPutBehavioralAnalyticsResponse = SearchApplicationPutBehavioralAnalyticsAnalyticsAcknowledgeResponseBase + export interface SearchApplicationSearchRequest extends RequestBase { name: Name params?: Record @@ -16469,7 +16625,7 @@ export interface SnapshotSnapshotInfo { export interface SnapshotSnapshotShardFailure { index: IndexName - node_id: Id + node_id?: Id reason: string shard_id: Id status: string diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index 6c0a35200..6f2887bd5 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -244,9 +244,9 @@ export interface DeleteByQueryResponse { slice_id?: integer task?: TaskId throttled?: Duration - throttled_millis: DurationValue + throttled_millis?: DurationValue throttled_until?: Duration - throttled_until_millis: DurationValue + throttled_until_millis?: DurationValue timed_out?: boolean took?: DurationValue total?: long @@ -1194,6 +1194,7 @@ export interface SearchRequest extends RequestBase { indices_boost?: Record[] docvalue_fields?: (QueryDslFieldAndFormat | Field)[] knn?: KnnQuery | KnnQuery[] + rank?: RankContainer min_score?: double post_filter?: QueryDslQueryContainer profile?: boolean @@ -2042,6 +2043,10 @@ export type Bytes = 'b' | 'kb' | 'mb' | 'gb' | 'tb' | 'pb' export type CategoryId = string +export type ClusterInfoTarget = '_all' | 'http' | 'ingest' | 'thread_pool' | 'script' + +export type ClusterInfoTargets = ClusterInfoTarget | ClusterInfoTarget[] + export interface ClusterStatistics { skipped: integer successful: integer @@ -2441,6 +2446,13 @@ export interface QueryVectorBuilder { text_embedding?: TextEmbedding } +export interface RankBase { +} + +export interface RankContainer { + rrf?: RrfRank +} + export interface RecoveryStats { current_as_source: long current_as_target: long @@ -2485,6 +2497,11 @@ export interface Retries { export type Routing = string +export interface RrfRank { + rank_constant?: long + window_size?: long +} + export interface ScoreSort { order?: SortOrder } @@ -5211,7 +5228,7 @@ export interface MappingTextProperty extends MappingCorePropertyBase { type: 'text' } -export type MappingTimeSeriesMetricType = 'gauge' | 'counter' | 'summary' | 'histogram' +export type MappingTimeSeriesMetricType = 'gauge' | 'counter' | 'summary' | 'histogram' | 'position' export interface MappingTokenCountProperty extends MappingDocValuesPropertyBase { analyzer?: string @@ -5768,6 +5785,7 @@ export interface QueryDslQueryContainer { term?: Partial> terms?: QueryDslTermsQuery terms_set?: Partial> + text_expansion?: QueryDslTextExpansionQuery | Field wildcard?: Partial> wrapper?: QueryDslWrapperQuery type?: QueryDslTypeQuery @@ -5981,6 +5999,12 @@ export interface QueryDslTermsSetQuery extends QueryDslQueryBase { terms: string[] } +export interface QueryDslTextExpansionQuery extends QueryDslQueryBase { + value: Field + model_id: string + model_text: string +} + export type QueryDslTextQueryType = 'best_fields' | 'most_fields' | 'cross_fields' | 'phrase' | 'phrase_prefix' | 'bool_prefix' export interface QueryDslTypeQuery extends QueryDslQueryBase { @@ -6377,6 +6401,7 @@ export interface CatHealthHealthRecord { } export interface CatHealthRequest extends CatCatRequestBase { + time?: TimeUnit ts?: boolean } @@ -7347,6 +7372,7 @@ export interface CatNodesNodesRecord { export interface CatNodesRequest extends CatCatRequestBase { bytes?: Bytes full_id?: boolean | string + include_unloaded_segments?: boolean } export type CatNodesResponse = CatNodesNodesRecord[] @@ -7780,7 +7806,7 @@ export interface CatTasksRequest extends CatCatRequestBase { actions?: string[] detailed?: boolean node_id?: string[] - parent_task?: long + parent_task_id?: string } export type CatTasksResponse = CatTasksTasksRecord[] @@ -8242,6 +8268,7 @@ export interface ClusterComponentTemplateSummary { settings?: Record mappings?: MappingTypeMapping aliases?: Record + lifecycle?: IndicesDataLifecycleWithRollover } export interface ClusterAllocationExplainAllocationDecision { @@ -8391,6 +8418,7 @@ export interface ClusterGetComponentTemplateRequest extends RequestBase { flat_settings?: boolean local?: boolean master_timeout?: Duration + include_defaults?: boolean } export interface ClusterGetComponentTemplateResponse { @@ -8468,6 +8496,18 @@ export interface ClusterHealthShardHealthStats { unassigned_shards: integer } +export interface ClusterInfoRequest extends RequestBase { + target: ClusterInfoTargets +} + +export interface ClusterInfoResponse { + cluster_name: Name + http?: NodesHttp + ingest?: NodesIngest + thread_pool?: Record + script?: NodesScripting +} + export interface ClusterPendingTasksPendingTask { executing: boolean insert_order: integer @@ -9526,6 +9566,15 @@ export interface IndicesCacheQueries { enabled: boolean } +export interface IndicesDataLifecycle { + data_retention?: Duration +} + +export interface IndicesDataLifecycleWithRollover { + data_retention?: Duration + rollover?: IndicesDlmRolloverConditions +} + export interface IndicesDataStream { name: DataStreamName timestamp_field: IndicesDataStreamTimestampField @@ -9539,6 +9588,7 @@ export interface IndicesDataStream { ilm_policy?: Name _meta?: Metadata allow_custom_routing?: boolean + lifecycle?: IndicesDataLifecycleWithRollover } export interface IndicesDataStreamIndex { @@ -9554,6 +9604,19 @@ export interface IndicesDataStreamVisibility { hidden?: boolean } +export interface IndicesDlmRolloverConditions { + min_age?: Duration + max_age?: string + min_docs?: long + max_docs?: long + min_size?: ByteSize + max_size?: ByteSize + min_primary_shard_size?: ByteSize + max_primary_shard_size?: ByteSize + min_primary_shard_docs?: long + max_primary_shard_docs?: long +} + export interface IndicesDownsampleConfig { fixed_interval: DurationLarge } @@ -9607,10 +9670,10 @@ export interface IndicesIndexSegmentSort { } export interface IndicesIndexSettingBlocks { - read_only?: boolean - read_only_allow_delete?: boolean - read?: boolean - write?: boolean | string + read_only?: SpecUtilsStringified + read_only_allow_delete?: SpecUtilsStringified + read?: SpecUtilsStringified + write?: SpecUtilsStringified metadata?: SpecUtilsStringified } @@ -9708,6 +9771,7 @@ export interface IndicesIndexState { settings?: IndicesIndexSettings defaults?: IndicesIndexSettings data_stream?: DataStreamName + lifecycle?: IndicesDataLifecycle } export interface IndicesIndexTemplate { @@ -9730,6 +9794,7 @@ export interface IndicesIndexTemplateSummary { aliases?: Record mappings?: MappingTypeMapping settings?: IndicesIndexSettings + lifecycle?: IndicesDataLifecycleWithRollover } export interface IndicesIndexVersioning { @@ -10152,6 +10217,15 @@ export interface IndicesDeleteAliasRequest extends RequestBase { export type IndicesDeleteAliasResponse = AcknowledgedResponseBase +export interface IndicesDeleteDataLifecycleRequest extends RequestBase { + name: DataStreamNames + expand_wildcards?: ExpandWildcards + master_timeout?: Duration + timeout?: Duration +} + +export type IndicesDeleteDataLifecycleResponse = AcknowledgedResponseBase + export interface IndicesDeleteDataStreamRequest extends RequestBase { name: DataStreamNames expand_wildcards?: ExpandWildcards @@ -10234,6 +10308,28 @@ export interface IndicesExistsTemplateRequest extends RequestBase { export type IndicesExistsTemplateResponse = boolean +export interface IndicesExplainDataLifecycleDataLifecycleExplain { + index: IndexName + managed_by_dlm: boolean + index_creation_date_millis?: EpochTime + time_since_index_creation?: Duration + rollover_date_millis?: EpochTime + time_since_rollover?: Duration + lifecycle?: IndicesDataLifecycleWithRollover + generation_time?: Duration + error?: string +} + +export interface IndicesExplainDataLifecycleRequest extends RequestBase { + index: Indices + include_defaults?: boolean + master_timeout?: Duration +} + +export interface IndicesExplainDataLifecycleResponse { + indices: Record +} + export interface IndicesFieldUsageStatsFieldSummary { any: uint stored_fields: uint @@ -10351,9 +10447,25 @@ export interface IndicesGetAliasRequest extends RequestBase { export type IndicesGetAliasResponse = Record +export interface IndicesGetDataLifecycleDataStreamLifecycle { + name: DataStreamName + lifecycle?: IndicesDataLifecycle +} + +export interface IndicesGetDataLifecycleRequest extends RequestBase { + name: DataStreamNames + expand_wildcards?: ExpandWildcards + include_defaults?: boolean +} + +export interface IndicesGetDataLifecycleResponse { + data_streams: IndicesGetDataLifecycleDataStreamLifecycle[] +} + export interface IndicesGetDataStreamRequest extends RequestBase { name?: DataStreamNames expand_wildcards?: ExpandWildcards + include_defaults?: boolean } export interface IndicesGetDataStreamResponse { @@ -10386,6 +10498,7 @@ export interface IndicesGetIndexTemplateRequest extends RequestBase { local?: boolean flat_settings?: boolean master_timeout?: Duration + include_defaults?: boolean } export interface IndicesGetIndexTemplateResponse { @@ -10494,10 +10607,24 @@ export interface IndicesPutAliasRequest extends RequestBase { export type IndicesPutAliasResponse = AcknowledgedResponseBase +export interface IndicesPutDataLifecycleRequest extends RequestBase { + name: DataStreamNames + expand_wildcards?: ExpandWildcards + master_timeout?: Duration + timeout?: Duration + /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ + body?: { + data_retention?: Duration + } +} + +export type IndicesPutDataLifecycleResponse = AcknowledgedResponseBase + export interface IndicesPutIndexTemplateIndexTemplateMapping { aliases?: Record mappings?: MappingTypeMapping settings?: IndicesIndexSettings + lifecycle?: IndicesDataLifecycle } export interface IndicesPutIndexTemplateRequest extends RequestBase { @@ -10895,6 +11022,7 @@ export interface IndicesSimulateIndexTemplateRequest extends RequestBase { name: Name create?: boolean master_timeout?: Duration + include_defaults?: boolean /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { allow_auto_create?: boolean @@ -10920,6 +11048,7 @@ export interface IndicesSimulateTemplateRequest extends RequestBase { name?: Name create?: boolean master_timeout?: Duration + include_defaults?: boolean /** @deprecated The use of the 'body' key has been deprecated, use 'template' instead. */ body?: IndicesIndexTemplate } @@ -15486,6 +15615,14 @@ export interface RollupStopJobResponse { stopped: boolean } +export interface SearchApplicationAnalyticsCollection { + event_data_stream: SearchApplicationEventDataStream +} + +export interface SearchApplicationEventDataStream { + name: IndexName +} + export interface SearchApplicationSearchApplication { name: Name indices: IndexName[] @@ -15504,12 +15641,24 @@ export interface SearchApplicationDeleteRequest extends RequestBase { export type SearchApplicationDeleteResponse = AcknowledgedResponseBase +export interface SearchApplicationDeleteBehavioralAnalyticsRequest extends RequestBase { + name: Name +} + +export type SearchApplicationDeleteBehavioralAnalyticsResponse = AcknowledgedResponseBase + export interface SearchApplicationGetRequest extends RequestBase { name: Name } export type SearchApplicationGetResponse = SearchApplicationSearchApplication +export interface SearchApplicationGetBehavioralAnalyticsRequest extends RequestBase { + name?: Name[] +} + +export type SearchApplicationGetBehavioralAnalyticsResponse = Record + export interface SearchApplicationListRequest extends RequestBase { q?: string from?: integer @@ -15539,6 +15688,16 @@ export interface SearchApplicationPutResponse { result: Result } +export interface SearchApplicationPutBehavioralAnalyticsAnalyticsAcknowledgeResponseBase extends AcknowledgedResponseBase { + name: Name +} + +export interface SearchApplicationPutBehavioralAnalyticsRequest extends RequestBase { + name: Name +} + +export type SearchApplicationPutBehavioralAnalyticsResponse = SearchApplicationPutBehavioralAnalyticsAnalyticsAcknowledgeResponseBase + export interface SearchApplicationSearchRequest extends RequestBase { name: Name /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ @@ -16845,7 +17004,7 @@ export interface SnapshotSnapshotInfo { export interface SnapshotSnapshotShardFailure { index: IndexName - node_id: Id + node_id?: Id reason: string shard_id: Id status: string